Skip to content

Commit af4fb17

Browse files
pkwasnie-inteligcbot
authored andcommitted
enable IndVarSimplification pass
enable IndVarSimplification pass
1 parent 5ecca96 commit af4fb17

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,8 @@ void OptimizeIR(CodeGenContext* const pContext)
15421542

15431543
mpm.add(createIGCInstructionCombiningPass());
15441544

1545-
if (IGC_IS_FLAG_ENABLED(EnableIndVarSimplification))
1545+
if (IGC_IS_FLAG_ENABLED(EnableIndVarSimplification) &&
1546+
pContext->type == ShaderType::OPENCL_SHADER)
15461547
{
15471548
mpm.add(llvm::createIndVarSimplifyPass());
15481549
}

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ DECLARE_IGC_REGKEY(bool, DisableIRVerification, false, "Setting this to
210210
DECLARE_IGC_REGKEY(bool, EnableJumpThreading, true, "Setting this to 1/true adds a compiler switch to enable llvm jumpThreading pass.", true)
211211
DECLARE_IGC_REGKEY(bool, DisableLoopUnroll, false, "Setting this to 1/true adds a compiler switch to disable loop unrolling.", true)
212212
DECLARE_IGC_REGKEY(DWORD, RuntimeLoopUnrolling, 0, "Setting this to switch on/off runtime loop unrolling. 0: default (on), 1: force on, 2: force off", false)
213-
DECLARE_IGC_REGKEY(bool, EnableIndVarSimplification, false, "Enables IndVarSimplification pass.", true)
213+
DECLARE_IGC_REGKEY(bool, EnableIndVarSimplification, true, "Enables IndVarSimplification pass.", true)
214214
DECLARE_IGC_REGKEY(bool, DisableBranchSwaping, false, "Setting this to 1/true adds a compiler switch to disable branch swapping.", false)
215215
DECLARE_IGC_REGKEY(bool, DisableSynchronizationObjectCoalescingPass, false, "Disable SynchronizationObjectCoalescing pass", false)
216216
DECLARE_IGC_REGKEY(bool, EnableIndependentSharedMemoryFenceFunctionality, false, "Enable treating global memory fences as shared memory fences in SynchronizationObjectCoalescing pass", false)

0 commit comments

Comments
 (0)