forked from OSchip/llvm-project
Get MCSchedModel directly from the subtarget.
Not all targets have itineraries, but the subtarget always has an MCSchedModel. llvm-svn: 165236
This commit is contained in:
parent
8982222917
commit
878d386b9a
|
@ -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>();
|
||||
|
|
Loading…
Reference in New Issue