[PATCH] D77341: [DomTree] Replace ChildrenGetter with GraphTraits over GraphDiff.
Alina Sbirlea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 16:17:50 PDT 2020
asbirlea created this revision.
asbirlea added reviewers: kuhar, dblaikie, NutshellySima.
Herald added subscribers: cfe-commits, hiraditya.
Herald added a project: clang.
asbirlea added a comment.
asbirlea added a parent revision: D77167: [GraphDiff] Extend GraphDiff to track a list of updates..
I sent this out to get some general feedback, but I'd like to be able to simplify the fact that this is replacing a `for` over `ChildrenGetter` with a `for` over `children<type>(pair)`, plus 5 lines to set up the type and pair; one simplification is around getting the type inside `children` (`GraphDiffBBPair`) and another around having the BUI or not; for the latter I'm considering updating a few places such that BUI is never nullptr.
This replaces the ChildrenGetter inside the DominatorTree with
GraphTraits over a GraphDiff object, an object which encapsulated the
view of the previous CFG.
This also simplifies the extentions in clang which use DominatorTree, as
GraphDiff also filters nullptrs.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77341
Files:
clang/include/clang/Analysis/Analyses/Dominators.h
llvm/include/llvm/IR/CFGDiff.h
llvm/include/llvm/IR/Dominators.h
llvm/include/llvm/Support/GenericDomTree.h
llvm/include/llvm/Support/GenericDomTreeConstruction.h
llvm/lib/IR/Dominators.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77341.254638.patch
Type: text/x-patch
Size: 24726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200402/36938409/attachment-0001.bin>
More information about the cfe-commits
mailing list