Have MachineFunction cache a pointer to the subtarget to make lookups
[oota-llvm.git] / lib / Target / AArch64 / AArch64DeadRegisterDefinitionsPass.cpp
index 0c9b2ae0928958879546badc6c84410b5c815b5c..5174c62a916439bc58d9b33c40378289e7a1001f 100644 (file)
@@ -120,7 +120,7 @@ bool AArch64DeadRegisterDefinitions::processMachineBasicBlock(
 // Scan the function for instructions that have a dead definition of a
 // register. Replace that register with the zero register when possible.
 bool AArch64DeadRegisterDefinitions::runOnMachineFunction(MachineFunction &MF) {
-  TRI = MF.getTarget().getSubtargetImpl()->getRegisterInfo();
+  TRI = MF.getSubtarget().getRegisterInfo();
   bool Changed = false;
   DEBUG(dbgs() << "***** AArch64DeadRegisterDefinitions *****\n");