[llvm] 8e42024 - [X86] Ensure we pass DebugLoc by const reference where possible. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 7 04:33:13 PDT 2021
Author: Simon Pilgrim
Date: 2021-05-07T12:32:59+01:00
New Revision: 8e42024f79997827cefe00d31cd3bc55d1551fec
URL: https://github.com/llvm/llvm-project/commit/8e42024f79997827cefe00d31cd3bc55d1551fec
DIFF: https://github.com/llvm/llvm-project/commit/8e42024f79997827cefe00d31cd3bc55d1551fec.diff
LOG: [X86] Ensure we pass DebugLoc by const reference where possible. NFCI.
Avoids a lot of unnecessary tracking increments/decrements of the underlying TrackingMDNodeRef
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3b89f383416c..72bba619fb2d 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -32281,7 +32281,7 @@ static MachineInstrBuilder createPHIsForCMOVsInSinkBB(
MachineBasicBlock *SinkMBB) {
MachineFunction *MF = TrueMBB->getParent();
const TargetInstrInfo *TII = MF->getSubtarget().getInstrInfo();
- DebugLoc DL = MIItBegin->getDebugLoc();
+ const DebugLoc &DL = MIItBegin->getDebugLoc();
X86::CondCode CC = X86::CondCode(MIItBegin->getOperand(3).getImm());
X86::CondCode OppCC = X86::GetOppositeBranchCondition(CC);
@@ -32333,7 +32333,7 @@ X86TargetLowering::EmitLoweredCascadedSelect(MachineInstr &FirstCMOV,
MachineInstr &SecondCascadedCMOV,
MachineBasicBlock *ThisMBB) const {
const TargetInstrInfo *TII = Subtarget.getInstrInfo();
- DebugLoc DL = FirstCMOV.getDebugLoc();
+ const DebugLoc &DL = FirstCMOV.getDebugLoc();
// We lower cascaded CMOVs such as
//
More information about the llvm-commits
mailing list