aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-02 18:26:45 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-02 18:26:45 +0000
commit423d6744123e4886f9f79f6273fa345b9cce51a8 (patch)
tree2ec927ae3d7c19664d409b9a27beab5aa1318816 /lib/CodeGen
parent8396e130427999c57422e52af3913eb8182847e5 (diff)
Don't attempt MTM heuristics without a scheduling model present.
This should fix the PPC buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/EarlyIfConversion.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/EarlyIfConversion.cpp b/lib/CodeGen/EarlyIfConversion.cpp
index 5447df09cb..fc767362be 100644
--- a/lib/CodeGen/EarlyIfConversion.cpp
+++ b/lib/CodeGen/EarlyIfConversion.cpp
@@ -677,6 +677,10 @@ bool EarlyIfConverter::shouldConvertIf() {
if (Stress)
return true;
+ // Without a scheduling model, we can't make decisions.
+ if (!SchedModel->hasInstrSchedModel())
+ return false;
+
if (!MinInstr)
MinInstr = Traces->getEnsemble(MachineTraceMetrics::TS_MinInstrCount);