Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit d1127ba

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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375280 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f094784 commit d1127ba

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

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();

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)