[llvm] ce6c36b - RegAllocGreedy: Don't use Register reference

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 12:24:32 PDT 2023


Author: Matt Arsenault
Date: 2023-03-17T15:22:13-04:00
New Revision: ce6c36bab5491884991c29bab49bdc7a135d9a8a

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

LOG: RegAllocGreedy: Don't use Register reference

Added: 
    

Modified: 
    llvm/lib/CodeGen/RegAllocGreedy.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index b43a4d2a4b855..a9c85e558bd3c 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -1960,7 +1960,7 @@ unsigned RAGreedy::tryLastChanceRecoloring(const LiveInterval &VirtReg,
     // don't add it to NewVRegs because its physical register will be restored
     // below. Other vregs in CurrentNewVRegs are created by calling
     // selectOrSplit and should be added into NewVRegs.
-    for (Register &R : CurrentNewVRegs) {
+    for (Register R : CurrentNewVRegs) {
       if (RecoloringCandidates.count(&LIS->getInterval(R)))
         continue;
       NewVRegs.push_back(R);


        


More information about the llvm-commits mailing list