[llvm-commits] [llvm] r165236 - /llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Oct 4 10:30:43 PDT 2012


Author: stoklund
Date: Thu Oct  4 12:30:43 2012
New Revision: 165236

URL: http://llvm.org/viewvc/llvm-project?rev=165236&view=rev
Log:
Get MCSchedModel directly from the subtarget.

Not all targets have itineraries, but the subtarget always has an
MCSchedModel.

Modified:
    llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp

Modified: llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp?rev=165236&r1=165235&r2=165236&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp Thu Oct  4 12:30:43 2012
@@ -31,9 +31,9 @@
 #include "llvm/CodeGen/MachineLoopInfo.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/CodeGen/Passes.h"
-#include "llvm/MC/MCInstrItineraries.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/Target/TargetSubtargetInfo.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
@@ -777,7 +777,8 @@
                << "********** Function: " << MF.getName() << '\n');
   TII = MF.getTarget().getInstrInfo();
   TRI = MF.getTarget().getRegisterInfo();
-  SchedModel = MF.getTarget().getInstrItineraryData()->SchedModel;
+  SchedModel =
+    MF.getTarget().getSubtarget<TargetSubtargetInfo>().getSchedModel();
   MRI = &MF.getRegInfo();
   DomTree = &getAnalysis<MachineDominatorTree>();
   Loops = getAnalysisIfAvailable<MachineLoopInfo>();





More information about the llvm-commits mailing list