Use the cached subtarget on the MachineFunction.
authorEric Christopher <echristo@gmail.com>
Mon, 2 Feb 2015 22:40:56 +0000 (22:40 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 2 Feb 2015 22:40:56 +0000 (22:40 +0000)
llvm-svn: 227885

llvm/lib/Target/Hexagon/HexagonPeephole.cpp

index e9b2ef6..afd3a17 100644 (file)
@@ -112,7 +112,7 @@ INITIALIZE_PASS(HexagonPeephole, "hexagon-peephole", "Hexagon Peephole",
 
 bool HexagonPeephole::runOnMachineFunction(MachineFunction &MF) {
   QII = static_cast<const HexagonInstrInfo *>(MF.getSubtarget().getInstrInfo());
-  QRI = MF.getTarget().getSubtarget<HexagonSubtarget>().getRegisterInfo();
+  QRI = MF.getSubtarget<HexagonSubtarget>().getRegisterInfo();
   MRI = &MF.getRegInfo();
 
   DenseMap<unsigned, unsigned> PeepholeMap;