forked from OSchip/llvm-project
Grab the subtarget and subtarget dependent variables off of
MachineFunction rather than TargetMachine. llvm-svn: 219670
This commit is contained in:
parent
92b4bcbbee
commit
b66367a891
|
@ -41,7 +41,6 @@
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetLowering.h"
|
#include "llvm/Target/TargetLowering.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
@ -199,11 +198,10 @@ SchedulePostRATDList::SchedulePostRATDList(
|
||||||
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs)
|
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs)
|
||||||
: ScheduleDAGInstrs(MF, &MLI, /*IsPostRA=*/true), AA(AA), EndIndex(0) {
|
: ScheduleDAGInstrs(MF, &MLI, /*IsPostRA=*/true), AA(AA), EndIndex(0) {
|
||||||
|
|
||||||
const TargetMachine &TM = MF.getTarget();
|
|
||||||
const InstrItineraryData *InstrItins =
|
const InstrItineraryData *InstrItins =
|
||||||
TM.getSubtargetImpl()->getInstrItineraryData();
|
MF.getSubtarget().getInstrItineraryData();
|
||||||
HazardRec =
|
HazardRec =
|
||||||
TM.getSubtargetImpl()->getInstrInfo()->CreateTargetPostRAHazardRecognizer(
|
MF.getSubtarget().getInstrInfo()->CreateTargetPostRAHazardRecognizer(
|
||||||
InstrItins, this);
|
InstrItins, this);
|
||||||
|
|
||||||
assert((AntiDepMode == TargetSubtargetInfo::ANTIDEP_NONE ||
|
assert((AntiDepMode == TargetSubtargetInfo::ANTIDEP_NONE ||
|
||||||
|
|
|
@ -738,12 +738,11 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
||||||
|
|
||||||
void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn,
|
void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn,
|
||||||
int &SPAdj) {
|
int &SPAdj) {
|
||||||
const TargetMachine &TM = Fn.getTarget();
|
assert(Fn.getSubtarget().getRegisterInfo() &&
|
||||||
assert(TM.getSubtargetImpl()->getRegisterInfo() &&
|
"getRegisterInfo() must be implemented!");
|
||||||
"TM::getRegisterInfo() must be implemented!");
|
|
||||||
const TargetInstrInfo &TII = *Fn.getSubtarget().getInstrInfo();
|
const TargetInstrInfo &TII = *Fn.getSubtarget().getInstrInfo();
|
||||||
const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo();
|
const TargetRegisterInfo &TRI = *Fn.getSubtarget().getRegisterInfo();
|
||||||
const TargetFrameLowering *TFI = TM.getSubtargetImpl()->getFrameLowering();
|
const TargetFrameLowering *TFI = Fn.getSubtarget().getFrameLowering();
|
||||||
bool StackGrowsDown =
|
bool StackGrowsDown =
|
||||||
TFI->getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
|
TFI->getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
|
||||||
int FrameSetupOpcode = TII.getCallFrameSetupOpcode();
|
int FrameSetupOpcode = TII.getCallFrameSetupOpcode();
|
||||||
|
|
Loading…
Reference in New Issue