LLVM 20.0.0git
Namespaces | Functions
CFG.h File Reference
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <utility>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

void llvm::FindFunctionBackedges (const Function &F, SmallVectorImpl< std::pair< const BasicBlock *, const BasicBlock * > > &Result)
 Analyze the specified function to find all of the loop backedges in the function and return them.
 
unsigned llvm::GetSuccessorNumber (const BasicBlock *BB, const BasicBlock *Succ)
 Search for the specified successor of basic block BB and return its position in the terminator instruction's list of successors.
 
bool llvm::isCriticalEdge (const Instruction *TI, unsigned SuccNum, bool AllowIdenticalEdges=false)
 Return true if the specified edge is a critical edge.
 
bool llvm::isCriticalEdge (const Instruction *TI, const BasicBlock *Succ, bool AllowIdenticalEdges=false)
 
bool llvm::isPotentiallyReachable (const Instruction *From, const Instruction *To, const SmallPtrSetImpl< BasicBlock * > *ExclusionSet=nullptr, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether instruction 'To' is reachable from 'From', without passing through any blocks in ExclusionSet, returning true if uncertain.
 
bool llvm::isPotentiallyReachable (const BasicBlock *From, const BasicBlock *To, const SmallPtrSetImpl< BasicBlock * > *ExclusionSet=nullptr, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether block 'To' is reachable from 'From', returning true if uncertain.
 
bool llvm::isPotentiallyReachableFromMany (SmallVectorImpl< BasicBlock * > &Worklist, const BasicBlock *StopBB, const SmallPtrSetImpl< BasicBlock * > *ExclusionSet, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether there is at least one path from a block in 'Worklist' to 'StopBB' without passing through any blocks in 'ExclusionSet', returning true if uncertain.
 
bool llvm::isManyPotentiallyReachableFromMany (SmallVectorImpl< BasicBlock * > &Worklist, const SmallPtrSetImpl< const BasicBlock * > &StopSet, const SmallPtrSetImpl< BasicBlock * > *ExclusionSet, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether there is a potentially a path from at least one block in 'Worklist' to at least one block in 'StopSet' within a single function without passing through any of the blocks in 'ExclusionSet'.
 
template<class NodeT , class RPOTraversalT , class LoopInfoT , class GT = GraphTraits<NodeT>>
bool llvm::containsIrreducibleCFG (RPOTraversalT &RPOTraversal, const LoopInfoT &LI)
 Return true if the control flow in RPOTraversal is irreducible.