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 @@ -2449,6 +2449,17 @@ bool GatherUsesVisitor::visitUse(Operand *op) {
24492449 return true ;
24502450 }
24512451
2452+ if (auto *fixLifetime = dyn_cast<FixLifetimeInst>(op->getUser ())) {
2453+ auto leafRange = TypeTreeLeafTypeRange::get (op->get (), getRootAddress ());
2454+ if (!leafRange) {
2455+ LLVM_DEBUG (llvm::dbgs () << " Failed to compute leaf range!\n " );
2456+ return false ;
2457+ }
2458+
2459+ useState.recordLivenessUse (user, *leafRange);
2460+ return true ;
2461+ }
2462+
24522463 // If we don't fit into any of those categories, just track as a liveness
24532464 // use. We assume all such uses must only be reads to the memory. So we assert
24542465 // 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