[llvm] r229998 - Get the cached subtarget off the MachineFunction rather than

Eric Christopher echristo at gmail.com
Fri Feb 20 00:24:34 PST 2015


Author: echristo
Date: Fri Feb 20 02:24:34 2015
New Revision: 229998

URL: http://llvm.org/viewvc/llvm-project?rev=229998&view=rev
Log:
Get the cached subtarget off the MachineFunction rather than
inquiring for a new one from the TargetMachine.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td

Modified: llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td?rev=229998&r1=229997&r2=229998&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td Fri Feb 20 02:24:34 2015
@@ -224,7 +224,7 @@ def GPRC : RegisterClass<"PPC", [i32], 3
   // put it at the end of the list.
   let AltOrders = [(add (sub GPRC, R2), R2)];
   let AltOrderSelect = [{
-    const PPCSubtarget &S = MF.getTarget().getSubtarget<PPCSubtarget>();
+    const PPCSubtarget &S = MF.getSubtarget<PPCSubtarget>();
     return S.isPPC64() && S.isSVR4ABI();
   }];
 }
@@ -236,7 +236,7 @@ def G8RC : RegisterClass<"PPC", [i64], 6
   // put it at the end of the list.
   let AltOrders = [(add (sub G8RC, X2), X2)];
   let AltOrderSelect = [{
-    const PPCSubtarget &S = MF.getTarget().getSubtarget<PPCSubtarget>();
+    const PPCSubtarget &S = MF.getSubtarget<PPCSubtarget>();
     return S.isPPC64() && S.isSVR4ABI();
   }];
 }
@@ -249,7 +249,7 @@ def GPRC_NOR0 : RegisterClass<"PPC", [i3
   // put it at the end of the list.
   let AltOrders = [(add (sub GPRC_NOR0, R2), R2)];
   let AltOrderSelect = [{
-    const PPCSubtarget &S = MF.getTarget().getSubtarget<PPCSubtarget>();
+    const PPCSubtarget &S = MF.getSubtarget<PPCSubtarget>();
     return S.isPPC64() && S.isSVR4ABI();
   }];
 }
@@ -259,7 +259,7 @@ def G8RC_NOX0 : RegisterClass<"PPC", [i6
   // put it at the end of the list.
   let AltOrders = [(add (sub G8RC_NOX0, X2), X2)];
   let AltOrderSelect = [{
-    const PPCSubtarget &S = MF.getTarget().getSubtarget<PPCSubtarget>();
+    const PPCSubtarget &S = MF.getSubtarget<PPCSubtarget>();
     return S.isPPC64() && S.isSVR4ABI();
   }];
 }





More information about the llvm-commits mailing list