[PATCH] D144730: [FlowSensitive][WIP] log analysis progress for debugging purposes
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 24 05:50:14 PST 2023
sammccall created this revision.
Herald added a subscriber: wenlei.
Herald added a reviewer: NoQ.
Herald added a project: All.
sammccall requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This is just a draft and a starting point, and needs more design & tests.
The goal is to be able to understand how the analysis executes, and what its
incremental and final findings are, by enabling logging and reading the logs.
This should include what the framework does, what the
Ad-hoc printf-debugging doesn't seem sufficient for my understanding, at least.
Being able to check in logging, turn it on in a production binary, and quickly
find particular analysis steps within complex functions seem important.
Important missing pieces here:
- a logger implementation that produces an interactive report (HTML file) which can be navigated via timeline/code/CFG. (I think the Logger interface is sufficient for this, but need to prototype).
- display of the application-specific lattice
- more useful display for the built-in environment (e.g. meaningful & consistent names for values, hiding redundant variables in the flow condition, hiding unreachable expressions)
This patch also contains a trivial standalone analyzer binary using libTooling.
This is not strictly related, but I think useful for exploratory reasons.
At least it belongs in a separate patch.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144730
Files:
clang/examples/CMakeLists.txt
clang/examples/FlowSensitiveAnalysis/CMakeLists.txt
clang/examples/FlowSensitiveAnalysis/SampleAnalysis.cpp
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
clang/include/clang/Analysis/FlowSensitive/Logger.h
clang/lib/Analysis/FlowSensitive/CMakeLists.txt
clang/lib/Analysis/FlowSensitive/Logger.cpp
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144730.500165.patch
Type: text/x-patch
Size: 17240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230224/414dab46/attachment-0001.bin>
More information about the cfe-commits
mailing list