Skip to content

Commit

Permalink
enable IndVarSimplification pass
Browse files Browse the repository at this point in the history
enable IndVarSimplification pass
  • Loading branch information
pkwasnie-intel authored and igcbot committed Dec 2, 2024
1 parent 194a999 commit 0c75e42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,8 @@ void OptimizeIR(CodeGenContext* const pContext)

mpm.add(createIGCInstructionCombiningPass());

if (IGC_IS_FLAG_ENABLED(EnableIndVarSimplification))
if (IGC_IS_FLAG_ENABLED(EnableIndVarSimplification) &&
pContext->type == ShaderType::OPENCL_SHADER)
{
mpm.add(llvm::createIndVarSimplifyPass());
}
Expand Down
2 changes: 1 addition & 1 deletion IGC/common/igc_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ DECLARE_IGC_REGKEY(bool, DisableIRVerification, false, "Setting this to
DECLARE_IGC_REGKEY(bool, EnableJumpThreading, true, "Setting this to 1/true adds a compiler switch to enable llvm jumpThreading pass.", true)
DECLARE_IGC_REGKEY(bool, DisableLoopUnroll, false, "Setting this to 1/true adds a compiler switch to disable loop unrolling.", true)
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)
DECLARE_IGC_REGKEY(bool, EnableIndVarSimplification, false, "Enables IndVarSimplification pass.", true)
DECLARE_IGC_REGKEY(bool, EnableIndVarSimplification, true, "Enables IndVarSimplification pass.", true)
DECLARE_IGC_REGKEY(bool, DisableBranchSwaping, false, "Setting this to 1/true adds a compiler switch to disable branch swapping.", false)
DECLARE_IGC_REGKEY(bool, DisableSynchronizationObjectCoalescingPass, false, "Disable SynchronizationObjectCoalescing pass", false)
DECLARE_IGC_REGKEY(bool, EnableIndependentSharedMemoryFenceFunctionality, false, "Enable treating global memory fences as shared memory fences in SynchronizationObjectCoalescing pass", false)
Expand Down

0 comments on commit 0c75e42

Please sign in to comment.