LLVM  mainline
Classes | Namespaces | Functions
BasicBlockUtils.h File Reference
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
Include dependency graph for BasicBlockUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::CriticalEdgeSplittingOptions
 Option class for critical edge splitting. More...

Namespaces

namespace  llvm
 

Compute iterated dominance frontiers using a linear time algorithm.


Functions

void llvm::DeleteDeadBlock (BasicBlock *BB)
 DeleteDeadBlock - Delete the specified block, which must have no predecessors.
void llvm::FoldSingleEntryPHINodes (BasicBlock *BB, AliasAnalysis *AA=nullptr, MemoryDependenceAnalysis *MemDep=nullptr)
 FoldSingleEntryPHINodes - We know that BB has one predecessor.
bool llvm::DeleteDeadPHIs (BasicBlock *BB, const TargetLibraryInfo *TLI=nullptr)
 DeleteDeadPHIs - Examine each PHI in the given block and delete it if it is dead.
bool llvm::MergeBlockIntoPredecessor (BasicBlock *BB, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, AliasAnalysis *AA=nullptr, MemoryDependenceAnalysis *MemDep=nullptr)
 MergeBlockIntoPredecessor - Attempts to merge a block into its predecessor, if possible.
void llvm::ReplaceInstWithValue (BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Value *V)
 ReplaceInstWithValue - Replace all uses of an instruction (specified by BI) with a value, then remove and delete the original instruction.
void llvm::ReplaceInstWithInst (BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Instruction *I)
 ReplaceInstWithInst - Replace the instruction specified by BI with the instruction specified by I.
void llvm::ReplaceInstWithInst (Instruction *From, Instruction *To)
 ReplaceInstWithInst - Replace the instruction specified by From with the instruction specified by To.
BasicBlockllvm::SplitCriticalEdge (TerminatorInst *TI, unsigned SuccNum, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 SplitCriticalEdge - If this edge is a critical edge, insert a new node to split the critical edge.
BasicBlock * llvm::SplitCriticalEdge (BasicBlock *BB, succ_iterator SI, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
bool llvm::SplitCriticalEdge (BasicBlock *Succ, pred_iterator PI, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 SplitCriticalEdge - If the edge from *PI to BB is not critical, return false.
BasicBlock * llvm::SplitCriticalEdge (BasicBlock *Src, BasicBlock *Dst, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 SplitCriticalEdge - If an edge from Src to Dst is critical, split the edge and return true, otherwise return false.
unsigned llvm::SplitAllCriticalEdges (Function &F, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
BasicBlockllvm::SplitEdge (BasicBlock *From, BasicBlock *To, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr)
 SplitEdge - Split the edge connecting specified block.
BasicBlockllvm::SplitBlock (BasicBlock *Old, Instruction *SplitPt, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr)
 SplitBlock - Split the specified block at the specified instruction - every thing before SplitPt stays in Old and everything starting with SplitPt moves to a new block.
BasicBlockllvm::SplitBlockPredecessors (BasicBlock *BB, ArrayRef< BasicBlock * > Preds, const char *Suffix, AliasAnalysis *AA=nullptr, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, bool PreserveLCSSA=false)
 SplitBlockPredecessors - This method introduces at least one new basic block into the function and moves some of the predecessors of BB to be predecessors of the new block.
void llvm::SplitLandingPadPredecessors (BasicBlock *OrigBB, ArrayRef< BasicBlock * > Preds, const char *Suffix, const char *Suffix2, SmallVectorImpl< BasicBlock * > &NewBBs, AliasAnalysis *AA=nullptr, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, bool PreserveLCSSA=false)
 SplitLandingPadPredecessors - This method transforms the landing pad, OrigBB, by introducing two new basic blocks into the function.
ReturnInstllvm::FoldReturnIntoUncondBranch (ReturnInst *RI, BasicBlock *BB, BasicBlock *Pred)
 FoldReturnIntoUncondBranch - This method duplicates the specified return instruction into a predecessor which ends in an unconditional branch.
TerminatorInstllvm::SplitBlockAndInsertIfThen (Value *Cond, Instruction *SplitBefore, bool Unreachable, MDNode *BranchWeights=nullptr, DominatorTree *DT=nullptr)
 SplitBlockAndInsertIfThen - Split the containing block at the specified instruction - everything before and including SplitBefore stays in the old basic block, and everything after SplitBefore is moved to a new block.
void llvm::SplitBlockAndInsertIfThenElse (Value *Cond, Instruction *SplitBefore, TerminatorInst **ThenTerm, TerminatorInst **ElseTerm, MDNode *BranchWeights=nullptr)
 SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen, but also creates the ElseBlock.
Valuellvm::GetIfCondition (BasicBlock *BB, BasicBlock *&IfTrue, BasicBlock *&IfFalse)
 GetIfCondition - Check whether BB is the merge point of a if-region.