From: Simon Pilgrim Date: Thu, 13 May 2021 12:27:01 +0000 (+0100) Subject: [X86] X86ExpandPseudo.cpp - try to pass DebugLoc by const-ref to avoid costly Trackin... X-Git-Tag: llvmorg-14-init~6811 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba0ec1be2916eae1798ad4c56480f471a65f7ce9;p=platform%2Fupstream%2Fllvm.git [X86] X86ExpandPseudo.cpp - try to pass DebugLoc by const-ref to avoid costly TrackingMDNodeRef copies. NFCI. --- diff --git a/llvm/lib/Target/X86/X86ExpandPseudo.cpp b/llvm/lib/Target/X86/X86ExpandPseudo.cpp index ce794ba..66f92f8 100644 --- a/llvm/lib/Target/X86/X86ExpandPseudo.cpp +++ b/llvm/lib/Target/X86/X86ExpandPseudo.cpp @@ -95,7 +95,7 @@ void X86ExpandPseudo::ExpandICallBranchFunnel( ++InsPt; std::vector> TargetMBBs; - DebugLoc DL = JTInst->getDebugLoc(); + const DebugLoc &DL = JTInst->getDebugLoc(); MachineOperand Selector = JTInst->getOperand(0); const GlobalValue *CombinedGlobal = JTInst->getOperand(1).getGlobal(); @@ -193,7 +193,7 @@ bool X86ExpandPseudo::ExpandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { MachineInstr &MI = *MBBI; unsigned Opcode = MI.getOpcode(); - DebugLoc DL = MBBI->getDebugLoc(); + const DebugLoc &DL = MBBI->getDebugLoc(); switch (Opcode) { default: return false; @@ -546,7 +546,7 @@ void X86ExpandPseudo::ExpandVastartSaveXmmRegs( MachineFunction *Func = EntryBlk->getParent(); const TargetInstrInfo *TII = STI->getInstrInfo(); - DebugLoc DL = VAStartPseudoInstr->getDebugLoc(); + const DebugLoc &DL = VAStartPseudoInstr->getDebugLoc(); Register CountReg = VAStartPseudoInstr->getOperand(0).getReg(); // Calculate liveins for newly created blocks.