[StaticAnalyzer] Completely unrolling specific loops with known bound option
authorPeter Szecsi <szepet95@gmail.com>
Tue, 25 Jul 2017 19:23:23 +0000 (19:23 +0000)
committerPeter Szecsi <szepet95@gmail.com>
Tue, 25 Jul 2017 19:23:23 +0000 (19:23 +0000)
commit657ac14816febccd38c00c192ce18142d518210d
treea772964a1ad5dd57db8557e44841d20271aa708e
parentadfe5368ee1ab6ae658356a68432bbc88360f1e0
[StaticAnalyzer] Completely unrolling specific loops with known bound option

This feature allows the analyzer to consider loops to completely unroll.
New requirements/rules (for unrolling) can be added easily via ASTMatchers.

Right now it is hidden behind a flag, the aim is to find the correct heuristic
and create a solution which results higher coverage % and more precise
analysis, thus can be enabled by default.

Right now the blocks which belong to an unrolled loop are marked by the
LoopVisitor which adds them to the ProgramState.
Then whenever we encounter a CFGBlock in the processCFGBlockEntrance which is
marked then we skip its investigating. That means, it won't be considered to
be visited more than the maximal bound for visiting since it won't be checked.

llvm-svn: 309006
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h [new file with mode: 0644]
clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
clang/lib/StaticAnalyzer/Core/CMakeLists.txt
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp [new file with mode: 0644]
clang/test/Analysis/analyzer-config.c
clang/test/Analysis/analyzer-config.cpp
clang/test/Analysis/loop-unrolling.cpp [new file with mode: 0644]