From fc6de428c8ab10330e1b00c6541503cfd98a9cca Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 5 Aug 2014 02:39:49 +0000 Subject: 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 --- llvm/lib/Target/PowerPC/PPCBranchSelector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Target/PowerPC/PPCBranchSelector.cpp') diff --git a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp index 3dd19d03e8b..41594be42ec 100644 --- a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp +++ b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp @@ -64,8 +64,8 @@ FunctionPass *llvm::createPPCBranchSelectionPass() { } bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) { - const PPCInstrInfo *TII = static_cast( - Fn.getTarget().getSubtargetImpl()->getInstrInfo()); + const PPCInstrInfo *TII = + static_cast(Fn.getSubtarget().getInstrInfo()); // Give the blocks of the function a dense, in-order, numbering. Fn.RenumberBlocks(); BlockSizes.resize(Fn.getNumBlockIDs()); -- cgit v1.2.3