diff options
author | Kristof Umann <dkszelethus@gmail.com> | 2019-07-03 11:39:12 +0000 |
---|---|---|
committer | Kristof Umann <dkszelethus@gmail.com> | 2019-07-03 11:39:12 +0000 |
commit | 71a9dc39e4faf74eecdcb46f18ca21ee1c41dfe1 (patch) | |
tree | c89ec6c7acc34a9e8dff21e37d54ca86e09f7766 /clang/lib/Analysis | |
parent | 8c099cbe7cc436a2eb61106ff8cabab573378e3d (diff) | |
download | bcm5719-llvm-71a9dc39e4faf74eecdcb46f18ca21ee1c41dfe1.tar.gz bcm5719-llvm-71a9dc39e4faf74eecdcb46f18ca21ee1c41dfe1.zip |
[analyzer][Dominator] Add post dominators to CFG + a new debug checker
Transform clang::DominatorTree to be able to also calculate post dominators.
* Tidy up the documentation
* Make it clang::DominatorTree template class (similarly to how
llvm::DominatorTreeBase works), rename it to clang::CFGDominatorTreeImpl
* Clang's dominator tree is now called clang::CFGDomTree
* Clang's brand new post dominator tree is called clang::CFGPostDomTree
* Add a lot of asserts to the dump() function
* Create a new checker to test the functionality
Differential Revision: https://reviews.llvm.org/D62551
llvm-svn: 365028
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/Dominators.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Analysis/Dominators.cpp b/clang/lib/Analysis/Dominators.cpp index b872869f8cf..a350d4ca18b 100644 --- a/clang/lib/Analysis/Dominators.cpp +++ b/clang/lib/Analysis/Dominators.cpp @@ -10,4 +10,8 @@ using namespace clang; -void DominatorTree::anchor() {} +template <> +void CFGDominatorTreeImpl</*IsPostDom=*/true>::anchor() {} + +template <> +void CFGDominatorTreeImpl</*IsPostDom=*/false>::anchor() {} |