GPUOcelot
|
A basic block contains a series of instructions terminated by control flow. More...
#include <ControlFlowGraph.h>
Classes | |
class | DotFormatter |
an object that formats the string representation of a basic block used in the DOT output of the graph More... | |
class | Edge |
An edge connects two basic blocks. More... | |
Public Types | |
typedef std::list< BasicBlock > | BlockList |
A list of blocks. | |
typedef BlockList::iterator | Pointer |
typedef BlockList::const_iterator | ConstPointer |
typedef std::list< Edge > | EdgeList |
typedef std::vector< Pointer > | BlockPointerVector |
typedef std::vector< ConstPointer > | ConstBlockPointerVector |
typedef std::vector < EdgeList::iterator > | EdgePointerVector |
typedef std::list< Instruction * > | InstructionList |
typedef InstructionList::iterator | instruction_iterator |
typedef InstructionList::const_iterator | const_instruction_iterator |
typedef unsigned int | Id |
Public Member Functions | |
BasicBlock (const std::string &l="", Id i=0, const InstructionList &instructions=InstructionList(), const std::string &c="") | |
~BasicBlock () | |
void | clear () |
Clear/delete all instructions owned by the block. | |
EdgeList::iterator | get_fallthrough_edge () |
Get the fallthrough edge. | |
EdgeList::const_iterator | get_fallthrough_edge () const |
Get the fallthrough edge. | |
bool | has_fallthrough_edge () const |
Does this have a fallthrough edge. | |
EdgeList::iterator | get_branch_edge () |
Get the branch edge. | |
EdgeList::const_iterator | get_branch_edge () const |
Get the branch edge. | |
bool | has_branch_edge () const |
Does this have a branch edge. | |
EdgeList::iterator | get_edge (BlockList::iterator b) |
Get the edge connecting to the specified block. | |
EdgeList::const_iterator | get_edge (BlockList::const_iterator b) const |
Get the edge connecting to the specified block. | |
EdgePointerVector::iterator | find_in_edge (BlockList::const_iterator head) |
Find an in-edge with specific head and tail pointers. | |
EdgePointerVector::iterator | find_out_edge (BlockList::const_iterator tail) |
Find an out-edge with specific head and tail pointers. | |
Public Attributes | |
InstructionList | instructions |
std::string | label |
Basic block label. | |
std::string | comment |
a comment appearing in the emitted PTX source file | |
Id | id |
Basic block unique identifier. | |
BlockPointerVector | successors |
Direct successor blocks. | |
BlockPointerVector | predecessors |
Direct predecessor blocks. | |
EdgePointerVector | in_edges |
Edges from direct predecessors. | |
EdgePointerVector | out_edges |
Edges to direct successors. |
A basic block contains a series of instructions terminated by control flow.
typedef std::list< BasicBlock > ir::BasicBlock::BlockList |
A list of blocks.
typedef std::vector<Pointer> ir::BasicBlock::BlockPointerVector |
typedef InstructionList::const_iterator ir::BasicBlock::const_instruction_iterator |
typedef std::vector<ConstPointer> ir::BasicBlock::ConstBlockPointerVector |
typedef BlockList::const_iterator ir::BasicBlock::ConstPointer |
typedef std::list<Edge> ir::BasicBlock::EdgeList |
typedef std::vector<EdgeList::iterator> ir::BasicBlock::EdgePointerVector |
typedef unsigned int ir::BasicBlock::Id |
typedef InstructionList::iterator ir::BasicBlock::instruction_iterator |
typedef std::list<Instruction*> ir::BasicBlock::InstructionList |
typedef BlockList::iterator ir::BasicBlock::Pointer |
ir::BasicBlock::BasicBlock | ( | const std::string & | l = "" , |
Id | i = 0 , |
||
const InstructionList & | instructions = InstructionList() , |
||
const std::string & | c = "" |
||
) |
ir::BasicBlock::~BasicBlock | ( | ) |
void ir::BasicBlock::clear | ( | ) |
Clear/delete all instructions owned by the block.
ControlFlowGraph::EdgePointerVector::iterator ir::BasicBlock::find_in_edge | ( | BlockList::const_iterator | head | ) |
Find an in-edge with specific head and tail pointers.
ControlFlowGraph::EdgePointerVector::iterator ir::BasicBlock::find_out_edge | ( | BlockList::const_iterator | tail | ) |
Find an out-edge with specific head and tail pointers.
BasicBlock::EdgeList::iterator ir::BasicBlock::get_branch_edge | ( | ) |
Get the branch edge.
BasicBlock::EdgeList::const_iterator ir::BasicBlock::get_branch_edge | ( | ) | const |
Get the branch edge.
BasicBlock::EdgeList::const_iterator ir::BasicBlock::get_edge | ( | BlockList::const_iterator | b | ) | const |
Get the edge connecting to the specified block.
BasicBlock::EdgeList::iterator ir::BasicBlock::get_edge | ( | BlockList::iterator | b | ) |
Get the edge connecting to the specified block.
BasicBlock::EdgeList::iterator ir::BasicBlock::get_fallthrough_edge | ( | ) |
Get the fallthrough edge.
BasicBlock::EdgeList::const_iterator ir::BasicBlock::get_fallthrough_edge | ( | ) | const |
Get the fallthrough edge.
bool ir::BasicBlock::has_branch_edge | ( | ) | const |
Does this have a branch edge.
bool ir::BasicBlock::has_fallthrough_edge | ( | ) | const |
Does this have a fallthrough edge.
std::string ir::BasicBlock::comment |
a comment appearing in the emitted PTX source file
Basic block unique identifier.
Edges from direct predecessors.
list of instructions in BasicBlock.
std::string ir::BasicBlock::label |
Basic block label.
Edges to direct successors.
Direct predecessor blocks.
Direct successor blocks.