[all-commits] [llvm/llvm-project] 01ccf7: Revert "Revert "[clang][dataflow] Only model struc...
Yitzhak Mandelbaum via All-commits
all-commits at lists.llvm.org
Mon Jan 9 11:32:26 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 01ccf7b3cee58dbe02fd97696cae1781746b6137
https://github.com/llvm/llvm-project/commit/01ccf7b3cee58dbe02fd97696cae1781746b6137
Author: Yitzhak Mandelbaum <yitzhakm at google.com>
Date: 2023-01-09 (Mon, 09 Jan 2023)
Changed paths:
M clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
M clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
M clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
M clang/lib/Analysis/FlowSensitive/Transfer.cpp
M clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
M clang/unittests/Analysis/FlowSensitive/TestingSupport.h
M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
Log Message:
-----------
Revert "Revert "[clang][dataflow] Only model struct fields that are used in the function being analyzed.""
This reverts commit 2b1a517a92bfdfa3b692a660e19a2bb22513a567. It's a fix forward
with two memory errors fixed, one of which was the cause of the build breakage
in the buildbots.
Original message:
Previously, the model for structs modeled all fields in a struct when
`createValue` was called for that type. This patch adds a prepass on the
function under analysis to discover the fields referenced in the scope and then
limits modeling to only those fields. This reduces wasted memory usage
(modeling unused fields) which can be important for programs that use large
structs.
Note: This patch obviates the need for https://reviews.llvm.org/D123032.
More information about the All-commits
mailing list