[PATCH] D84105: [MachineVerifier] Speed-up verification (up to 10x)
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 09:29:39 PDT 2020
evgeny777 created this revision.
evgeny777 added reviewers: stoklund, dexonsmith, MatzeB, kparzysz, craig.topper.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
Patch lowers verification time for me from 35 seconds to less than 3 seconds
https://reviews.llvm.org/D84105
Files:
llvm/lib/CodeGen/MachineVerifier.cpp
Index: llvm/lib/CodeGen/MachineVerifier.cpp
===================================================================
--- llvm/lib/CodeGen/MachineVerifier.cpp
+++ llvm/lib/CodeGen/MachineVerifier.cpp
@@ -2264,10 +2264,13 @@
}
// Iteratively push vregsPassed to successors.
+ DenseSet<const MachineBasicBlock *> Visited;
while (!RPOWorklist.empty()) {
auto Next = RPOWorklist.begin();
const MachineBasicBlock *MBB = Next->second;
RPOWorklist.erase(Next);
+ if (!Visited.insert(MBB).second)
+ continue;
FilteringVRegSet &MSet = VRegsPassedSets[RPONumbers[MBB]];
for (const MachineBasicBlock *Succ : MBB->successors()) {
if (Succ == MBB)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84105.279011.patch
Type: text/x-patch
Size: 681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200718/55e8f2e5/attachment.bin>
More information about the llvm-commits
mailing list