Skip to content

Commit

Permalink
Grab the subtarget and subtarget dependent variables off of
Browse files Browse the repository at this point in the history
MachineFunction rather than TargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219670 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Oct 14, 2014
1 parent 188c856 commit eb271ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 2 additions & 4 deletions lib/CodeGen/PostRASchedulerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
Expand Down Expand Up @@ -199,11 +198,10 @@ SchedulePostRATDList::SchedulePostRATDList(
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs)
: ScheduleDAGInstrs(MF, &MLI, /*IsPostRA=*/true), AA(AA), EndIndex(0) {

const TargetMachine &TM = MF.getTarget();
const InstrItineraryData *InstrItins =
TM.getSubtargetImpl()->getInstrItineraryData();
MF.getSubtarget().getInstrItineraryData();
HazardRec =
TM.getSubtargetImpl()->getInstrInfo()->CreateTargetPostRAHazardRecognizer(
MF.getSubtarget().getInstrInfo()->CreateTargetPostRAHazardRecognizer(
InstrItins, this);

assert((AntiDepMode == TargetSubtargetInfo::ANTIDEP_NONE ||
Expand Down
9 changes: 4 additions & 5 deletions lib/CodeGen/PrologEpilogInserter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,11 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {

void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn,
int &SPAdj) {
const TargetMachine &TM = Fn.getTarget();
assert(TM.getSubtargetImpl()->getRegisterInfo() &&
"TM::getRegisterInfo() must be implemented!");
assert(Fn.getSubtarget().getRegisterInfo() &&
"getRegisterInfo() must be implemented!");
const TargetInstrInfo &TII = *Fn.getSubtarget().getInstrInfo();
const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo();
const TargetFrameLowering *TFI = TM.getSubtargetImpl()->getFrameLowering();
const TargetRegisterInfo &TRI = *Fn.getSubtarget().getRegisterInfo();
const TargetFrameLowering *TFI = Fn.getSubtarget().getFrameLowering();
bool StackGrowsDown =
TFI->getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
int FrameSetupOpcode = TII.getCallFrameSetupOpcode();
Expand Down

0 comments on commit eb271ec

Please sign in to comment.