Skip to content

Commit

Permalink
Have MachineInstrBundle use the MachineFunction for subtarget
Browse files Browse the repository at this point in the history
access rather than the TargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219662 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Oct 14, 2014
1 parent 3788687 commit c026db7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/CodeGen/MachineInstrBundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB,
assert(FirstMI != LastMI && "Empty bundle?");
MIBundleBuilder Bundle(MBB, FirstMI, LastMI);

const TargetMachine &TM = MBB.getParent()->getTarget();
const TargetInstrInfo *TII = TM.getSubtargetImpl()->getInstrInfo();
const TargetRegisterInfo *TRI = TM.getSubtargetImpl()->getRegisterInfo();
MachineFunction &MF = *MBB.getParent();
const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();

MachineInstrBuilder MIB = BuildMI(*MBB.getParent(), FirstMI->getDebugLoc(),
TII->get(TargetOpcode::BUNDLE));
MachineInstrBuilder MIB =
BuildMI(MF, FirstMI->getDebugLoc(), TII->get(TargetOpcode::BUNDLE));
Bundle.prepend(MIB);

SmallVector<unsigned, 32> LocalDefs;
Expand Down

0 comments on commit c026db7

Please sign in to comment.