LLVM  8.0.0svn
Classes | Namespaces | Typedefs | Functions
CFG.h File Reference

This file provides various utilities for inspecting and working with the control flow graph in LLVM IR. More...

#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/type_traits.h"
#include <cassert>
#include <cstddef>
#include <iterator>
Include dependency graph for CFG.h:

Go to the source code of this file.

Classes

class  llvm::PredIterator< Ptr, USE_iterator >
 
class  llvm::SuccIterator< InstructionT, BlockT >
 
struct  llvm::isPodLike< SuccIterator< T, U > >
 
struct  llvm::GraphTraits< BasicBlock * >
 
struct  llvm::GraphTraits< const BasicBlock * >
 
struct  llvm::GraphTraits< Inverse< BasicBlock * > >
 
struct  llvm::GraphTraits< Inverse< const BasicBlock * > >
 
struct  llvm::GraphTraits< Function * >
 
struct  llvm::GraphTraits< const Function * >
 
struct  llvm::GraphTraits< Inverse< Function * > >
 
struct  llvm::GraphTraits< Inverse< const Function * > >
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Typedefs

using llvm::pred_iterator = PredIterator< BasicBlock, Value::user_iterator >
 
using llvm::const_pred_iterator = PredIterator< const BasicBlock, Value::const_user_iterator >
 
using llvm::pred_range = iterator_range< pred_iterator >
 
using llvm::pred_const_range = iterator_range< const_pred_iterator >
 
using llvm::succ_iterator = SuccIterator< Instruction, BasicBlock >
 
using llvm::succ_const_iterator = SuccIterator< const Instruction, const BasicBlock >
 
using llvm::succ_range = iterator_range< succ_iterator >
 
using llvm::succ_const_range = iterator_range< succ_const_iterator >
 

Functions

pred_iterator llvm::pred_begin (BasicBlock *BB)
 
const_pred_iterator llvm::pred_begin (const BasicBlock *BB)
 
pred_iterator llvm::pred_end (BasicBlock *BB)
 
const_pred_iterator llvm::pred_end (const BasicBlock *BB)
 
bool llvm::pred_empty (const BasicBlock *BB)
 
unsigned llvm::pred_size (const BasicBlock *BB)
 
pred_range llvm::predecessors (BasicBlock *BB)
 
pred_const_range llvm::predecessors (const BasicBlock *BB)
 
succ_iterator llvm::succ_begin (Instruction *I)
 
succ_const_iterator llvm::succ_begin (const Instruction *I)
 
succ_iterator llvm::succ_end (Instruction *I)
 
succ_const_iterator llvm::succ_end (const Instruction *I)
 
bool llvm::succ_empty (const Instruction *I)
 
unsigned llvm::succ_size (const Instruction *I)
 
succ_range llvm::successors (Instruction *I)
 
succ_const_range llvm::successors (const Instruction *I)
 
succ_iterator llvm::succ_begin (BasicBlock *BB)
 
succ_const_iterator llvm::succ_begin (const BasicBlock *BB)
 
succ_iterator llvm::succ_end (BasicBlock *BB)
 
succ_const_iterator llvm::succ_end (const BasicBlock *BB)
 
bool llvm::succ_empty (const BasicBlock *BB)
 
unsigned llvm::succ_size (const BasicBlock *BB)
 
succ_range llvm::successors (BasicBlock *BB)
 
succ_const_range llvm::successors (const BasicBlock *BB)
 

Detailed Description

This file provides various utilities for inspecting and working with the control flow graph in LLVM IR.

This includes generic facilities for iterating successors and predecessors of basic blocks, the successors of specific terminator instructions, etc. It also defines specializations of GraphTraits that allow Function and BasicBlock graphs to be treated as proper graphs for generic algorithms.

Definition in file CFG.h.