[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:23:22 PST 2022
foad updated this revision to Diff 407791.
foad marked an inline comment as done.
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,12 @@
VRM = &vrm;
LIS = &lis;
Matrix = &mat;
+#ifndef NDEBUG
+ BitVector OldReservedRegs(MRI->getReservedRegs());
MRI->freezeReservedRegs(vrm.getMachineFunction());
+ 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.407791.patch
Type: text/x-patch
Size: 568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220211/6c8ab350/attachment.bin>
More information about the llvm-commits
mailing list