RegAllocGreedy: Don't use Register reference
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 10 Mar 2023 12:56:51 +0000 (08:56 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Fri, 17 Mar 2023 19:22:13 +0000 (15:22 -0400)
llvm/lib/CodeGen/RegAllocGreedy.cpp

index b43a4d2..a9c85e5 100644 (file)
@@ -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);