Skip to content

Commit

Permalink
Enable MergeAllocas pass for compute only
Browse files Browse the repository at this point in the history
The MergeAllocas was enabled for 3D pipeline as well but it was
itended only for compute.
  • Loading branch information
stefan-il authored and igcbot committed Feb 11, 2025
1 parent ac49833 commit 33c1455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void AddAnalysisPasses(CodeGenContext& ctx, IGCPassManager& mpm)
}
}
mpm.add(createPromoteMemoryToRegisterPass());
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory))
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory) && ctx.type == ShaderType::OPENCL_SHADER)
{
mpm.add(createMergeAllocas());
}
Expand Down Expand Up @@ -710,7 +710,7 @@ void AddLegalizationPasses(CodeGenContext& ctx, IGCPassManager& mpm, PSSignature
if (!(IGC_IS_FLAG_ENABLED(EnableUnmaskedFunctions) &&
IGC_IS_FLAG_ENABLED(LateInlineUnmaskedFunc)))
{
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory))
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory) && ctx.type == ShaderType::OPENCL_SHADER)
{
mpm.add(createMergeAllocas());
}
Expand Down

0 comments on commit 33c1455

Please sign in to comment.