[llvm-branch-commits] [llvm] [AMDGPU][NPM] Complete optimized regalloc pipeline (PR #138491)
Akshat Oke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jul 7 23:39:13 PDT 2025
================
@@ -2174,7 +2174,44 @@ void AMDGPUCodeGenPassBuilder::addMachineSSAOptimization(
addPass(SIShrinkInstructionsPass());
}
+void AMDGPUCodeGenPassBuilder::addOptimizedRegAlloc(
+ AddMachinePass &addPass) const {
+ if (EnableDCEInRA)
+ insertPass<DetectDeadLanesPass>(DeadMachineInstructionElimPass());
+
+ // FIXME: when an instruction has a Killed operand, and the instruction is
+ // inside a bundle, seems only the BUNDLE instruction appears as the Kills of
+ // the register in LiveVariables, this would trigger a failure in verifier,
+ // we should fix it and enable the verifier.
+ if (OptVGPRLiveRange)
+ insertPass<RequireAnalysisPass<LiveVariablesAnalysis, MachineFunction>>(
----------------
optimisan wrote:
Since we are moving to the callback style TargetPassBuilder design, I am keeping this the same as legacy.
https://github.com/llvm/llvm-project/pull/138491
More information about the llvm-branch-commits
mailing list