From edaf656d5e17799208118069e8b64ee286621f2c Mon Sep 17 00:00:00 2001 From: Akshat Oke Date: Wed, 9 Jul 2025 14:52:58 +0530 Subject: [CodeGen][NPM] Differentiate pipeline-required and opt-required passes (#135752) "Required" passes relate to actually running the pass on the IR, regardless of whether they are in the pipeline. CGPassBuilder was mistakenly still adding them to the pipeline. The test `llc -stop-after=greedy -enable-new-pm` would still add `greedy` to the pipeline otherwise. --- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp') diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp index 64c4e5d6a22b..92d378e01bcb 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -2147,7 +2147,8 @@ void AMDGPUCodeGenPassBuilder::addPreISel(AddIRPass &addPass) const { // FIXME: Why isn't this queried as required from AMDGPUISelDAGToDAG, and why // isn't this in addInstSelector? - addPass(RequireAnalysisPass()); + addPass(RequireAnalysisPass(), + /*Force=*/true); } void AMDGPUCodeGenPassBuilder::addILPOpts(AddMachinePass &addPass) const { -- cgit v1.2.3