diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-10-04 17:30:43 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-10-04 17:30:43 +0000 |
commit | 878d386b9a1d7d0c235c41aa5a5d30045aada2ab (patch) | |
tree | e586150cf63f961eaea7081baa6b3b26c0a5b1f8 /llvm/lib/CodeGen | |
parent | 8982222917ff80707b8ffea0b44d1488e8ec7018 (diff) | |
download | bcm5719-llvm-878d386b9a1d7d0c235c41aa5a5d30045aada2ab.tar.gz bcm5719-llvm-878d386b9a1d7d0c235c41aa5a5d30045aada2ab.zip |
Get MCSchedModel directly from the subtarget.
Not all targets have itineraries, but the subtarget always has an
MCSchedModel.
llvm-svn: 165236
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/EarlyIfConversion.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp index c40c5acf118..7f28828a5d2 100644 --- a/llvm/lib/CodeGen/EarlyIfConversion.cpp +++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp @@ -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 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) { << "********** 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>(); |