Cache the TargetLowering info object as a pointer.

Caching it as a pointer allows us to reset it if the TargetMachine object
changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183361 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-06-06 00:43:09 +00:00
parent f2d03d74ff
commit 6a2e7ac0b6
17 changed files with 80 additions and 81 deletions
@@ -42,11 +42,11 @@ static cl::opt<signed> RegPressureThreshold(
ResourcePriorityQueue::ResourcePriorityQueue(SelectionDAGISel *IS) :
Picker(this),
InstrItins(IS->getTargetLowering().getTargetMachine().getInstrItineraryData())
InstrItins(IS->getTargetLowering()->getTargetMachine().getInstrItineraryData())
{
TII = IS->getTargetLowering().getTargetMachine().getInstrInfo();
TRI = IS->getTargetLowering().getTargetMachine().getRegisterInfo();
TLI = &IS->getTargetLowering();
TII = IS->getTargetLowering()->getTargetMachine().getInstrInfo();
TRI = IS->getTargetLowering()->getTargetMachine().getRegisterInfo();
TLI = IS->getTargetLowering();
const TargetMachine &tm = (*IS->MF).getTarget();
ResourcesModel = tm.getInstrInfo()->CreateTargetScheduleState(&tm,NULL);