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(
20542054 // Exactly one visited pred. Copy the LiveOut from that pred into BB LiveIn.
20552055 if (VisitedPreds.size () == 1 ) {
20562056 const BlockInfo &PredLiveOut = LiveOut.find (VisitedPreds[0 ])->second ;
2057- auto CurrentLiveInEntry = LiveIn.find (&BB);
20582057
20592058 // Check if there isn't an entry, or there is but the LiveIn set has
20602059 // 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 ) {
20642064 CurrentLiveInEntry->second = PredLiveOut;
2065- else
2066- return /* Changed */ false ;
2067- return /* Changed*/ true ;
2065+ return /* Changed */ true ;
2066+ }
2067+ return /* Changed*/ false ;
20682068 }
20692069
20702070 // More than one pred. Join LiveOuts of blocks 1 and 2.
You can’t perform that action at this time.
0 commit comments