GPUOcelot
Public Types | Public Member Functions | Friends

analysis::DataflowGraph::Block Class Reference

A class for referring to a generic basic block of instructions. More...

#include <DataflowGraph.h>

List of all members.

Public Types

enum  Type { Entry, Exit, Body, Invalid }
 

The type of block.

More...
typedef std::unordered_set
< Register, Register_Hash
RegisterSet
 A unique set of register Ids.

Public Member Functions

 Block (DataflowGraph &dfg, ir::ControlFlowGraph::iterator block)
 Constructor from a Control Flow Graph block.
 Block (DataflowGraph &dfg, Type t=Invalid)
 Default constructor.
const RegisterSetaliveIn () const
 Get registers that are alive entering the block.
const RegisterSetaliveOut () const
 Get registers that are alive exiting the block.
RegisterSetaliveIn ()
 Get registers that are alive entering the block.
RegisterSetaliveOut ()
 Get registers that are alive exiting the block.
BlockVector::iterator fallthrough () const
 Get the fallthrough block.
const BlockPointerSettargets () const
 Get a list of target blocks.
const BlockPointerSetpredecessors () const
 Get a list of predecessor blocks.
BlockPointerSettargets ()
 Get a list of target blocks.
BlockPointerSetpredecessors ()
 Get a list of predecessor blocks.
Type type () const
 Get the type of the block.
const InstructionVectorinstructions () const
 Get an ordered set of instructions in the block.
InstructionVectorinstructions ()
 Get an ordered set of instructions in the block.
const PhiInstructionVectorphis () const
 Get an ordered set of phis in the block.
PhiInstructionVectorphis ()
 Get an ordered set of phis in the block.
const std::string & label () const
 Get the block label.
ir::ControlFlowGraph::BasicBlock::Id id () const
 Get the id of the block.
ir::ControlFlowGraph::iterator block ()
 Get a pointer to the underlying block.
const std::string * producer (const Register &r) const
 Determine the block that produced a register.
RegisterSet alive (const InstructionVector::const_iterator &i)
 Determine the alive registers immediately before a given instruction in the block.

Friends

class SSAGraph
class DataflowGraph
class SyncEliminationPass

Detailed Description

A class for referring to a generic basic block of instructions.


Member Typedef Documentation

A unique set of register Ids.


Member Enumeration Documentation

The type of block.

Enumerator:
Entry 
Exit 
Body 
Invalid 

Constructor & Destructor Documentation

analysis::DataflowGraph::Block::Block ( DataflowGraph dfg,
ir::ControlFlowGraph::iterator  block 
)

Constructor from a Control Flow Graph block.

analysis::DataflowGraph::Block::Block ( DataflowGraph dfg,
Type  t = Invalid 
)

Default constructor.


Member Function Documentation

DataflowGraph::Block::RegisterSet analysis::DataflowGraph::Block::alive ( const InstructionVector::const_iterator &  i)

Determine the alive registers immediately before a given instruction in the block.

const DataflowGraph::Block::RegisterSet & analysis::DataflowGraph::Block::aliveIn ( ) const

Get registers that are alive entering the block.

DataflowGraph::Block::RegisterSet & analysis::DataflowGraph::Block::aliveIn ( )

Get registers that are alive entering the block.

const DataflowGraph::Block::RegisterSet & analysis::DataflowGraph::Block::aliveOut ( ) const

Get registers that are alive exiting the block.

DataflowGraph::Block::RegisterSet & analysis::DataflowGraph::Block::aliveOut ( )

Get registers that are alive exiting the block.

ir::ControlFlowGraph::iterator analysis::DataflowGraph::Block::block ( )

Get a pointer to the underlying block.

DataflowGraph::BlockVector::iterator analysis::DataflowGraph::Block::fallthrough ( ) const

Get the fallthrough block.

ir::ControlFlowGraph::BasicBlock::Id analysis::DataflowGraph::Block::id ( ) const

Get the id of the block.

const DataflowGraph::InstructionVector & analysis::DataflowGraph::Block::instructions ( ) const

Get an ordered set of instructions in the block.

DataflowGraph::InstructionVector & analysis::DataflowGraph::Block::instructions ( )

Get an ordered set of instructions in the block.

const std::string & analysis::DataflowGraph::Block::label ( ) const

Get the block label.

DataflowGraph::PhiInstructionVector & analysis::DataflowGraph::Block::phis ( )

Get an ordered set of phis in the block.

const DataflowGraph::PhiInstructionVector & analysis::DataflowGraph::Block::phis ( ) const

Get an ordered set of phis in the block.

DataflowGraph::BlockPointerSet & analysis::DataflowGraph::Block::predecessors ( )

Get a list of predecessor blocks.

const DataflowGraph::BlockPointerSet & analysis::DataflowGraph::Block::predecessors ( ) const

Get a list of predecessor blocks.

const std::string * analysis::DataflowGraph::Block::producer ( const Register r) const

Determine the block that produced a register.

const DataflowGraph::BlockPointerSet & analysis::DataflowGraph::Block::targets ( ) const

Get a list of target blocks.

DataflowGraph::BlockPointerSet & analysis::DataflowGraph::Block::targets ( )

Get a list of target blocks.

DataflowGraph::Block::Type analysis::DataflowGraph::Block::type ( ) const

Get the type of the block.


Friends And Related Function Documentation

friend class DataflowGraph [friend]
friend class SSAGraph [friend]
friend class SyncEliminationPass [friend]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines