[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300178: [analyzer] Simplify values in binary operations a bit more aggressively. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D31886?vs=94955&id=95084#toc Repository: rL

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D31886#724796, @xazax.hun wrote: > maybe we want to skip this kind of simplification in case of Z3? Hmm, that depends on how would we want to use it eventually. - If Z3 acts all alone and fires only over actual bug reports, then yeah, it turns

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. One last question: maybe we want to skip this kind of simplification in case of Z3? Probably the constraint managers could have a flag like "wantsSimplifiedConstraints"? Maybe somehow the checkers that are doing their own simplification could respect this flag as well

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LGTM! Thank you for working on this! https://reviews.llvm.org/D31886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 94955. NoQ marked 5 inline comments as done. NoQ added a comment. Thanks for the comments! Updated. Performance didn't degrade in my test runs. https://reviews.llvm.org/D31886 Files: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h lib/StaticA

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-12 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:49 + /// Recursively descends into symbolic expressions and replaces symbols + /// with thier known values (in the sense of the getKnownValue() method). + SVal simplifySVal(Program

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. This is a very welcome addition. I hope the performance will be still good :) Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1023 + +SVal VisitSymIntExpr(const SymIntExpr *S) { + SValBuilder &SVB = State->getStateManager().getSValB

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. SValBuilder tries to constant-fold symbols in the left-hand side of the symbolic expression whenever it fails to evaluate the expression directly. However, it only constant-folds them when they are atomic expressions, not when they are complicated expressions themselv