class MachinePostDominatorTree

Declaration

class MachinePostDominatorTree : public MachineFunctionPass { /* full declaration omitted */ };

Description

MachinePostDominatorTree - an analysis pass wrapper for DominatorTree used to compute the post-dominator tree for MachineFunctions.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:27

Inherits from: MachineFunctionPass

Member Variables

private std::unique_ptr<PostDomTreeT> PDT
public static char ID

Method Overview

Inherited from MachineFunctionPass:

Inherited from FunctionPass:

Inherited from Pass:

Methods

MachinePostDominatorTree()

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:34

llvm::FunctionPass*
createMachinePostDominatorTreePass()

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:42

bool dominates(
    const llvm::MachineDomTreeNode* A,
    const llvm::MachineDomTreeNode* B) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:54

Parameters

const llvm::MachineDomTreeNode* A
const llvm::MachineDomTreeNode* B

bool dominates(
    const llvm::MachineBasicBlock* A,
    const llvm::MachineBasicBlock* B) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:59

Parameters

const llvm::MachineBasicBlock* A
const llvm::MachineBasicBlock* B

llvm::MachineBasicBlock*
findNearestCommonDominator(
    llvm::MachineBasicBlock* A,
    llvm::MachineBasicBlock* B) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:77

Parameters

llvm::MachineBasicBlock* A
llvm::MachineBasicBlock* B

llvm::MachineBasicBlock*
findNearestCommonDominator(
    ArrayRef<llvm::MachineBasicBlock*> Blocks)
    const

Description

Returns the nearest common dominator of the given blocks. If that tree node is a virtual root, a nullptr will be returned.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:85

Parameters

ArrayRef<llvm::MachineBasicBlock*> Blocks

void getAnalysisUsage(
    llvm::AnalysisUsage& AU) const

Description

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:88

Parameters

llvm::AnalysisUsage& AU

llvm::MachinePostDominatorTree::PostDomTreeT&
getBase()

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:36

llvm::MachineDomTreeNode* getNode(
    llvm::MachineBasicBlock* BB) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:50

Parameters

llvm::MachineBasicBlock* BB

llvm::MachineDomTreeNode* getRootNode() const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:44

bool isVirtualRoot(
    const llvm::MachineDomTreeNode* Node) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:73

Parameters

const llvm::MachineDomTreeNode* Node

void print(llvm::raw_ostream& OS,
           const llvm::Module* M = nullptr) const

Description

print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:91

Parameters

llvm::raw_ostream& OS
const llvm::Module* M = nullptr

bool properlyDominates(
    const llvm::MachineBasicBlock* A,
    const llvm::MachineBasicBlock* B) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:68

Parameters

const llvm::MachineBasicBlock* A
const llvm::MachineBasicBlock* B

bool properlyDominates(
    const llvm::MachineDomTreeNode* A,
    const llvm::MachineDomTreeNode* B) const

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:63

Parameters

const llvm::MachineDomTreeNode* A
const llvm::MachineDomTreeNode* B

void releaseMemory()

Description

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:89

bool runOnMachineFunction(
    llvm::MachineFunction& MF)

Description

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:87

Parameters

llvm::MachineFunction& MF

void verifyAnalysis() const

Description

verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information.

Declared at: llvm/include/llvm/CodeGen/MachinePostDominators.h:90