aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2020-01-16 14:01:27 +0000
committerJeremy Morse <jeremy.morse@sony.com>2020-01-16 14:01:27 +0000
commitc969335abdb22284691e7cb2894820350cfe422b (patch)
tree56eb2a82d29cc441b3636c6bdfde466a5dbc40d9 /llvm/lib/CodeGen/MachineVerifier.cpp
parentd36b2649e5e4d90a3f439e2a16057cd75566c669 (diff)
downloadllvm-c969335abdb22284691e7cb2894820350cfe422b.zip
llvm-c969335abdb22284691e7cb2894820350cfe422b.tar.gz
llvm-c969335abdb22284691e7cb2894820350cfe422b.tar.bz2
Revert "[PHIEliminate] Move dbg values after phi and label"
Testing compiler-rt, a new assertion failure occurs when building the GwpAsanTestObjects object. I'm uploading a reproducer to D70597. This reverts commit 75188b01e9af3a89639d84be912f84610d6885ba.
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 24fb330..6c0402d 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -273,7 +273,6 @@ namespace {
void markReachable(const MachineBasicBlock *MBB);
void calcRegsPassed();
void checkPHIOps(const MachineBasicBlock &MBB);
- void checkPHIDbg(const MachineBasicBlock &MBB);
void calcRegsRequired();
void verifyLiveVariables();
@@ -2263,31 +2262,11 @@ void MachineVerifier::checkPHIOps(const MachineBasicBlock &MBB) {
}
}
-// Check there must be no DBG_VALUEs between PHIs and LABELs, so that
-// the PHIs could lower after LABELs successfully without dbg barriers.
-void MachineVerifier::checkPHIDbg(const MachineBasicBlock &MBB) {
-
- // Quick exit for basic blocks without PHIs.
- if (MBB.empty() || !MBB.front().isPHI())
- return;
-
- MachineBasicBlock &MBB2 = const_cast<MachineBasicBlock &>(MBB);
- MachineBasicBlock::iterator LastPHIIt =
- std::prev(MBB2.SkipPHIsAndLabels(MBB2.begin()));
- // Backward to skip debug if the lastPHIIt is DBG_VALUE, the LastPHIIt
- // should be the same if no DBG_VALUEs between PHIs and LABELs.
- if (LastPHIIt != skipDebugInstructionsBackward(
- std::prev(MBB2.SkipPHIsLabelsAndDebug(MBB2.begin())), MBB2.begin()))
- report("Unexpected DBG_VALUEs between PHI and LABEL", &MBB2);
-}
-
void MachineVerifier::visitMachineFunctionAfter() {
calcRegsPassed();
- for (const MachineBasicBlock &MBB : *MF) {
+ for (const MachineBasicBlock &MBB : *MF)
checkPHIOps(MBB);
- checkPHIDbg(MBB);
- }
// Now check liveness info if available
calcRegsRequired();