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
This commit is contained in:
@@ -247,9 +247,9 @@ void MachineFunction::RenumberBlocks(MachineBasicBlock *MBB) {
|
||||
}
|
||||
|
||||
/// Allocate a new MachineInstr. Use this instead of `new MachineInstr'.
|
||||
MachineInstr *
|
||||
MachineFunction::CreateMachineInstr(const MCInstrDesc &MCID,
|
||||
DebugLoc DL, bool NoImp) {
|
||||
MachineInstr *MachineFunction::CreateMachineInstr(const MCInstrDesc &MCID,
|
||||
const DebugLoc &DL,
|
||||
bool NoImp) {
|
||||
return new (InstructionRecycler.Allocate<MachineInstr>(Allocator))
|
||||
MachineInstr(*this, MCID, DL, NoImp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user