LLVM  9.0.0svn
Public Member Functions | List of all members
llvm::OrderedBasicBlock Class Reference

#include "llvm/Analysis/OrderedBasicBlock.h"

Public Member Functions

 OrderedBasicBlock (const BasicBlock *BasicB)
 
bool dominates (const Instruction *A, const Instruction *B)
 Find out whether A dominates B, meaning whether A comes before B in BB. More...
 
void eraseInstruction (const Instruction *I)
 Remove from the ordering, if it is present. More...
 
void replaceInstruction (const Instruction *Old, const Instruction *New)
 Replace Old with New in the ordering. More...
 

Detailed Description

Definition at line 33 of file OrderedBasicBlock.h.

Constructor & Destructor Documentation

◆ OrderedBasicBlock()

OrderedBasicBlock::OrderedBasicBlock ( const BasicBlock BasicB)

Member Function Documentation

◆ dominates()

bool OrderedBasicBlock::dominates ( const Instruction A,
const Instruction B 
)

Find out whether A dominates B, meaning whether A comes before B in BB.

This is a simplification that considers cached instruction positions and ignores other basic blocks, being only relevant to compare relative instructions positions inside BB. Returns false for A == B.

This is a simplification that considers cached instruction positions and ignores other basic blocks, being only relevant to compare relative instructions positions inside BB.

Definition at line 66 of file OrderedBasicBlock.cpp.

References assert(), llvm::Instruction::getParent(), and if().

Referenced by eliminateDeadStores(), and propagateMetadata().

◆ eraseInstruction()

void OrderedBasicBlock::eraseInstruction ( const Instruction I)

Remove from the ordering, if it is present.

Definition at line 89 of file OrderedBasicBlock.cpp.

References llvm::BasicBlock::begin(), and llvm::BasicBlock::end().

Referenced by deleteDeadInstruction().

◆ replaceInstruction()

void OrderedBasicBlock::replaceInstruction ( const Instruction Old,
const Instruction New 
)

Replace Old with New in the ordering.

New is assigned the numbering of Old, so it must be inserted at the same position in the IR.

Definition at line 101 of file OrderedBasicBlock.cpp.

References llvm::BasicBlock::end(), and llvm::ilist_node_impl< OptionsT >::getIterator().

Referenced by eliminateDeadStores().


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