Skip to content

Commit 2c37305

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 36cd3f0: Enable Loop unrolling protmotion for Alloc for some
platforms Enable Loop unrolling protmotion for Alloc after platforms
1 parent e146785 commit 2c37305

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

IGC/Compiler/GenTTI.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ void GenIntrinsicsTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
318318
// It can potentially do some global cost estimations.
319319
const unsigned UnrollMaxCountForAlloca = IGC_GET_FLAG_VALUE(PromoteLoopUnrollwithAllocaCountThreshold);
320320
bool AllocaFound = false;
321-
if (MaxTripCount && MaxTripCount <= UnrollMaxCountForAlloca &&
322-
IGC_IS_FLAG_ENABLED(EnablePromoteLoopUnrollwithAlloca)) {
321+
if (MaxTripCount && MaxTripCount <= UnrollMaxCountForAlloca ) {
323322
unsigned int ThresholdBoost = 0;
324323
for (auto BB : L->blocks()) {
325324
for (auto &I : *BB) {
@@ -363,8 +362,8 @@ void GenIntrinsicsTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
363362
UP.UpperBound = true;
364363
UP.Force = UnrollLoopForCodeSizeOnly ? false : true;
365364

366-
if (ctx->type != ShaderType::OPENCL_SHADER &&
367-
ctx->platform.GetProductFamily() >= IGFX_BMG) {
365+
if (IGC_IS_FLAG_ENABLED(EnablePromoteLoopUnrollwithAlloca) &&
366+
ctx->type != ShaderType::OPENCL_SHADER) {
368367
UP.Threshold += ThresholdBoost;
369368
LLVM_DEBUG(dbgs() << "Increasing L:" << L->getName() << " threshold to " << UP.Threshold
370369
<< " due to Alloca accessed by:");

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ DECLARE_IGC_REGKEY(DWORD, SetLoopUnrollMaxPercentThresholdBoostForHighRegPressur
449449
"The LLVM internal value is 400.",
450450
false)
451451
DECLARE_IGC_REGKEY(
452-
bool, EnablePromoteLoopUnrollwithAlloca, true,
452+
bool, EnablePromoteLoopUnrollwithAlloca, false,
453453
"Loop cost estimation assumes Load/Store who accesses Alloca with index deductible to loop count having 0 cost. "
454454
"Disable this flag makes them always cost something as well as disables dynamic threshold increase based on the "
455455
"size of alloca and number of GEP to the alloca in the loop, leading to the loop less likely to be unrolled.",

0 commit comments

Comments
 (0)