Otawa  0.10
otawa::LiExeNode Class Reference

#include <otawa/exegraph/LiExeGraph.h>

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

Public Member Functions

 LiExeNode (ExeGraph< LiExeNode > *graph, PipelineStage< LiExeNode > *stage, ExeInst< LiExeNode > *inst)
 Builds an execution node tuned for Li's algorithm. More...
 
int time (ExeGraph< LiExeNode >::time_step_t step, ExeGraph< LiExeNode >::time_bound_t bound)
 
void setTime (ExeGraph< LiExeNode >::time_step_t step, ExeGraph< LiExeNode >::time_bound_t bound, int time)
 
void shade (void)
 Marks the node as "shaded" (see Li's algorithm) More...
 
bool isShaded (void)
 
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

int _time [ExeGraph< LiExeNode >::STEPS][ExeGraph< LiExeNode >::BOUNDS]
 
bool _shaded
 
LiExeGraph_graph
 

Constructor & Destructor Documentation

LiExeNode::LiExeNode ( ExeGraph< LiExeNode > *  graph,
PipelineStage< LiExeNode > *  stage,
ExeInst< LiExeNode > *  inst 
)
inline

Builds an execution node tuned for Li's algorithm.

Parameters
graphThe execution graph that contains the node. aram stage The pipeline stage the node is related to.
instThe instruction the node is related to.

References otawa::ExeInst< N >::codePart(), INFINITE_TIME, otawa::PipelineStage< N >::minLatency(), and setTime().

Member Function Documentation

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

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  )
inlineinherited
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  )
inlineinherited
template<class N, class E>
bool otawa::GenGraph< N, E >::GenNode::isPredOf ( const GenNode node)
inlineinherited
LiExeNode::isShaded ( void  )
inline
Returns
Whether the node is shaded or not.

References _shaded.

Referenced by otawa::LiExeGraph::nodeLatestTimes().

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)
inlineinherited
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  )
inlineinherited

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  )
inlineinherited
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  )
inlineinherited
template<class N>
bool otawa::ExeGraph< N >::ExeNode::producesOperands ( void  )
inlineinherited
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 
)
inlineinherited
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)
inlineinherited

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)
inlineinherited

Sets whether the node produces output operands.

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

LiExeNode::setTime ( ExeGraph< LiExeNode >::time_step_t  step,
ExeGraph< LiExeNode >::time_bound_t  bound,
int  time 
)
inline
Parameters
stepTime step (READY, START, FINISH)
boundTime bound (MIN, MAX)
timeThe node new time value. Sets the new node time value.

References _graph, _time, otawa::LiExeGraph::setTimesChanged(), and time().

Referenced by otawa::LiExeGraph::earliestTimes(), otawa::LiExeGraph::latestTimes(), LiExeNode(), otawa::LiExeGraph::nodeEarliestTimes(), and otawa::LiExeGraph::nodeLatestTimes().

LiExeNode::shade ( void  )
inline

Marks the node as "shaded" (see Li's algorithm)

References _shaded.

LiExeNode::time ( ExeGraph< LiExeNode >::time_step_t  step,
ExeGraph< LiExeNode >::time_bound_t  bound 
)
inline
Parameters
stepTime step (READY, START, FINISH)
boundTime bound (MIN, MAX)
Returns
The node time

References _time.

Referenced by otawa::LiExeGraph::analyze(), otawa::LiExeGraph::nodeEarliestTimes(), otawa::LiExeGraph::nodeLatestTimes(), otawa::LiExeGraph::separated(), setTime(), and otawa::LiExeGraph::shadeNodes().

Member Data Documentation

LiExeGraph* otawa::LiExeNode::_graph
private

Referenced by setTime().

bool otawa::LiExeNode::_shaded
private

Referenced by isShaded(), and shade().

int otawa::LiExeNode::_time[ExeGraph< LiExeNode >::STEPS][ExeGraph< LiExeNode >::BOUNDS]
private

Referenced by setTime(), and time().


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