Skip to content

Commit 45b61d1

Browse files
author
Joe Shajrawi
committed
[LICM] Only add dynamic begin_access checks to the list of access scopes to be analyzed
This should provide slight compile-time improvement
1 parent 22d411c commit 45b61d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SILOptimizer/LoopTransforms/LICM.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,9 @@ void LoopTreeOptimization::analyzeCurrentLoop(
654654
case SILInstructionKind::BeginAccessInst: {
655655
auto *BI = dyn_cast<BeginAccessInst>(&Inst);
656656
assert(BI && "Expected a Begin Access");
657-
BeginAccesses.push_back(BI);
657+
if (BI->getEnforcement() == SILAccessEnforcement::Dynamic) {
658+
BeginAccesses.push_back(BI);
659+
}
658660
checkSideEffects(Inst, MayWrites);
659661
break;
660662
}

0 commit comments

Comments
 (0)