From bdc4956bac81a93d541bc2fab0fdcc7ffdeb5cdd Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 12 Jun 2016 15:39:02 +0000 Subject: Pass DebugLoc and SDLoc by const ref. This used to be free, copying and moving DebugLocs became expensive after the metadata rewrite. Passing by reference eliminates a ton of track/untrack operations. No functionality change intended. llvm-svn: 272512 --- llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp') diff --git a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp index 0a84f088e26..76361b85bf4 100644 --- a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp +++ b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp @@ -224,8 +224,8 @@ namespace { private: bool runOnMachineBasicBlock(MachineBasicBlock &MBB); - Iter replaceWithCompactBranch(MachineBasicBlock &MBB, - Iter Branch, DebugLoc DL); + Iter replaceWithCompactBranch(MachineBasicBlock &MBB, Iter Branch, + const DebugLoc &DL); /// This function checks if it is valid to move Candidate to the delay slot /// and returns true if it isn't. It also updates memory and register @@ -529,8 +529,8 @@ getUnderlyingObjects(const MachineInstr &MI, } // Replace Branch with the compact branch instruction. -Iter Filler::replaceWithCompactBranch(MachineBasicBlock &MBB, - Iter Branch, DebugLoc DL) { +Iter Filler::replaceWithCompactBranch(MachineBasicBlock &MBB, Iter Branch, + const DebugLoc &DL) { const MipsSubtarget &STI = MBB.getParent()->getSubtarget(); const MipsInstrInfo *TII = STI.getInstrInfo(); -- cgit v1.2.3