From 8fbfc59164b37f27854e3283c7c8812c8154f942 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 2 Apr 2013 18:26:45 +0000 Subject: Don't attempt MTM heuristics without a scheduling model present. This should fix the PPC buildbots. llvm-svn: 178558 --- llvm/lib/CodeGen/EarlyIfConversion.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/EarlyIfConversion.cpp') diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp index 5447df09cbb..fc767362be7 100644 --- a/llvm/lib/CodeGen/EarlyIfConversion.cpp +++ b/llvm/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); -- cgit v1.2.3