File backport-llvm-r210263 of Package llvm
------------------------------------------------------------------------
r210263 | uweigand | 2014-06-05 16:20:10 +0200 (Thu, 05 Jun 2014) | 7 lines
[SystemZ] Do not install IfConverter pass at -O0
When not optimizing, do not run the IfConverter pass, this makes
debugging more difficult (and causes a testsuite failure in
DebugInfo/unconditional-branch.ll).
------------------------------------------------------------------------
Index: lib/Target/SystemZ/SystemZTargetMachine.cpp
===================================================================
--- lib/Target/SystemZ/SystemZTargetMachine.cpp.orig
+++ lib/Target/SystemZ/SystemZTargetMachine.cpp
@@ -65,7 +65,8 @@ bool SystemZPassConfig::addInstSelector(
}
bool SystemZPassConfig::addPreSched2() {
- if (getSystemZTargetMachine().getSubtargetImpl()->hasLoadStoreOnCond())
+ if (getOptLevel() != CodeGenOpt::None &&
+ getSystemZTargetMachine().getSubtargetImpl()->hasLoadStoreOnCond())
addPass(&IfConverterID);
return true;
}