[PATCH] D47155: [analyzer] Reduce simplifySVal complexity threshold further.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 25 15:56:59 PDT 2018


NoQ added a comment.

I only essentially did one optimization - introduce a short path that returns the original value if visiting its sub-values changed nothing, which is a relatively common case. The reason it works though is that `evalBinOp()` will be called later to combine the sub-values, which may in turn call `simplifySVal()` again, which is clearly unwanted.



================
Comment at: test/Analysis/hangs.c:18-30
+void produce_an_exponentially_exploding_symbol(int x, int y) {
+  x += y; y += x + g();
+  x += y; y += x + g();
+  x += y; y += x + g();
+  x += y; y += x + g();
+  x += y; y += x + g();
+  x += y; y += x + g();
----------------
This currently finishes in 1 second on my machine. This test, unlike the original test, is easy to experiment with.


https://reviews.llvm.org/D47155





More information about the cfe-commits mailing list