forked from OSchip/llvm-project
[NFC][MachineInstr] Pass-by-value DebugLoc in CreateMachineInstr
DebugLoc is cheap to move, passing it by-val rather than const ref to take advantage of the fact that it is consumed that way by the MachineInstr ctor, which creates some optimization oportunities. Differential Revision: https://reviews.llvm.org/D115208
This commit is contained in:
parent
02095f2dd7
commit
2bd7384d3a
|
@ -890,7 +890,7 @@ public:
|
|||
|
||||
/// CreateMachineInstr - Allocate a new MachineInstr. Use this instead
|
||||
/// of `new MachineInstr'.
|
||||
MachineInstr *CreateMachineInstr(const MCInstrDesc &MCID, const DebugLoc &DL,
|
||||
MachineInstr *CreateMachineInstr(const MCInstrDesc &MCID, DebugLoc DL,
|
||||
bool NoImplicit = false);
|
||||
|
||||
/// Create a new MachineInstr which is a copy of \p Orig, identical in all
|
||||
|
|
|
@ -350,10 +350,10 @@ void MachineFunction::assignBeginEndSections() {
|
|||
|
||||
/// Allocate a new MachineInstr. Use this instead of `new MachineInstr'.
|
||||
MachineInstr *MachineFunction::CreateMachineInstr(const MCInstrDesc &MCID,
|
||||
const DebugLoc &DL,
|
||||
DebugLoc DL,
|
||||
bool NoImplicit) {
|
||||
return new (InstructionRecycler.Allocate<MachineInstr>(Allocator))
|
||||
MachineInstr(*this, MCID, DL, NoImplicit);
|
||||
MachineInstr(*this, MCID, std::move(DL), NoImplicit);
|
||||
}
|
||||
|
||||
/// Create a new MachineInstr which is a copy of the 'Orig' instruction,
|
||||
|
|
Loading…
Reference in New Issue