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
10 changes: 4 additions & 6 deletions llvm/lib/Passes/StandardInstrumentations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2001,14 +2001,12 @@ DotCfgDiff::DotCfgDiff(StringRef Title, const FuncDataT<DCData> &Before,
for (auto &A : After.getData()) {
StringRef Label = A.getKey();
const BlockDataT<DCData> &BD = A.getValue();
unsigned C = NodePosition.count(Label);
if (C == 0)
auto It = NodePosition.find(Label);
if (It == NodePosition.end())
// This only exists in the after IR. Create the node.
createNode(Label, BD, AfterColour);
else {
assert(C == 1 && "Unexpected multiple nodes.");
Nodes[NodePosition[Label]].setCommon(BD);
}
else
Nodes[It->second].setCommon(BD);
// Add in the edges between the nodes (as common or only in after).
for (StringMap<std::string>::const_iterator Sink = BD.getData().begin(),
E = BD.getData().end();
Expand Down