[PATCH] D49536: [Analyzer] Quick Fix for exponential execution time when simpilifying complex additive expressions
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 19 03:30:28 PDT 2018
baloghadamsoftware created this revision.
baloghadamsoftware added a reviewer: NoQ.
Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, rnkovacs, szepet, xazax.hun, whisperity.
Herald added a reviewer: george.karpenkov.
Patch [[https://reviews.llvm.org/rC329780 | [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option) ]] not only rearranges comparisons but also binary expressions. This latter behavior is not protected by the analyzer option. Hower, since no complexity threshold is enforced to the symbols this may result in exponential execution time if the expressions are too complex: Huge static analysis performance regression for very simple testcase <https://bugs.llvm.org/show_bug.cgi?id=38208> For a quick fix we extended the analyzer option to also cover the additive cases.
This is only a temporary fix, the final solution should be enforcing the complexity threshold to the symbols.
https://reviews.llvm.org/D49536
Files:
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/Analysis/PR38208.c
test/Analysis/constraint_manager_negate_difference.c
test/Analysis/iterator-range.cpp
test/Analysis/plist-macros.cpp
test/Analysis/svalbuilder-rearrange-comparisons.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49536.156225.patch
Type: text/x-patch
Size: 11410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180719/9e76a4d4/attachment-0001.bin>
More information about the cfe-commits
mailing list