[llvm] r178558 - Don't attempt MTM heuristics without a scheduling model present.

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Apr 2 11:26:45 PDT 2013


Author: stoklund
Date: Tue Apr  2 13:26:45 2013
New Revision: 178558

URL: http://llvm.org/viewvc/llvm-project?rev=178558&view=rev
Log:
Don't attempt MTM heuristics without a scheduling model present.

This should fix the PPC buildbots.

Modified:
    llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
    llvm/trunk/test/CodeGen/X86/early-ifcvt-crash.ll

Modified: llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp?rev=178558&r1=178557&r2=178558&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp Tue Apr  2 13:26:45 2013
@@ -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);
 

Modified: llvm/trunk/test/CodeGen/X86/early-ifcvt-crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/early-ifcvt-crash.ll?rev=178558&r1=178557&r2=178558&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/early-ifcvt-crash.ll (original)
+++ llvm/trunk/test/CodeGen/X86/early-ifcvt-crash.ll Tue Apr  2 13:26:45 2013
@@ -1,5 +1,7 @@
 ; RUN: llc < %s -x86-early-ifcvt -verify-machineinstrs
 ; RUN: llc < %s -x86-early-ifcvt -stress-early-ifcvt -verify-machineinstrs
+; CPU without a scheduling model:
+; RUN: llc < %s -x86-early-ifcvt -mcpu=pentium3 -verify-machineinstrs
 ;
 ; Run these tests with and without -stress-early-ifcvt to exercise heuristics.
 ;





More information about the llvm-commits mailing list