diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-27 06:40:41 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-27 06:40:41 +0000 |
| commit | 3ac9cc615694361653d51148995f1fead69f9487 (patch) | |
| tree | 940feeaeb882518bc7728d0809085607793097c2 /llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp | |
| parent | 0bed1eab3937cc9c78baaef88ae85da9f3f91402 (diff) | |
| download | bcm5719-llvm-3ac9cc615694361653d51148995f1fead69f9487.tar.gz bcm5719-llvm-3ac9cc615694361653d51148995f1fead69f9487.zip | |
CodeGen: Take MachineInstr& in SlotIndexes and LiveIntervals, NFC
Take MachineInstr by reference instead of by pointer in SlotIndexes and
the SlotIndex wrappers in LiveIntervals. The MachineInstrs here are
never null, so this cleans up the API a bit. It also incidentally
removes a few implicit conversions from MachineInstrBundleIterator to
MachineInstr* (see PR26753).
At a couple of call sites it was convenient to convert to a range-based
for loop over MachineBasicBlock::instr_begin/instr_end, so I added
MachineBasicBlock::instrs.
llvm-svn: 262115
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp b/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp index e90dc971a9f..2de8d79512b 100644 --- a/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp +++ b/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp @@ -99,7 +99,7 @@ protected: // %RM<imp-use>; VSLRC:%vreg16,%vreg18,%vreg9 // and we remove: %vreg5<def> = COPY %vreg9; VSLRC:%vreg5,%vreg9 - SlotIndex FMAIdx = LIS->getInstructionIndex(MI); + SlotIndex FMAIdx = LIS->getInstructionIndex(*MI); VNInfo *AddendValNo = LIS->getInterval(MI->getOperand(1).getReg()).Query(FMAIdx).valueIn(); @@ -325,7 +325,7 @@ protected: // Remove the (now unused) copy. DEBUG(dbgs() << " removing: " << *AddendMI << '\n'); - LIS->RemoveMachineInstrFromMaps(AddendMI); + LIS->RemoveMachineInstrFromMaps(*AddendMI); AddendMI->eraseFromParent(); Changed = true; |

