From 3ae1be773c8702337412123885f0911d36fe5fdd Mon Sep 17 00:00:00 2001 From: Artem Gindinson Date: Tue, 17 Dec 2024 16:15:03 +0000 Subject: [PATCH] Disable `TrivialLocalMemoryOpsElimination` pass from the pipeline The pass runs into multiple edge-case issues with aliased (and even direct) SLM accesses. Originally implemented within commit ac8f9d5, no clear performance benefit could be identified as of today. --- IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp | 1 - IGC/Compiler/CustomSafeOptPass.hpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp b/IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp index 70d7b74f0495..98c18a11a55a 100644 --- a/IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp +++ b/IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp @@ -1852,7 +1852,6 @@ void OptimizeIR(CodeGenContext* const pContext) mpm.add(createSROAPass()); } - mpm.add(new TrivialLocalMemoryOpsElimination()); if (pContext->type == ShaderType::COMPUTE_SHADER && (IGC_IS_FLAG_ENABLED(RemoveUnusedTGMFence) || pContext->getModuleMetaData()->enableRemoveUnusedTGMFence)) diff --git a/IGC/Compiler/CustomSafeOptPass.hpp b/IGC/Compiler/CustomSafeOptPass.hpp index 20e3c2850a40..ee11e5a1add9 100644 --- a/IGC/Compiler/CustomSafeOptPass.hpp +++ b/IGC/Compiler/CustomSafeOptPass.hpp @@ -108,6 +108,7 @@ namespace IGC llvm::Value* analyzeTreeForTrunc64bto32b(const llvm::Use& OperandUse, llvm::SmallVector& OpsToDelete); }; + // TODO: Remove this pass as unused class TrivialLocalMemoryOpsElimination : public llvm::FunctionPass, public llvm::InstVisitor { public: