Skip to content

Commit

Permalink
[Dominators] Facilitate updates to MachinePostDominatorTree
Browse files Browse the repository at this point in the history
Summary:
Add getBase accessor so that underlying tree can be
manipulated in a similar manner to MachineDominatorTree.

Reviewers: kuhar, arsenm, hliao, nhaehnle

Reviewed By: kuhar

Subscribers: lkail, mgorny, hiraditya, wdng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77967
  • Loading branch information
perlfu committed Apr 19, 2020
1 parent 1586d0d commit ad0d3bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/include/llvm/CodeGen/MachinePostDominators.h
Expand Up @@ -33,6 +33,12 @@ class MachinePostDominatorTree : public MachineFunctionPass {

MachinePostDominatorTree();

PostDomTreeT &getBase() {
if (!PDT)
PDT.reset(new PostDomTreeT());
return *PDT;
}

FunctionPass *createMachinePostDominatorTreePass();

const SmallVectorImpl<MachineBasicBlock *> &getRoots() const {
Expand Down

0 comments on commit ad0d3bb

Please sign in to comment.