Otawa  0.10
otawa::stack::Iter Class Reference

Iterator on the result of stack analysis. More...

#include <otawa/stack/features.h>

Inheritance diagram for otawa::stack::Iter:
elm::PreIterator< Iter, sem::inst >

Public Member Functions

 Iter (WorkSpace *ws)
 
 ~Iter (void)
 
void start (BasicBlock *bb)
 Start the state calculation for a new basic block. More...
 
bool pathEnd (void) const
 
bool isCond (void) const
 
bool instEnd (void) const
 
bool ended (void) const
 
sem::inst item (void) const
 
void next (void)
 Compute the state for the next semantic instruction. More...
 
void nextInst (void)
 Compute the state at the end of the instruction. More...
 
State & state (void) const
 
Value getReg (int i)
 Get register value. More...
 
Value getMem (Value addr, int size)
 Get value from memory. More...
 
Instinstruction (void) const
 
 operator bool (void) const
 
 operator sem::inst (void) const
 
Iteroperator++ (void)
 
Iteroperator++ (int)
 
sem::inst operator* (void) const
 
sem::inst operator-> (void) const
 

Private Attributes

sem::Block b
 
sem::PathIter si
 
BasicBlock::InstIter i
 
State * s
 
State * es
 
genstruct::Vector< State * > ss
 
StackProblem * p
 

Detailed Description

Iterator on the result of stack analysis.

Constructor & Destructor Documentation

otawa::stack::Iter::Iter ( WorkSpace ws)
otawa::stack::Iter::~Iter ( void  )

References es, and s.

Member Function Documentation

bool otawa::stack::Iter::ended ( void  ) const
inline
Value otawa::stack::Iter::getMem ( Value  addr,
int  size 
)

Get value from memory.

Parameters
addrValue address.
sizeValue size.
Returns
Memory value.

References p.

Value otawa::stack::Iter::getReg ( int  i)

Get register value.

Parameters
iRegister index.
Returns
Register value.

References p.

bool otawa::stack::Iter::instEnd ( void  ) const
inline

References otawa::sem::PathIter::ended(), and si.

Referenced by nextInst().

Inst* otawa::stack::Iter::instruction ( void  ) const
inline

References i.

bool otawa::stack::Iter::isCond ( void  ) const
inline

References otawa::sem::PathIter::isCond(), and si.

Referenced by next().

sem::inst otawa::stack::Iter::item ( void  ) const
inline

References otawa::sem::PathIter::item(), and si.

void otawa::stack::Iter::nextInst ( void  )

Compute the state at the end of the instruction.

References instEnd(), and next().

elm::PreIterator< Iter , sem::inst >::operator bool ( void  ) const
inherited
elm::PreIterator< Iter , sem::inst >::operator sem::inst ( void  ) const
inherited
sem::inst elm::PreIterator< Iter , sem::inst >::operator* ( void  ) const
inherited
Iter & elm::PreIterator< Iter , sem::inst >::operator++ ( int  )
inherited
Iter & elm::PreIterator< Iter , sem::inst >::operator++ ( void  )
inherited
sem::inst elm::PreIterator< Iter , sem::inst >::operator-> ( void  ) const
inherited
bool otawa::stack::Iter::pathEnd ( void  ) const
inline
void otawa::stack::Iter::start ( BasicBlock bb)

Start the state calculation for a new basic block.

References elm::genstruct::Vector< T >::clear(), es, s, si, ss, otawa::sem::PathIter::start(), and otawa::stack::STATE.

State& otawa::stack::Iter::state ( void  ) const
inline

References s.

Member Data Documentation

sem::Block otawa::stack::Iter::b
private
State * otawa::stack::Iter::es
private

Referenced by next(), start(), and ~Iter().

BasicBlock::InstIter otawa::stack::Iter::i
private

Referenced by ended(), and instruction().

StackProblem* otawa::stack::Iter::p
private

Referenced by getMem(), getReg(), and next().

State* otawa::stack::Iter::s
private

Referenced by next(), start(), state(), and ~Iter().

sem::PathIter otawa::stack::Iter::si
private
genstruct::Vector<State *> otawa::stack::Iter::ss
private

Referenced by next(), and start().


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