[PATCH] D146735: [CodeGen] Don't include aliases in RegisterClassInfo::IgnoreCSRForAllocOrder
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 09:50:03 PDT 2023
foad created this revision.
foad added reviewers: qcolombet, MatzeB, Srividya-Karumuri.
Herald added subscribers: kosarev, jeroen.dobbelaere, StephenFan, hiraditya, tpr.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Previously we called ignoreCSRForAllocationOrder on every alias of every
CSR which was expensive on targets like AMDGPU which define a very large
number of overlapping register tuples.
No functional change intended, but I can't verify that because this code
does not appear to be used by any in-tree targets anyway.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146735
Files:
llvm/lib/CodeGen/RegisterClassInfo.cpp
Index: llvm/lib/CodeGen/RegisterClassInfo.cpp
===================================================================
--- llvm/lib/CodeGen/RegisterClassInfo.cpp
+++ llvm/lib/CodeGen/RegisterClassInfo.cpp
@@ -94,8 +94,7 @@
// if ignoreCSRForAllocationOrder is evaluated differently.
BitVector CSRHintsForAllocOrder(TRI->getNumRegs());
for (const MCPhysReg *I = CSR; *I; ++I)
- for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI)
- CSRHintsForAllocOrder[*AI] = STI.ignoreCSRForAllocationOrder(mf, *AI);
+ CSRHintsForAllocOrder[*I] = STI.ignoreCSRForAllocationOrder(mf, *I);
if (IgnoreCSRForAllocOrder.size() != CSRHintsForAllocOrder.size() ||
IgnoreCSRForAllocOrder != CSRHintsForAllocOrder) {
Update = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146735.507780.patch
Type: text/x-patch
Size: 749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/d92add47/attachment.bin>
More information about the llvm-commits
mailing list