From d1127baaf9c936305883eac6e16fee7de406c627 Mon Sep 17 00:00:00 2001 From: Artem Dergachev Date: Fri, 18 Oct 2019 20:15:35 +0000 Subject: [PATCH] [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 --- lib/StaticAnalyzer/Core/ExprEngine.cpp | 11 +---------- test/Analysis/dump_egraph.c | 2 ++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 8e4e767209..a148088c2b 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -3083,16 +3083,7 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { Out << "\\l"; // Adds a new-line to the last program point. Indent(Out, Space, IsDot) << "],\\l"; - bool SameAsAllPredecessors = - std::all_of(N->pred_begin(), N->pred_end(), [&](const ExplodedNode *P) { - return P->getState() == State; - }); - - if (!SameAsAllPredecessors) { - State->printDOT(Out, N->getLocationContext(), Space); - } else { - Indent(Out, Space, IsDot) << "\"program_state\": null"; - } + State->printDOT(Out, N->getLocationContext(), Space); Out << "\\l}\\l"; return Out.str(); diff --git a/test/Analysis/dump_egraph.c b/test/Analysis/dump_egraph.c index 94c5fae1c4..e27c63ad49 100644 --- a/test/Analysis/dump_egraph.c +++ b/test/Analysis/dump_egraph.c @@ -48,3 +48,5 @@ int foo() { // CHECK: \"pretty\": \"'\\\\x13'\" // CHECK: \"has_report\": 1 + +// CHECK-NOT: \"program_state\": null -- 2.40.0