diff options
author | Jay Foad <jay.foad@amd.com> | 2021-10-15 11:26:48 +0100 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2021-10-18 10:26:46 +0100 |
commit | 36deb9a670d06fc254df2f357ae595fb8f817d07 (patch) | |
tree | 9e64e18edb754282b8cd716dacd80283fad55cb8 /llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | |
parent | d869921004526e804f344936d671a994852ab4d2 (diff) | |
download | llvm-36deb9a670d06fc254df2f357ae595fb8f817d07.zip llvm-36deb9a670d06fc254df2f357ae595fb8f817d07.tar.gz llvm-36deb9a670d06fc254df2f357ae595fb8f817d07.tar.bz2 |
Add new MachineFunction property FailsVerification
TargetPassConfig::addPass takes a "bool verifyAfter" argument which lets
you skip machine verification after a particular pass. Unfortunately
this is used in generic code in TargetPassConfig itself to skip
verification after a generic pass, only because some previous target-
specific pass damaged the MIR on that specific target. This is bad
because problems in one target cause lack of verification for all
targets.
This patch replaces that mechanism with a new MachineFunction property
called "FailsVerification" which can be set by (usually target-specific)
passes that are known to introduce problems. Later passes can reset it
again if they are known to clean up the previous problems.
Differential Revision: https://reviews.llvm.org/D111397
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp index 55917f1..509d83d 100644 --- a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp +++ b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp @@ -794,6 +794,10 @@ bool SILowerControlFlow::removeMBBifRedundant(MachineBasicBlock &MBB) { } bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) { + // FIXME: This pass causes verification failures. + MF.getProperties().set( + MachineFunctionProperties::Property::FailsVerification); + const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>(); TII = ST.getInstrInfo(); TRI = &TII->getRegisterInfo(); |