[llvm-branch-commits] [llvm] [AMDGPU] Disable RA local reassignment for functions with excess pressure (PR #240582)
Brendon Cahoon via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Nov 12 07:51:18 PST 2026
================
@@ -463,6 +463,14 @@ bool GCNSubtarget::hasMadF16() const {
return InstrInfo.pseudoToMCOpcode(AMDGPU::V_MAD_F16_e64) != -1;
}
+// canReassign() walks the whole allocation order of the evictee on every
+// local eviction query. When the function is expected to spill, the register
+// file is full, so the walk rarely finds a free register and becomes very
+// expensive.
+bool GCNSubtarget::enableRALocalReassignment(const MachineFunction &MF) const {
+ return !MF.getInfo<SIMachineFunctionInfo>()->hasExcessRegPressure();
+}
----------------
bcahoon wrote:
I think we're going to abandon this PR in favor of a different approach. Most likely trying to improve the caching PR https://github.com/llvm/llvm-project/pull/235096 to do something that less complex. But, agreed, there are alternatives that can help address other targets that might have a similar issue.
https://github.com/llvm/llvm-project/pull/240582
More information about the llvm-branch-commits
mailing list