[llvm] 2875d3d - RegAllocGreedy: Remove an unhelpful auto, and don't use a reference

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 14:25:30 PDT 2021


Author: Matt Arsenault
Date: 2021-09-23T17:25:25-04:00
New Revision: 2875d3d484bb82dcd7f44bccafda8a52aacc328d

URL: https://github.com/llvm/llvm-project/commit/2875d3d484bb82dcd7f44bccafda8a52aacc328d
DIFF: https://github.com/llvm/llvm-project/commit/2875d3d484bb82dcd7f44bccafda8a52aacc328d.diff

LOG: RegAllocGreedy: Remove an unhelpful auto, and don't use a reference

Added: 
    

Modified: 
    llvm/lib/CodeGen/RegAllocGreedy.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index 6646380ba2119..3f58afca47470 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -2133,7 +2133,7 @@ RAGreedy::tryInstructionSplit(LiveInterval &VirtReg, AllocationOrder &Order,
   // the constraints on the virtual register.
   // Otherwise, splitting just inserts uncoalescable copies that do not help
   // the allocation.
-  for (const auto &Use : Uses) {
+  for (const SlotIndex Use : Uses) {
     if (const MachineInstr *MI = Indexes->getInstructionFromIndex(Use))
       if (MI->isFullCopy() ||
           SuperRCNumAllocatableRegs ==


        


More information about the llvm-commits mailing list