File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -878,14 +878,11 @@ void SIScheduleBlockCreator::colorAccordingToReservedDependencies() {
878
878
SUColors.first = CurrentTopDownReservedDependencyColoring[SU.NodeNum ];
879
879
SUColors.second = CurrentBottomUpReservedDependencyColoring[SU.NodeNum ];
880
880
881
- std::map<std::pair<unsigned , unsigned >, unsigned >::iterator Pos =
882
- ColorCombinations.find (SUColors);
883
- if (Pos != ColorCombinations.end ()) {
884
- CurrentColoring[SU.NodeNum ] = Pos->second ;
885
- } else {
886
- CurrentColoring[SU.NodeNum ] = NextNonReservedID;
887
- ColorCombinations[SUColors] = NextNonReservedID++;
888
- }
881
+ auto [Pos, Inserted] =
882
+ ColorCombinations.try_emplace (SUColors, NextNonReservedID);
883
+ CurrentColoring[SU.NodeNum ] = Pos->second ;
884
+ if (Inserted)
885
+ NextNonReservedID++;
889
886
}
890
887
}
891
888
You can’t perform that action at this time.
0 commit comments