]> granicus.if.org Git - clang/commitdiff
[analyzer] Drop the logic for collapsing the state if it's same as in preds.
authorArtem Dergachev <artem.dergachev@gmail.com>
Fri, 18 Oct 2019 20:15:35 +0000 (20:15 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Fri, 18 Oct 2019 20:15:35 +0000 (20:15 +0000)
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
test/Analysis/dump_egraph.c

index 8e4e767209e297ec1c1f403aa71bc6c1a1824e3e..a148088c2b4b78a08b6f4abdbea13616f698d195 100644 (file)
@@ -3083,16 +3083,7 @@ struct DOTGraphTraits<ExplodedGraph*> : 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();
index 94c5fae1c4e22692b43855b6e59b9db518812eba..e27c63ad49be84df10a04b05a2be23a288ca084b 100644 (file)
@@ -48,3 +48,5 @@ int foo() {
 // CHECK: \"pretty\": \"'\\\\x13'\"
 
 // CHECK: \"has_report\": 1
+
+// CHECK-NOT: \"program_state\": null