[PATCH] D62619: [analyzer][Dominators] Add a control dependency tree builder + a new debug checker

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 12:20:36 PDT 2019


Szelethus created this revision.
Szelethus added reviewers: kuhar, NoQ, dcoughlin, xazax.hun, rnkovacs, baloghadamsoftware, Charusso.
Szelethus added a project: clang.
Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity.
Szelethus added a parent revision: D62611: [analyzer][Dominators] Add unittests.

Block A is a control dependency of block B, is A dominates B but B doesn't post dominate A.

In detail:

- Create the `CFGControlDependencyTree`, which in fact stores both a dominator and a post dominator tree
- Add the new debug checker `debug.DumpControlDependencies`
- Add both lit and unit tests.

Now I'm not sure whether this is the optimal approach -- In fact I'm fairly certain that this isn't the most efficient way of calculating control dependencies, however, I'm not that concerned with performance just yet. This will be used to improve bug reports the static analyzer emits, and if this turns out to be useful, I might look enhancing this further.


Repository:
  rC Clang

https://reviews.llvm.org/D62619

Files:
  clang/include/clang/Analysis/Analyses/Dominators.h
  clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
  clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
  clang/test/Analysis/domtest.c
  clang/test/Analysis/domtest.cpp
  clang/unittests/Analysis/CFGDominatorTree.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62619.202017.patch
Type: text/x-patch
Size: 12953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190529/cf663fee/attachment-0001.bin>


More information about the cfe-commits mailing list