[llvm] r358910 - Use const DebugLoc&
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 12:14:27 PDT 2019
Author: arsenm
Date: Mon Apr 22 12:14:27 2019
New Revision: 358910
URL: http://llvm.org/viewvc/llvm-project?rev=358910&view=rev
Log:
Use const DebugLoc&
Modified:
llvm/trunk/lib/CodeGen/BranchRelaxation.cpp
Modified: llvm/trunk/lib/CodeGen/BranchRelaxation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchRelaxation.cpp?rev=358910&r1=358909&r2=358910&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchRelaxation.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchRelaxation.cpp Mon Apr 22 12:14:27 2019
@@ -300,7 +300,7 @@ bool BranchRelaxation::isBlockInRange(
/// too far away to fit in its displacement field. It is converted to an inverse
/// conditional branch + an unconditional branch to the destination.
bool BranchRelaxation::fixupConditionalBranch(MachineInstr &MI) {
- DebugLoc DL = MI.getDebugLoc();
+ const DebugLoc &DL = MI.getDebugLoc();
MachineBasicBlock *MBB = MI.getParent();
MachineBasicBlock *TBB = nullptr, *FBB = nullptr;
MachineBasicBlock *NewBB = nullptr;
@@ -468,7 +468,7 @@ bool BranchRelaxation::fixupUnconditiona
MBB->replaceSuccessor(DestBB, BranchBB);
}
- DebugLoc DL = MI.getDebugLoc();
+ const DebugLoc &DL = MI.getDebugLoc();
MI.eraseFromParent();
BlockInfo[BranchBB->getNumber()].Size += TII->insertIndirectBranch(
*BranchBB, *DestBB, DL, DestOffset - SrcOffset, RS.get());
More information about the llvm-commits
mailing list