[llvm] r227542 - Migrate a bare getSubtarget call to query the MachineFunction

Eric Christopher echristo at gmail.com
Thu Jan 29 17:50:09 PST 2015


Author: echristo
Date: Thu Jan 29 19:50:09 2015
New Revision: 227542

URL: http://llvm.org/viewvc/llvm-project?rev=227542&view=rev
Log:
Migrate a bare getSubtarget call to query the MachineFunction
for the target dependent one.

Modified:
    llvm/trunk/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp?rev=227542&r1=227541&r2=227542&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp Thu Jan 29 19:50:09 2015
@@ -48,9 +48,9 @@ MachineFunctionPass *llvm::createNVPTXPr
 char NVPTXPrologEpilogPass::ID = 0;
 
 bool NVPTXPrologEpilogPass::runOnMachineFunction(MachineFunction &MF) {
-  const TargetMachine &TM = MF.getTarget();
-  const TargetFrameLowering &TFI = *TM.getSubtargetImpl()->getFrameLowering();
-  const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo();
+  const TargetSubtargetInfo &STI = MF.getSubtarget();
+  const TargetFrameLowering &TFI = *STI.getFrameLowering();
+  const TargetRegisterInfo &TRI = *STI.getRegisterInfo();
   bool Modified = false;
 
   calculateFrameObjectOffsets(MF);





More information about the llvm-commits mailing list