diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-12 15:39:02 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-12 15:39:02 +0000 |
commit | bdc4956bac81a93d541bc2fab0fdcc7ffdeb5cdd (patch) | |
tree | 61f67bbd45f92949e27d34efcead9e0e16d5dfea /llvm/lib/Target/Sparc/SparcRegisterInfo.cpp | |
parent | 977530a8c9e3e201f8094df9ab2306b1e699d821 (diff) | |
download | bcm5719-llvm-bdc4956bac81a93d541bc2fab0fdcc7ffdeb5cdd.tar.gz bcm5719-llvm-bdc4956bac81a93d541bc2fab0fdcc7ffdeb5cdd.zip |
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
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcRegisterInfo.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp b/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp index da31783ba24..37a1fdf4d77 100644 --- a/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp @@ -105,13 +105,9 @@ SparcRegisterInfo::getPointerRegClass(const MachineFunction &MF, return Subtarget.is64Bit() ? &SP::I64RegsRegClass : &SP::IntRegsRegClass; } -static void replaceFI(MachineFunction &MF, - MachineBasicBlock::iterator II, - MachineInstr &MI, - DebugLoc dl, - unsigned FIOperandNum, int Offset, - unsigned FramePtr) -{ +static void replaceFI(MachineFunction &MF, MachineBasicBlock::iterator II, + MachineInstr &MI, const DebugLoc &dl, + unsigned FIOperandNum, int Offset, unsigned FramePtr) { // Replace frame index with a frame pointer reference. if (Offset >= -4096 && Offset <= 4095) { // If the offset is small enough to fit in the immediate field, directly |