[PATCH] D129201: [MachineVerifier] Try harder to verify SlotIndexes
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 06:59:56 PDT 2022
foad created this revision.
Herald added subscribers: kosarev, arphaman, hiraditya, tpr.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Verify the SlotIndexes analysis after a pass that claims to preserve it,
even if there are no further passes (apart from the verifier itself)
that would use the analysis.
FIXME: CodeGen/AMDGPU/si-lower-control-flow.mir fails with:
- Bad machine code: Instruction index out of order ***
perhaps because SILowerControlFlow::emitEndCf misuses
LiveIntervals::handleMove to handle an instruction that has moved into a
different basic block.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129201
Files:
llvm/lib/CodeGen/MachineVerifier.cpp
Index: llvm/lib/CodeGen/MachineVerifier.cpp
===================================================================
--- llvm/lib/CodeGen/MachineVerifier.cpp
+++ llvm/lib/CodeGen/MachineVerifier.cpp
@@ -293,6 +293,7 @@
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.addUsedIfAvailable<SlotIndexes>();
AU.setPreservesAll();
MachineFunctionPass::getAnalysisUsage(AU);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129201.442556.patch
Type: text/x-patch
Size: 419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220706/8de067d2/attachment.bin>
More information about the llvm-commits
mailing list