[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 7 04:47:24 PST 2017
xazax.hun created this revision.
Herald added a subscriber: mgorny.
This patch adds support for naive cross translational unit analysis.
The aim of this patch is to be minimal to enable the development of the feature on the top of tree. This patch should be an NFC in case XTUDir is not provided by the user.
When XTUDir is provided:
- In case a function definition is not available it will be looked up from a textual index, whether it was available in another TU.
- The AST dump of the other TU will be loaded and the function definition will be inlined.
One of the main limitations is that the coverage pattern of the analysis will change when this feature is enabled. For this reason in the future it might be better to include some heuristics to prefer examining shorter execution paths to the longer ones. Until than this feature is not recommended to be turned on by users unless they already fixed the important issues with this feature turned off.
We will cover more detailed analysis of this patch soon in our EuroLLVM talk: http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#7
We will talk about how this works and the memory usage, analysis time, coverage pattern change, limitations of the ASTImporter, how the length of the bugpaths changed and a lot more.
Feel free to skip the review after the talk, but we wanted to make the code available in an easy to review format before the conference.
Repository:
rL LLVM
https://reviews.llvm.org/D30691
Files:
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
include/clang/AST/Mangle.h
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lib/AST/ASTContext.cpp
lib/AST/ASTImporter.cpp
lib/AST/ItaniumMangle.cpp
lib/Basic/SourceManager.cpp
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/CMakeLists.txt
lib/StaticAnalyzer/Core/CallEvent.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
test/Analysis/Inputs/externalFnMap.txt
test/Analysis/Inputs/xtu-chain.cpp
test/Analysis/Inputs/xtu-other.cpp
test/Analysis/xtu-main.cpp
tools/CMakeLists.txt
tools/clang-cmdline-arch-extractor/CMakeLists.txt
tools/clang-cmdline-arch-extractor/ClangCmdlineArchExtractor.cpp
tools/clang-func-mapping/CMakeLists.txt
tools/clang-func-mapping/ClangFnMapGen.cpp
tools/scan-build-py/libscanbuild/runner.py
tools/xtu-analysis/xtu-analyze.py
tools/xtu-analysis/xtu-build.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30691.90833.patch
Type: text/x-patch
Size: 66556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170307/377a30ce/attachment-0001.bin>
More information about the cfe-commits
mailing list