diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-28 23:31:15 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-28 23:31:15 +0000 |
commit | 78811669d5872b28c447ea9f7cfc3963c7f72841 (patch) | |
tree | 27eb3252a5990ce8ba5a3c35a2827e05f32fe23f | |
parent | 3bb17380b1c87fa23ef9fe208ce6f56d352df611 (diff) | |
download | external_llvm-78811669d5872b28c447ea9f7cfc3963c7f72841.zip external_llvm-78811669d5872b28c447ea9f7cfc3963c7f72841.tar.gz external_llvm-78811669d5872b28c447ea9f7cfc3963c7f72841.tar.bz2 |
Enable machine code verification after PreSched2 passes.
The late scheduler depends on accurate liveness information if it is
breaking anti-dependencies, so we should be able to verify it.
Relax the terminator checking in the machine code verifier so it can
handle the basic blocks created by if conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153614 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineVerifier.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/Passes.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp index 0e6120b..74ba94d 100644 --- a/lib/CodeGen/MachineVerifier.cpp +++ b/lib/CodeGen/MachineVerifier.cpp @@ -609,7 +609,9 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) { } // Ensure non-terminators don't follow terminators. - if (MI->isTerminator()) { + // Ignore predicated terminators formed by if conversion. + // FIXME: If conversion shouldn't need to violate this rule. + if (MI->isTerminator() && !TII->isPredicated(MI)) { if (!FirstTerminator) FirstTerminator = MI; } else if (FirstTerminator) { diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index f91798c..4a25af0 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -398,7 +398,7 @@ void TargetPassConfig::addMachinePasses() { // Run pre-sched2 passes. if (addPreSched2()) - printNoVerify("After PreSched2 passes"); + printAndVerify("After PreSched2 passes"); // Second pass scheduler. if (getOptLevel() != CodeGenOpt::None) { |