]> granicus.if.org Git - clang/commit
[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)
commitdeada24dc0a86d17b03a53e437069e60756c8656
treea60de79a2a459a098e04bdcfa7df10cc9fa204e8
parent0b2316f96840ee3bb7eb296e2f052ac3f7609c30
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309006 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h [new file with mode: 0644]
lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/CMakeLists.txt
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/LoopUnrolling.cpp [new file with mode: 0644]
test/Analysis/analyzer-config.c
test/Analysis/analyzer-config.cpp
test/Analysis/loop-unrolling.cpp [new file with mode: 0644]