diff options
author | Eric Christopher <echristo@gmail.com> | 2014-08-05 02:39:49 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-08-05 02:39:49 +0000 |
commit | fc6de428c8ab10330e1b00c6541503cfd98a9cca (patch) | |
tree | a2f2e256682f7ec9c6affef81490a88327f6844c /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 5beccb22bc151a6711e28a893ed1446ccae7ba13 (diff) | |
download | bcm5719-llvm-fc6de428c8ab10330e1b00c6541503cfd98a9cca.tar.gz bcm5719-llvm-fc6de428c8ab10330e1b00c6541503cfd98a9cca.zip |
Have MachineFunction cache a pointer to the subtarget to make lookups
shorter/easier and have the DAG use that to do the same lookup. This
can be used in the future for TargetMachine based caching lookups from
the MachineFunction easily.
Update the MIPS subtarget switching machinery to update this pointer
at the same time it runs.
llvm-svn: 214838
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 5b21d32f537..f89879dd33b 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -699,7 +699,7 @@ bool LDVImpl::runOnMachineFunction(MachineFunction &mf) { MF = &mf; LIS = &pass.getAnalysis<LiveIntervals>(); MDT = &pass.getAnalysis<MachineDominatorTree>(); - TRI = mf.getTarget().getSubtargetImpl()->getRegisterInfo(); + TRI = mf.getSubtarget().getRegisterInfo(); LS.initialize(mf); DEBUG(dbgs() << "********** COMPUTING LIVE DEBUG VARIABLES: " << mf.getName() << " **********\n"); @@ -994,8 +994,7 @@ void LDVImpl::emitDebugValues(VirtRegMap *VRM) { DEBUG(dbgs() << "********** EMITTING LIVE DEBUG VARIABLES **********\n"); if (!MF) return; - const TargetInstrInfo *TII = - MF->getTarget().getSubtargetImpl()->getInstrInfo(); + const TargetInstrInfo *TII = MF->getSubtarget().getInstrInfo(); for (unsigned i = 0, e = userValues.size(); i != e; ++i) { DEBUG(userValues[i]->print(dbgs(), &MF->getTarget())); userValues[i]->rewriteLocations(*VRM, *TRI); |