InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs, const Inst *Linked) : Inst(Func, Inst::FakeKill, KilledRegs.size(), NULL), Linked(Linked) { for (VarList::const_iterator I = KilledRegs.begin(), E = KilledRegs.end(); I != E; ++I) { Variable *Var = *I; addSource(Var); } }
const Var* var( const std::string name ) const { VarList::const_iterator var = m_vars.begin(); VarList::const_iterator last = m_vars.end(); while ( var != last ) { if ( (*var)->name() == name ) break; var++; } return( *var ); }
const Var* var( const size_t index ) const { VarList::const_iterator var = m_vars.begin(); VarList::const_iterator last = m_vars.end(); size_t counter = 0; while ( var != last ) { if ( counter++ == index ) break; var++; } return( *var ); }
~File( void ) { if ( m_file ) delete m_file; DimList::iterator dim = m_dims.begin(); DimList::const_iterator last_dim = m_dims.end(); while ( dim != last_dim ) { if ( *dim ) delete *dim; dim++; } m_dims.clear(); VarList::iterator var = m_vars.begin(); VarList::const_iterator last_var = m_vars.end(); while ( var != last_var ) { if ( *var ) delete *var; var++; } m_vars.clear(); }
/** * Convenience function for conditioning one iterator on the current * value of another. This equalivalent to the following code * <pre> * DomainIterator it1(...), it2(...); * DomainIterator::VarList vars = it1.getVars(); * DomainIterator::IndList inds = it1.getSubInd(); * it2.condition(vars.begin(),vars.end(),inds.begin(), inds.end()); * </pre> * @see DomainIterator::condition(const VarIt,const VarIt,const IndIt,const IndIt) */ void DomainIterator::condition(const DomainIterator& it) { VarList vars = it.getVars(); IndList inds = it.getSubInd(); condition(vars.begin(),vars.end(),inds.begin(), inds.end()); }