Skip to content

Commit

Permalink
vISA SWSB refactor: prefer using references with range-based for loop.
Browse files Browse the repository at this point in the history
Prefer using references with range-based for loop when possible.
  • Loading branch information
petechou authored and igcbot committed Aug 2, 2023
1 parent 3137260 commit 4826e8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visa/LocalScheduler/SWSB_G4IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ void SWSB::SWSBGlobalTokenGenerator(PointsToAnalysis &p, LiveGRFBuckets &LB,
For the irreducible flow graph, those optimizations wouldn't be kicked in.
*/
for (G4_BB_SB *bb : BBVector) {
for (auto loop : kernel.fg.getAllNaturalLoops()) {
for (const auto &loop : kernel.fg.getAllNaturalLoops()) {
auto be = loop.first;
auto &bbsInLoop = loop.second;
if (bbsInLoop.count(bb->getBB())) {
Expand Down

0 comments on commit 4826e8f

Please sign in to comment.