LLVM  11.0.0git
Public Member Functions | List of all members
llvm::OrderedInstructions Class Reference

#include "llvm/Analysis/OrderedInstructions.h"

Public Member Functions

 OrderedInstructions (DominatorTree *DT)
 Constructor. More...
 
bool dominates (const Instruction *, const Instruction *) const
 Return true if first instruction dominates the second. More...
 
bool dfsBefore (const Instruction *, const Instruction *) const
 Return true if the first instruction comes before the second in the dominator tree DFS traversal if they are in different basic blocks, or if the first instruction comes before the second in the same basic block. More...
 
bool domTreeLevelBefore (const Instruction *, const Instruction *) const
 

Detailed Description

Definition at line 27 of file OrderedInstructions.h.

Constructor & Destructor Documentation

◆ OrderedInstructions()

llvm::OrderedInstructions::OrderedInstructions ( DominatorTree DT)
inline

Constructor.

Definition at line 38 of file OrderedInstructions.h.

References dfsBefore(), dominates(), and domTreeLevelBefore().

Member Function Documentation

◆ dfsBefore()

bool OrderedInstructions::dfsBefore ( const Instruction InstA,
const Instruction InstB 
) const

Return true if the first instruction comes before the second in the dominator tree DFS traversal if they are in different basic blocks, or if the first instruction comes before the second in the same basic block.

Definition at line 35 of file OrderedInstructions.cpp.

References llvm::DomTreeNodeBase< NodeT >::getDFSNumIn(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), and llvm::Instruction::getParent().

Referenced by OrderedInstructions().

◆ dominates()

bool OrderedInstructions::dominates ( const Instruction InstA,
const Instruction InstB 
) const

Return true if first instruction dominates the second.

Given 2 instructions, check for dominance relation if the instructions are in the same basic block.

Otherwise, use dominator tree.

Definition at line 26 of file OrderedInstructions.cpp.

References llvm::DominatorTree::dominates(), and llvm::Instruction::getParent().

Referenced by OrderedInstructions().

◆ domTreeLevelBefore()

bool OrderedInstructions::domTreeLevelBefore ( const Instruction InstA,
const Instruction InstB 
) const

The documentation for this class was generated from the following files: