[PATCH] D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 21 15:52:44 PDT 2023
sammccall created this revision.
Herald added subscribers: martong, xazax.hun.
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.
With -dataflow-log=/dir we will write /dir/0.html etc for each
function analyzed.
These files show the function's code and CFG, and the path through
the CFG taken by the analysis. At each analysis point we can see the
lattice state.
Currently the lattice state dump is not terribly useful but we can
improve this: showing values associated with the current Expr,
simplifying flow condition, highlighting changes etc.
(Trying not to let this patch scope-creep too much, so I ripped out the
half-finished features)
Demo: https://htmlpreview.github.io/?https://gist.githubusercontent.com/sam-mccall/1746985bf13406bd19181af281aea9ff/raw/841ffc924b4b3c73c70b8f7b0c11d23b1479b61c/analysis.html
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146591
Files:
clang/include/clang/Analysis/FlowSensitive/Logger.h
clang/lib/Analysis/FlowSensitive/CMakeLists.txt
clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
clang/lib/Analysis/FlowSensitive/HTMLLogger.css
clang/lib/Analysis/FlowSensitive/HTMLLogger.js
clang/lib/Analysis/FlowSensitive/bundle_resources.py
clang/unittests/Analysis/FlowSensitive/LoggerTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146591.507167.patch
Type: text/x-patch
Size: 34317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230321/403bb1fa/attachment-0001.bin>
More information about the cfe-commits
mailing list