projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't attempt MTM heuristics without a scheduling model present.
[oota-llvm.git]
/
lib
/
CodeGen
/
EarlyIfConversion.cpp
diff --git
a/lib/CodeGen/EarlyIfConversion.cpp
b/lib/CodeGen/EarlyIfConversion.cpp
index 5447df09cbb27fff34c34f1bee0dd3f9d0789cb4..fc767362be75a334958e2bed51f0d57c2554d76d 100644
(file)
--- 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);