[PATCH] D119436: RFC: RegAlloc: Avoid repeated calls to freezeReservedRegs
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 11 00:18:05 PST 2022
foad updated this revision to Diff 407788.
foad added a comment.
Simplify.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119436/new/
https://reviews.llvm.org/D119436
Files:
llvm/lib/CodeGen/RegAllocBase.cpp
Index: llvm/lib/CodeGen/RegAllocBase.cpp
===================================================================
--- llvm/lib/CodeGen/RegAllocBase.cpp
+++ llvm/lib/CodeGen/RegAllocBase.cpp
@@ -61,7 +61,14 @@
VRM = &vrm;
LIS = &lis;
Matrix = &mat;
+#ifndef NDEBUG
+ BitVector OldReservedRegs(MRI->getReservedRegs());
+#endif
MRI->freezeReservedRegs(vrm.getMachineFunction());
+#ifndef NDEBUG
+ assert(OldReservedRegs == MRI->getReservedRegs() &&
+ "Frozen reserved regs should not have changed!");
+#endif
RegClassInfo.runOnMachineFunction(vrm.getMachineFunction());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119436.407788.patch
Type: text/x-patch
Size: 592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220211/42eea267/attachment.bin>
More information about the llvm-commits
mailing list