RegAllocGreedy: Remove an unhelpful auto, and don't use a reference
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 1 Sep 2021 22:31:17 +0000 (18:31 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 23 Sep 2021 21:25:25 +0000 (17:25 -0400)
llvm/lib/CodeGen/RegAllocGreedy.cpp

index 6646380ba2119ab30c1c6b3306a62c2eb617dccd..3f58afca474707f941e1a05eba1e03c628ed2915 100644 (file)
@@ -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 ==