[PATCH] D111550: [TwoAddressInstruction] Don't run machine verification on unclean targets
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 07:42:47 PDT 2021
foad created this revision.
Herald added subscribers: mstorsjo, hiraditya.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When -early-live-intervals is used, TwoAddressInstruction runs some
extra ad hoc machine verification, but it does this even for targets
that are marked as "not machine verifier clean". Fix this so that we
don't get spurious failures that are not related to live intervals.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111550
Files:
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
===================================================================
--- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1656,8 +1656,13 @@
}
}
- if (LIS)
- MF->verify(this, "After two-address instruction pass");
+ // TODO: Remove this ad hoc verification in favor of the usual
+ // -verify-machineinstrs mechanism.
+ if (LIS) {
+ const LLVMTargetMachine &TM = MF->getTarget();
+ if (TM.isMachineVerifierClean())
+ MF->verify(this, "After two-address instruction pass");
+ }
return MadeChange;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111550.378663.patch
Type: text/x-patch
Size: 638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211011/f9e46c3e/attachment.bin>
More information about the llvm-commits
mailing list