Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2054,17 +2054,17 @@ bool AssignmentTrackingLowering::join(
// Exactly one visited pred. Copy the LiveOut from that pred into BB LiveIn.
if (VisitedPreds.size() == 1) {
const BlockInfo &PredLiveOut = LiveOut.find(VisitedPreds[0])->second;
auto CurrentLiveInEntry = LiveIn.find(&BB);

// Check if there isn't an entry, or there is but the LiveIn set has
// changed (expensive check).
if (CurrentLiveInEntry == LiveIn.end())
LiveIn.insert(std::make_pair(&BB, PredLiveOut));
else if (PredLiveOut != CurrentLiveInEntry->second)
auto [CurrentLiveInEntry, Inserted] = LiveIn.try_emplace(&BB, PredLiveOut);
if (Inserted)
return /*Changed*/ true;
if (PredLiveOut != CurrentLiveInEntry->second) {
CurrentLiveInEntry->second = PredLiveOut;
else
return /*Changed*/ false;
return /*Changed*/ true;
return /*Changed*/ true;
}
return /*Changed*/ false;
}

// More than one pred. Join LiveOuts of blocks 1 and 2.
Expand Down