LLVM 20.0.0git
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/Value.h"
#include <cassert>
#include <cstddef>
#include <iterator>

Go to the source code of this file.

Classes

class  llvm::PredIterator< Ptr, USE_iterator >
 
class  llvm::SuccIterator< InstructionT, BlockT >
 
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

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

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::const_pred_range = iterator_range< const_pred_iterator >
 
using llvm::succ_iterator = SuccIterator< Instruction, BasicBlock >
 
using llvm::const_succ_iterator = SuccIterator< const Instruction, const BasicBlock >
 
using llvm::succ_range = iterator_range< succ_iterator >
 
using llvm::const_succ_range = iterator_range< const_succ_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)
 Get the number of predecessors of BB.
 
pred_range llvm::predecessors (BasicBlock *BB)
 
const_pred_range llvm::predecessors (const BasicBlock *BB)
 
succ_iterator llvm::succ_begin (Instruction *I)
 
const_succ_iterator llvm::succ_begin (const Instruction *I)
 
succ_iterator llvm::succ_end (Instruction *I)
 
const_succ_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)
 
const_succ_range llvm::successors (const Instruction *I)
 
succ_iterator llvm::succ_begin (BasicBlock *BB)
 
const_succ_iterator llvm::succ_begin (const BasicBlock *BB)
 
succ_iterator llvm::succ_end (BasicBlock *BB)
 
const_succ_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)
 
const_succ_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.