[llvm] f045d0c - [NFC][ScheduleDAG] Use a reference to iterate over NodeSuccs/ChainSuccs

Pavel Samolysov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 05:55:14 PDT 2022


Author: Pavel Samolysov
Date: 2022-09-12T15:54:48+03:00
New Revision: f045d0c3921e99e306738115574ea2ace34b9043

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

LOG: [NFC][ScheduleDAG] Use a reference to iterate over NodeSuccs/ChainSuccs

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 04a8b4d3b42e..6b12e9da76d7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -1089,7 +1089,7 @@ SUnit *ScheduleDAGRRList::TryUnfoldSU(SUnit *SU) {
     RemovePred(SU, Pred);
     AddPredQueued(NewSU, Pred);
   }
-  for (SDep D : NodeSuccs) {
+  for (SDep &D : NodeSuccs) {
     SUnit *SuccDep = D.getSUnit();
     D.setSUnit(SU);
     RemovePred(SuccDep, D);
@@ -1100,7 +1100,7 @@ SUnit *ScheduleDAGRRList::TryUnfoldSU(SUnit *SU) {
         !D.isCtrl() && NewSU->NumRegDefsLeft > 0)
       --NewSU->NumRegDefsLeft;
   }
-  for (SDep D : ChainSuccs) {
+  for (SDep &D : ChainSuccs) {
     SUnit *SuccDep = D.getSUnit();
     D.setSUnit(SU);
     RemovePred(SuccDep, D);


        


More information about the llvm-commits mailing list