Skip to content

Commit b3e34e0

Browse files
committed
[analyzer] Drop the logic for collapsing the state if it's same as in preds.
One of the first attempts to reduce the size of the exploded graph dumps was to skip the state dump as long as the state is the same as in all of the predecessor nodes. With all the new facilities in place (node joining, diff dumps), this feature doesn't do much, and when it does, it's more harmful than useful. Let's remove it. llvm-svn: 375280
1 parent d93b810 commit b3e34e0

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

clang/lib/StaticAnalyzer/Core/ExprEngine.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,16 +3083,7 @@ struct DOTGraphTraits<ExplodedGraph*> : public DefaultDOTGraphTraits {
30833083
Out << "\\l"; // Adds a new-line to the last program point.
30843084
Indent(Out, Space, IsDot) << "],\\l";
30853085

3086-
bool SameAsAllPredecessors =
3087-
std::all_of(N->pred_begin(), N->pred_end(), [&](const ExplodedNode *P) {
3088-
return P->getState() == State;
3089-
});
3090-
3091-
if (!SameAsAllPredecessors) {
3092-
State->printDOT(Out, N->getLocationContext(), Space);
3093-
} else {
3094-
Indent(Out, Space, IsDot) << "\"program_state\": null";
3095-
}
3086+
State->printDOT(Out, N->getLocationContext(), Space);
30963087

30973088
Out << "\\l}\\l";
30983089
return Out.str();

clang/test/Analysis/dump_egraph.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ int foo() {
4848
// CHECK: \"pretty\": \"'\\\\x13'\"
4949

5050
// CHECK: \"has_report\": 1
51+
52+
// CHECK-NOT: \"program_state\": null

0 commit comments

Comments
 (0)