LLVM  7.0.0svn
Public Member Functions | List of all members
llvm::OrderedInstructions Class Reference

#include "llvm/Transforms/Utils/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...
void invalidateBlock (const BasicBlock *BB)
 Invalidate the OrderedBasicBlock cache when its basic block changes. More...

Detailed Description

Definition at line 30 of file OrderedInstructions.h.

Constructor & Destructor Documentation

◆ OrderedInstructions()

llvm::OrderedInstructions::OrderedInstructions ( DominatorTree DT)


Definition at line 40 of file OrderedInstructions.h.

References dominates().

Member Function Documentation

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

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

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

◆ invalidateBlock()

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

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 49 of file OrderedInstructions.h.

References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::erase().

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