LLVM  10.0.0svn
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...

void invalidateBlock (const BasicBlock *BB)
Invalidate the OrderedBasicBlock cache when its basic block changes. More...

## Detailed Description

Definition at line 29 of file OrderedInstructions.h.

## ◆ OrderedInstructions()

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

Constructor.

Definition at line 44 of file OrderedInstructions.h.

References dfsBefore(), and dominates().

## ◆ 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 40 of file OrderedInstructions.cpp.

Referenced by OrderedInstructions(), and llvm::PredicateInfoClasses::valueComesBefore().

## ◆ dominates()

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

Return true if first instruction dominates the second.

Given 2 instructions, use OrderedBasicBlock to check for dominance relation if the instructions are in the same basic block, Otherwise, use dominator tree.

Definition at line 31 of file OrderedInstructions.cpp.

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

## ◆ invalidateBlock()

 void llvm::OrderedInstructions::invalidateBlock ( const BasicBlock * BB )
inline

Invalidate the OrderedBasicBlock cache when its basic block changes.

i.e. If an instruction is deleted or added to the basic block, the user should call this function to invalidate the OrderedBasicBlock cache for this basic block.

Definition at line 59 of file OrderedInstructions.h.

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