File tree 1 file changed +11
-0
lines changed
IGC/Compiler/Optimizer/OpenCLPasses/GEPLoopStrengthReduction
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,9 @@ class RegisterPressureTracker
334
334
335
335
// Keep track what new instructions inserted by SCEV Expander were already added to estimation.
336
336
SmallPtrSet<Instruction*, 32 > VisitedNewInsts;
337
+
338
+ // If true, always updates all BBs.
339
+ bool refreshAllBBs = true ;
337
340
};
338
341
339
342
@@ -1116,6 +1119,14 @@ bool RegisterPressureTracker::fitsPressureThreshold(ReductionCandidateGroup &C)
1116
1119
1117
1120
void RegisterPressureTracker::updatePressure (ReductionCandidateGroup &C, SCEVExpander &E)
1118
1121
{
1122
+ if (refreshAllBBs)
1123
+ {
1124
+ BBsToUpdate.clear ();
1125
+ Function *F = C.getLoop ()->getLoopPreheader ()->getParent ();
1126
+ RPE.rerunLivenessAnalysis (*F);
1127
+ return ;
1128
+ }
1129
+
1119
1130
// Refresh all BBs in loop.
1120
1131
BBsToUpdate.insert (C.getLoop ()->getBlocks ().begin (), C.getLoop ()->getBlocks ().end ());
1121
1132
You can’t perform that action at this time.
0 commit comments