[PATCH] D106823: [analyzer][solver] Iterate to a fixpoint during symbol simplification with constants

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 1 07:57:32 PDT 2021


steakhal added a comment.

I'm gonna get back to this on Monday.



================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1699-1701
+  ProgramStateRef OldState;
+  do {
+    OldState = State;
----------------
IMO we should have a `llvm::Statistic` here, tracking the maximum iteration count to reach the fixed point and an average iteration count.


================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1732
+      if (!State)
+        return false;
+    }
----------------
I'd love to see a coverage report of the tests you add with this patch.


================
Comment at: clang/test/Analysis/expr-inspection-printState-eq-classes.c:11
     return;
-  if (b != 0)
+  if (a != c)
     return;
----------------
Why do you need to change this?


================
Comment at: clang/test/Analysis/symbol-simplification-fixpoint-iteration-unreachable-code.cpp:16
+    return;
+  if (c + b != 0)
+    return;
----------------
Is it important to have this instead of `b + c`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106823/new/

https://reviews.llvm.org/D106823



More information about the cfe-commits mailing list