Otawa  0.10
otawa::ExeInst< N > Class Template Reference

An instruction represented in an ExeGraph. More...

#include <>>

Classes

class  NodeIterator
 Iterator on the list of nodes related to the instruction. More...
 

Public Member Functions

 ExeInst (Inst *inst, BasicBlock *bb, typename ExeGraph< N >::code_part_t part, int index)
 Constructor. More...
 
Instinst ()
 
ExeGraph< N >::code_part_t codePart ()
 
int index ()
 
void setIndex (int index)
 Sets the instruction index. More...
 
void addNode (N *node)
 Adds a node to the list of nodes related to this instruction. More...
 
void deleteNodes ()
 Clears the list of nodes related to this instruction. More...
 
N * firstNode ()
 
N * lastNode ()
 
BasicBlockbasicBlock ()
 

Private Attributes

Inst_inst
 
BasicBlock_bb
 
int _index
 
ExeGraph< N >::code_part_t _part
 
elm::genstruct::DLList< N * > _nodes
 

Detailed Description

template<class N>
class otawa::ExeInst< N >

An instruction represented in an ExeGraph.

Parameters
Typeof execution graph nodes.

Constructor & Destructor Documentation

template<class N>
otawa::ExeInst< N >::ExeInst ( Inst inst,
BasicBlock bb,
typename ExeGraph< N >::code_part_t  part,
int  index 
)
inline

Constructor.

Parameters
instThe instruction in the CFG.
bbThe basic block it belongs to.
partThe part (BEFORE_PROLOGUE, PROLOGUE, BODY, EPILOGUE) it belongs to.
indexThe index of the instruction in the execution graph.

Member Function Documentation

template<class N>
void otawa::ExeInst< N >::addNode ( N *  node)
inline

Adds a node to the list of nodes related to this instruction.

Parameters
nodeThe node to add to the list of nodes related to the instruction.
template<class N>
BasicBlock * otawa::ExeInst< N >::basicBlock ( void  )
inline
Returns
Basic block that contains the instruction.
template<class N>
ExeGraph< N >::code_part_t otawa::ExeInst< N >::codePart ( void  )
inline
Returns
Code part (BEFORE_PROLOGUE, PROLOGUE, BODY or EPILOGUE).

Referenced by otawa::LiExeNode::LiExeNode().

template<class N>
void otawa::ExeInst< N >::deleteNodes ( void  )
inline

Clears the list of nodes related to this instruction.

template<class N>
N * otawa::ExeInst< N >::firstNode ( void  )
inline
Returns
First execution node related to the instruction.
template<class N>
int otawa::ExeInst< N >::index ( void  )
inline
template<class N>
Inst * otawa::ExeInst< N >::inst ( void  )
inline
Returns
Instruction in the CFG.
template<class N>
N * otawa::ExeInst< N >::lastNode ( void  )
inline
Returns
Last execution node related to the instruction.
template<class N>
void otawa::ExeInst< N >::setIndex ( int  index)
inline

Sets the instruction index.

Parameters
indexNew instruction index.

Member Data Documentation

template<class N>
BasicBlock* otawa::ExeInst< N >::_bb
private
template<class N>
Inst* otawa::ExeInst< N >::_inst
private
template<class N>
ExeGraph<N>::code_part_t otawa::ExeInst< N >::_part
private

The documentation for this class was generated from the following files: