Skip to content

Commit 7710a72

Browse files
pkwasnie-inteligcbot
authored andcommitted
GEPLoopStrengthReduction pass - rerun register pressure
estimation for function Rerun liveness analysis for whole function.
1 parent 2f02cb9 commit 7710a72

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

IGC/Compiler/Optimizer/OpenCLPasses/GEPLoopStrengthReduction/GEPLoopStrengthReduction.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ class RegisterPressureTracker
334334

335335
// Keep track what new instructions inserted by SCEV Expander were already added to estimation.
336336
SmallPtrSet<Instruction*, 32> VisitedNewInsts;
337+
338+
// If true, always updates all BBs.
339+
bool refreshAllBBs = true;
337340
};
338341

339342

@@ -1116,6 +1119,14 @@ bool RegisterPressureTracker::fitsPressureThreshold(ReductionCandidateGroup &C)
11161119

11171120
void RegisterPressureTracker::updatePressure(ReductionCandidateGroup &C, SCEVExpander &E)
11181121
{
1122+
if (refreshAllBBs)
1123+
{
1124+
BBsToUpdate.clear();
1125+
Function *F = C.getLoop()->getLoopPreheader()->getParent();
1126+
RPE.rerunLivenessAnalysis(*F);
1127+
return;
1128+
}
1129+
11191130
// Refresh all BBs in loop.
11201131
BBsToUpdate.insert(C.getLoop()->getBlocks().begin(), C.getLoop()->getBlocks().end());
11211132

0 commit comments

Comments
 (0)