[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 17:55:05 PDT 2022


ymandel created this revision.
ymandel added reviewers: xazax.hun, samestep, sgatev, gribozavr.
Herald added subscribers: martong, tschuett, rnkovacs.
Herald added a reviewer: NoQ.
Herald added a project: All.
ymandel requested review of this revision.
Herald added a project: clang.

This patch modifies context-sensitive analysis of functions to use a cache,
rather than recreate the `ControlFlowContext` from a function decl on each
encounter. However, this is just step 1 (of N) in adding support for a
configurable map of "modeled" function decls. The map will go from the actual
function decl to the `ControlFlowContext` used to model it. Only functions
pre-configured in the map will be modeled in a context-sensitive way.

We start with a cache because it introduces the desired map, while retaining the
current behavior. Here, functions are mapped to their actual implementations
(when available).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131039

Files:
  clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h
  clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
  clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
  clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
  clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp
  clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
  clang/lib/Analysis/FlowSensitive/Transfer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131039.449501.patch
Type: text/x-patch
Size: 8501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220803/c2322d4b/attachment-0001.bin>


More information about the cfe-commits mailing list