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
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
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
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
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
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
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
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