Skip to content

Commit 8630b26

Browse files
ichenkaiigcbot
authored andcommitted
Slightly expand part of the promoting loop unrolling with alloca to OCL app
Slightly expand part of the promoting loop unrolling with alloca to OCL app
1 parent 278460e commit 8630b26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

IGC/Compiler/GenTTI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ void GenIntrinsicsTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
377377
if (AllocaFound) {
378378
UP.UpperBound = true;
379379
UP.Force = UnrollLoopForCodeSizeOnly ? false : true;
380+
// LLVM default only to 10, boost to UnrollMaxCountForAlloca
381+
UP.MaxIterationsCountToAnalyze = UnrollMaxCountForAlloca;
380382

381-
if (enablePromoteLoopUnrollwithAlloca()){
382-
// LLVM default only to 10, boost to UnrollMaxCountForAlloca
383-
UP.MaxIterationsCountToAnalyze = UnrollMaxCountForAlloca;
383+
if (enablePromoteLoopUnrollwithAlloca()) {
384384
UP.Threshold += ThresholdBoost;
385385
LLVM_DEBUG(dbgs() << "Increasing L:" << L->getName() << " threshold to " << UP.Threshold
386386
<< " due to Alloca accessed by:");

0 commit comments

Comments
 (0)