File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2448,6 +2448,17 @@ bool GatherUsesVisitor::visitUse(Operand *op) {
24482448 return true ;
24492449 }
24502450
2451+ if (auto *fixLifetime = dyn_cast<FixLifetimeInst>(op->getUser ())) {
2452+ auto leafRange = TypeTreeLeafTypeRange::get (op->get (), getRootAddress ());
2453+ if (!leafRange) {
2454+ LLVM_DEBUG (llvm::dbgs () << " Failed to compute leaf range!\n " );
2455+ return false ;
2456+ }
2457+
2458+ useState.recordLivenessUse (user, *leafRange);
2459+ return true ;
2460+ }
2461+
24512462 // If we don't fit into any of those categories, just track as a liveness
24522463 // use. We assume all such uses must only be reads to the memory. So we assert
24532464 // to be careful.
Original file line number Diff line number Diff line change @@ -199,6 +199,8 @@ struct SILMoveOnlyWrappedTypeEliminatorVisitor
199199 NO_UPDATE_NEEDED (BeginAccess)
200200 NO_UPDATE_NEEDED (EndAccess)
201201 NO_UPDATE_NEEDED (ClassMethod)
202+ NO_UPDATE_NEEDED (FixLifetime)
203+ NO_UPDATE_NEEDED (AddressToPointer)
202204#undef NO_UPDATE_NEEDED
203205
204206 bool eliminateIdentityCast (SingleValueInstruction *svi) {
You can’t perform that action at this time.
0 commit comments