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/RegisterClassInfo.cpp | |
parent | 5beccb22bc151a6711e28a893ed1446ccae7ba13 (diff) | |
download | llvm-fc6de428c8ab10330e1b00c6541503cfd98a9cca.zip llvm-fc6de428c8ab10330e1b00c6541503cfd98a9cca.tar.gz llvm-fc6de428c8ab10330e1b00c6541503cfd98a9cca.tar.bz2 |
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/RegisterClassInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterClassInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegisterClassInfo.cpp b/llvm/lib/CodeGen/RegisterClassInfo.cpp index 795dee2..9f4cd17 100644 --- a/llvm/lib/CodeGen/RegisterClassInfo.cpp +++ b/llvm/lib/CodeGen/RegisterClassInfo.cpp @@ -38,8 +38,8 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) { MF = &mf; // Allocate new array the first time we see a new target. - if (MF->getTarget().getSubtargetImpl()->getRegisterInfo() != TRI) { - TRI = MF->getTarget().getSubtargetImpl()->getRegisterInfo(); + if (MF->getSubtarget().getRegisterInfo() != TRI) { + TRI = MF->getSubtarget().getRegisterInfo(); RegClass.reset(new RCInfo[TRI->getNumRegClasses()]); unsigned NumPSets = TRI->getNumRegPressureSets(); PSetLimits.reset(new unsigned[NumPSets]); |