[PATCH] D85319: [analyzer] Get info from the LLVM IR for precision

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 08:27:52 PDT 2020


martong created this revision.
martong added reviewers: NoQ, Szelethus, balazske, vsavchenko.
Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity, mgorny.
Herald added a project: clang.
martong requested review of this revision.

Access the IR from the components of the Clang Static Analyzer. There are many
important and useful analyses in the LLVM layer that we can use during the path
sensitive analysis. Most notably, the "readnone" and "readonly" function
attributes  which can be used to identify "pure" functions (those without side
effects). Here, I am using the pureness info from the IR to avoid invalidation
of any variables during conservative evaluation (when we evaluate a pure
function).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85319

Files:
  clang/include/clang/CodeGen/CodeGenMangling.h
  clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
  clang/include/clang/StaticAnalyzer/Core/IRContext.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
  clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
  clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
  clang/lib/CodeGen/CMakeLists.txt
  clang/lib/CodeGen/CodeGenMangling.cpp
  clang/lib/StaticAnalyzer/Core/CMakeLists.txt
  clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
  clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
  clang/lib/StaticAnalyzer/Core/IRContext.cpp
  clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
  clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt
  clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
  clang/test/Analysis/analyzer-config.c
  clang/test/Analysis/ctu-different-triples.cpp
  clang/test/Analysis/ircontext.c
  clang/test/Analysis/ircontext.cpp
  clang/unittests/StaticAnalyzer/Reusables.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85319.283252.patch
Type: text/x-patch
Size: 25717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200805/b50e9b73/attachment-0001.bin>


More information about the cfe-commits mailing list