[all-commits] [llvm/llvm-project] 692e03: [clang][dataflow] Add cache of `ControlFlowContext...
Yitzhak Mandelbaum via All-commits
all-commits at lists.llvm.org
Wed Aug 3 08:20:40 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 692e03039d1ee57c06c0cfae68b91bc5bfd99f6e
https://github.com/llvm/llvm-project/commit/692e03039d1ee57c06c0cfae68b91bc5bfd99f6e
Author: Yitzhak Mandelbaum <yitzhakm at google.com>
Date: 2022-08-03 (Wed, 03 Aug 2022)
Changed paths:
M clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h
M clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
M clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
M clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp
M clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
M clang/lib/Analysis/FlowSensitive/Transfer.cpp
Log Message:
-----------
[clang][dataflow] Add cache of `ControlFlowContext`s for function decls.
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 (see issue #56879). 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).
Differential Revision: https://reviews.llvm.org/D131039
More information about the All-commits
mailing list