Extend the applyUpdates in DominatorTree to allow a post CFG view,
different from the current CFG.
This patch implements the functionality of updating an already up to
date DT, to the desired PostCFGView.
Combining a set of updates towards an up to date DT and a PostCFGView is
not yet supported.
Details
- Reviewers
kuhar - Commits
- rGf55ad3973dec: [DomTree] Extend update API to allow a post CFG view.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm inclined to change the API to pass a second vector of updates instead of the GraphDiff directly (for the PostView), since during updates the GD gets modified and it makes sense to keep it as an internal component. Thoughts?
This makes sense to me. I think the only missing piece is some documentation which also explains how to interpret when PostView is missing (PostView == nullptr ===> Current CFG is the implicit PostView?)
llvm/include/llvm/Support/GenericDomTree.h | ||
---|---|---|
542–547 | Can you update the comment? | |
553 | nit: early return and not else? |
I made the update to keep the creation of the GD object internal to the DT. Since the GD is modified during updates, this makes the most sense to me.
I split the API to take only Updates or Updates+PostViewUpdates.
llvm/include/llvm/Support/GenericDomTreeConstruction.h | ||
---|---|---|
567 | nit: would it be possible to give it a more descriptive name? I have no idea what L stands for |
llvm/include/llvm/Support/GenericDomTreeConstruction.h | ||
---|---|---|
567 | Good point, it was meant to be L for Local :-) |
Can you update the comment?