[llvm] 4fb31e4 - AMDGPU: Use const reference for DebugLoc

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 3 22:57:02 PST 2025


Author: Matt Arsenault
Date: 2025-03-04T13:56:52+07:00
New Revision: 4fb31e44017bd9ad914fc4c814fbaa60cc18d5b4

URL: https://github.com/llvm/llvm-project/commit/4fb31e44017bd9ad914fc4c814fbaa60cc18d5b4
DIFF: https://github.com/llvm/llvm-project/commit/4fb31e44017bd9ad914fc4c814fbaa60cc18d5b4.diff

LOG: AMDGPU: Use const reference for DebugLoc

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 0face8108d249..e1fb4c9db0a84 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5879,7 +5879,7 @@ unsigned SIInstrInfo::buildExtractSubReg(
     return RI.getSubReg(SuperReg.getReg(), SubIdx);
 
   MachineBasicBlock *MBB = MI->getParent();
-  DebugLoc DL = MI->getDebugLoc();
+  const DebugLoc &DL = MI->getDebugLoc();
   Register SubReg = MRI.createVirtualRegister(SubRC);
 
   unsigned NewSubIdx = RI.composeSubRegIndices(SuperReg.getSubReg(), SubIdx);


        


More information about the llvm-commits mailing list