summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-28 23:31:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-28 23:31:15 +0000
commitd1bd8fba13c2f3d0b162d979c85a31cdf1080afa (patch)
treec9ff51d911cd0c44de544db1997c8bd17fc7ebc3 /llvm/lib
parent1a0877f99dc8130f3b85ab096bc03059e4c3cd0a (diff)
downloadbcm5719-llvm-d1bd8fba13c2f3d0b162d979c85a31cdf1080afa.tar.gz
bcm5719-llvm-d1bd8fba13c2f3d0b162d979c85a31cdf1080afa.zip
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. llvm-svn: 153614
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp4
-rw-r--r--llvm/lib/CodeGen/Passes.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 0e6120b98cd..74ba94d1fcc 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/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/llvm/lib/CodeGen/Passes.cpp b/llvm/lib/CodeGen/Passes.cpp
index f91798cdfda..4a25af02f05 100644
--- a/llvm/lib/CodeGen/Passes.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud