Otawa  0.10
otawa::ExeGraph< N >::ExeNode Class Reference

#include <otawa/exegraph/ExeGraph.h>

Inheritance diagram for otawa::ExeGraph< N >::ExeNode:
otawa::GenGraph< N, E >::GenNode otawa::graph::Node otawa::LiExeNode otawa::ParamExeNode

Classes

class  ContenderIterator
 

Public Member Functions

 ExeNode (ExeGraph< N > *graph, PipelineStage< N > *stage, ExeInst< N > *inst)
 Constructor. More...
 
PipelineStage< N > * pipelineStage (void)
 
ExeInst< N > * inst (void)
 
int latency ()
 
int latency (time_bound_t bound)
 
void setLatency (time_bound_t bound, int latency)
 
bool needsOperands (void)
 
void setNeedsOperands (bool val)
 Sets whether the node depends on input operands. More...
 
bool producesOperands (void)
 
void setProducesOperands (bool val)
 Sets whether the node produces output operands. More...
 
void addContender (N *cont)
 Adds a contender to the lists of contenders for the node. More...
 
elm::genstruct::Vector< N * > * contenders ()
 
elm::String name ()
 Returns the name of the node, composed of the name of the pipeline stage and the name of the instruction (e.g. More...
 
int index (void) const
 
bool hasSucc (void) const
 
bool hasPred (void) const
 
int countSucc (void) const
 
int countPred (void) const
 
bool isPredOf (const GenNode *node)
 
bool isSuccOf (const GenNode *node)
 

Protected Attributes

elm::genstruct::Vector< N * > _contenders
 

Private Attributes

ExeInst< N > * _inst
 
PipelineStage< N > * _pipeline_stage
 
int _latency [BOUNDS]
 
bool _needs_operands
 
bool _produces_operands
 
elm::String _name
 

Constructor & Destructor Documentation

template<class N>
otawa::ExeGraph< N >::ExeNode::ExeNode ( ExeGraph< N > *  graph,
PipelineStage< N > *  stage,
ExeInst< N > *  inst 
)
inline

Constructor.

Parameters
graphThe execution graph the node is attached to.
stageThe pipeline stage the node is related to.
instThe instruction the node is related to.

References otawa::ExeGraph< N >::ExeNode::_latency, otawa::ExeGraph< N >::ExeNode::_name, otawa::ExeInst< N >::index(), otawa::ExeGraph< N >::MAX, otawa::PipelineStage< N >::maxLatency(), otawa::ExeGraph< N >::MIN, otawa::PipelineStage< N >::minLatency(), otawa::PipelineStage< N >::shortName(), and elm::StringBuffer::toString().

Member Function Documentation

template<class N>
void otawa::ExeGraph< N >::ExeNode::addContender ( N *  cont)
inline

Adds a contender to the lists of contenders for the node.

Parameters
contThe new contender for the node.

References otawa::ExeGraph< N >::ExeNode::_contenders, and elm::genstruct::Vector< T >::add().

template<class N>
elm::genstruct::Vector< N * > * otawa::ExeGraph< N >::ExeNode::contenders ( void  )
inline
Returns
The list of contenders of the node.

References otawa::ExeGraph< N >::ExeNode::_contenders.

template<class N, class E>
int otawa::GenGraph< N, E >::GenNode::countPred ( void  ) const
inlineinherited
template<class N, class E>
int otawa::GenGraph< N, E >::GenNode::countSucc ( void  ) const
inlineinherited
template<class N, class E>
bool otawa::GenGraph< N, E >::GenNode::hasPred ( void  ) const
inlineinherited
template<class N, class E>
bool otawa::GenGraph< N, E >::GenNode::hasSucc ( void  ) const
inlineinherited
template<class N>
ExeInst< N > * otawa::ExeGraph< N >::ExeNode::inst ( void  )
inline
template<class N, class E>
bool otawa::GenGraph< N, E >::GenNode::isPredOf ( const GenNode node)
inlineinherited
template<class N, class E>
bool otawa::GenGraph< N, E >::GenNode::isSuccOf ( const GenNode node)
inlineinherited
template<class N>
int otawa::ExeGraph< N >::ExeNode::latency ( time_bound_t  bound)
inline
Parameters
boundA time bound (MIN or MAX).
Returns
The node latency.

References otawa::ExeGraph< N >::ExeNode::_latency.

template<class N>
elm::String otawa::ExeGraph< N >::ExeNode::name ( void  )
inline

Returns the name of the node, composed of the name of the pipeline stage and the name of the instruction (e.g.

"CM(I8)").

Returns
Node name.

References otawa::ExeGraph< N >::ExeNode::_name.

Referenced by otawa::ParamExeGraph::Delta().

template<class N>
bool otawa::ExeGraph< N >::ExeNode::needsOperands ( void  )
inline
Returns
Whether the node depends on input operands.

References otawa::ExeGraph< N >::ExeNode::_needs_operands.

template<class N>
PipelineStage< N > otawa::ExeGraph< N >::ExeNode::pipelineStage ( void  )
inline
template<class N>
bool otawa::ExeGraph< N >::ExeNode::producesOperands ( void  )
inline
Returns
Whether the node produces output operands.

References otawa::ExeGraph< N >::ExeNode::_produces_operands.

template<class N>
void otawa::ExeGraph< N >::ExeNode::setLatency ( time_bound_t  bound,
int  latency 
)
inline
Parameters
boundA time bound (MIN or MAX).
latencyThe new value of the latency.

References otawa::ExeGraph< N >::ExeNode::_latency, and otawa::ExeGraph< N >::ExeNode::latency().

template<class N>
void otawa::ExeGraph< N >::ExeNode::setNeedsOperands ( bool  val)
inline

Sets whether the node depends on input operands.

References otawa::ExeGraph< N >::ExeNode::_needs_operands.

template<class N>
void otawa::ExeGraph< N >::ExeNode::setProducesOperands ( bool  val)
inline

Sets whether the node produces output operands.

References otawa::ExeGraph< N >::ExeNode::_produces_operands.

Member Data Documentation

template<class N>
ExeInst<N>* otawa::ExeGraph< N >::ExeNode::_inst
private
template<class N>
elm::String otawa::ExeGraph< N >::ExeNode::_name
private
template<class N>
bool otawa::ExeGraph< N >::ExeNode::_needs_operands
private
template<class N>
PipelineStage<N>* otawa::ExeGraph< N >::ExeNode::_pipeline_stage
private
template<class N>
bool otawa::ExeGraph< N >::ExeNode::_produces_operands
private

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