File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2054,17 +2054,17 @@ bool AssignmentTrackingLowering::join(
2054
2054
// Exactly one visited pred. Copy the LiveOut from that pred into BB LiveIn.
2055
2055
if (VisitedPreds.size () == 1 ) {
2056
2056
const BlockInfo &PredLiveOut = LiveOut.find (VisitedPreds[0 ])->second ;
2057
- auto CurrentLiveInEntry = LiveIn.find (&BB);
2058
2057
2059
2058
// Check if there isn't an entry, or there is but the LiveIn set has
2060
2059
// changed (expensive check).
2061
- if (CurrentLiveInEntry == LiveIn.end ())
2062
- LiveIn.insert (std::make_pair (&BB, PredLiveOut));
2063
- else if (PredLiveOut != CurrentLiveInEntry->second )
2060
+ auto [CurrentLiveInEntry, Inserted] = LiveIn.try_emplace (&BB, PredLiveOut);
2061
+ if (Inserted)
2062
+ return /* Changed*/ true ;
2063
+ if (PredLiveOut != CurrentLiveInEntry->second ) {
2064
2064
CurrentLiveInEntry->second = PredLiveOut;
2065
- else
2066
- return /* Changed */ false ;
2067
- return /* Changed*/ true ;
2065
+ return /* Changed */ true ;
2066
+ }
2067
+ return /* Changed*/ false ;
2068
2068
}
2069
2069
2070
2070
// More than one pred. Join LiveOuts of blocks 1 and 2.
You can’t perform that action at this time.
0 commit comments