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
This commit is contained in:
Jakob Stoklund Olesen 2012-03-28 23:31:15 +00:00
parent 591cf2fd07
commit 4b4ee58c4c
2 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {