class DominatorTree

Declaration

class DominatorTree : public DominatorTreeBase { /* full declaration omitted */ };

Description

Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree. Definition: A block is said to be forward statically reachable if there is a path from the entry of the function to the block. A statically reachable block may become statically unreachable during optimization. A forward unreachable block may appear in the dominator tree, or it may not. If it does, dominance queries will return results as if all reachable blocks dominate it. When asking for a Node corresponding to a potentially unreachable block, calling code must handle the case where the block was unreachable and the result of getNode() is nullptr. Generally, a block known to be unreachable when the dominator tree is constructed will not be in the tree. One which becomes unreachable after the dominator tree is initially constructed may still exist in the tree, even if the tree is properly updated. Calling code should not rely on the preceding statements; this is stated only to assist human understanding.

Declared at: llvm/include/llvm/IR/Dominators.h:144

Inherits from: DominatorTreeBase

Method Overview

  • public DominatorTree()
  • public DominatorTree(llvm::Function & F)
  • public DominatorTree(llvm::DominatorTree & DT, DomTreeBuilder::BBUpdates U)
  • public bool dominates(const llvm::Instruction * Def, const llvm::Use & U) const
  • public bool dominates(const llvm::Instruction * Def, const llvm::Instruction * User) const
  • public bool dominates(const llvm::Instruction * Def, const llvm::BasicBlock * BB) const
  • public bool dominates(const llvm::BasicBlockEdge & BBE, const llvm::Use & U) const
  • public bool dominates(const llvm::BasicBlockEdge & BBE, const llvm::BasicBlock * BB) const
  • public bool invalidate(llvm::Function & F, const llvm::PreservedAnalyses & PA, FunctionAnalysisManager::Invalidator &)
  • public bool isReachableFromEntry(const llvm::Use & U) const
  • public void viewGraph(const llvm::Twine & Name, const llvm::Twine & Title)
  • public void viewGraph()

Methods

DominatorTree()

Declared at: llvm/include/llvm/IR/Dominators.h:148

DominatorTree(llvm::Function& F)

Declared at: llvm/include/llvm/IR/Dominators.h:149

Parameters

llvm::Function& F

DominatorTree(llvm::DominatorTree& DT,
              DomTreeBuilder::BBUpdates U)

Declared at: llvm/include/llvm/IR/Dominators.h:150

Parameters

llvm::DominatorTree& DT
DomTreeBuilder::BBUpdates U

bool dominates(const llvm::Instruction* Def,
               const llvm::Use& U) const

Description

Return true if Def dominates a use in User. This performs the special checks necessary if Def and User are in the same basic block. Note that Def doesn't dominate a use in Def itself!

Declared at: llvm/include/llvm/IR/Dominators.h:165

Parameters

const llvm::Instruction* Def
const llvm::Use& U

bool dominates(
    const llvm::Instruction* Def,
    const llvm::Instruction* User) const

Declared at: llvm/include/llvm/IR/Dominators.h:166

Parameters

const llvm::Instruction* Def
const llvm::Instruction* User

bool dominates(const llvm::Instruction* Def,
               const llvm::BasicBlock* BB) const

Declared at: llvm/include/llvm/IR/Dominators.h:167

Parameters

const llvm::Instruction* Def
const llvm::BasicBlock* BB

bool dominates(const llvm::BasicBlockEdge& BBE,
               const llvm::Use& U) const

Description

Return true if an edge dominates a use. If BBE is not a unique edge between start and end of the edge, it can never dominate the use.

Declared at: llvm/include/llvm/IR/Dominators.h:173

Parameters

const llvm::BasicBlockEdge& BBE
const llvm::Use& U

bool dominates(const llvm::BasicBlockEdge& BBE,
               const llvm::BasicBlock* BB) const

Declared at: llvm/include/llvm/IR/Dominators.h:174

Parameters

const llvm::BasicBlockEdge& BBE
const llvm::BasicBlock* BB

bool invalidate(
    llvm::Function& F,
    const llvm::PreservedAnalyses& PA,
    FunctionAnalysisManager::Invalidator&)

Description

Handle invalidation explicitly.

Declared at: llvm/include/llvm/IR/Dominators.h:155

Parameters

llvm::Function& F
const llvm::PreservedAnalyses& PA
FunctionAnalysisManager::Invalidator&

bool isReachableFromEntry(
    const llvm::Use& U) const

Description

Provide an overload for a Use.

Declared at: llvm/include/llvm/IR/Dominators.h:180

Parameters

const llvm::Use& U

void viewGraph(const llvm::Twine& Name,
               const llvm::Twine& Title)

Declared at: llvm/include/llvm/IR/Dominators.h:183

Parameters

const llvm::Twine& Name
const llvm::Twine& Title

void viewGraph()

Declared at: llvm/include/llvm/IR/Dominators.h:184