Otawa  0.10
otawa::ccg::Domain Class Reference

#include <otawa/ccg/DFA.h>

Inheritance diagram for otawa::ccg::Domain:
otawa::dfa::BitSet

Public Member Functions

 Domain (int size)
 
void reset (void)
 
void join (Domain *d)
 
void meet (Domain *d)
 
bool equals (Domain *d)
 
bool isEmpty (void) const
 Test if the bit set is empty. More...
 
bool isFull (void) const
 Test if the bit set contains all existing items. More...
 
void fill (void)
 Fill the bit set with all items. More...
 
void empty (void)
 Remove all items from the bit set. More...
 
bool contains (int index) const
 Test if the bit set contains an item. More...
 
void add (int index)
 Add an item to the bit set. More...
 
void add (const BitSet &set)
 Add the items of the given bit set to the current one. More...
 
void remove (int index)
 Remove an item from the bit set. More...
 
void remove (const BitSet &set)
 Remove the items contained in the given bit set from the current one. More...
 
bool equals (const BitSet &set) const
 Test if two bit sets are equals. More...
 
bool includes (const BitSet &set) const
 Test if the current bit set contains the given one. More...
 
bool includesStrictly (const BitSet &set) const
 Test if the current bit set contains strictly the given one, that is, both bit sets are equals. More...
 
void complement (void)
 Complement the current bit set. More...
 
int size (void) const
 
void mask (const BitSet &set)
 Keep only in this set the items also containted in the given one (performs intersection operation). More...
 
int count (void) const
 
BitSet doComp (void) const
 Compute a bit set complement of the current one. More...
 
BitSet doUnion (const BitSet &set) const
 Build a new bit set as union between the current and the given one. More...
 
BitSet doInter (const BitSet &set) const
 Build a new bit set as intersection between the current and the given one. More...
 
BitSet doDiff (const BitSet &set) const
 Build a new bit set as difference between the current and the given one. More...
 
BitSetoperator+= (int index)
 Same as add(int). More...
 
BitSetoperator+= (const BitSet &set)
 Same as add(const BitSet&). More...
 
BitSetoperator-= (int index)
 Same as remove(int). More...
 
BitSetoperator-= (const BitSet &set)
 Same as remove(const BitSet&). More...
 
BitSet operator+ (const BitSet &set)
 Same as doUnion(). More...
 
BitSet operator- (const BitSet &set)
 Same as doDiff(). More...
 
BitSetoperator|= (const BitSet &set)
 Same as add(const BitSet&). More...
 
BitSetoperator&= (const BitSet &set)
 Same as remove(const BitSet&). More...
 
BitSet operator| (const BitSet &set)
 Same as doUnion(). More...
 
BitSet operator& (const BitSet &set)
 Same as doInter(). More...
 
bool operator== (const BitSet &set) const
 Same as equals(). More...
 
bool operator!= (const BitSet &set) const
 Same as !equals(). More...
 
bool operator>= (const BitSet &set) const
 Same as includes(). More...
 
bool operator<= (const BitSet &set) const
 Same as !includesStrictly(). More...
 
bool operator> (const BitSet &set) const
 Same as includesStrictly(). More...
 
bool operator< (const BitSet &set) const
 Same as !includes(). More...
 

Static Public Attributes

static int __used_size = 0
 
static int __max_size = 0
 
static int __total_size = 0
 

Constructor & Destructor Documentation

otawa::ccg::Domain::Domain ( int  size)
inline

Member Function Documentation

void otawa::dfa::BitSet::add ( const BitSet set)
inlineinherited

Add the items of the given bit set to the current one.

Parameters
setSet to add.

References elm::BitVector::applyOr(), OTAWA_BITSET_ALLOC, OTAWA_BITSET_FREE, and otawa::dfa::BitSet::vec.

void otawa::dfa::BitSet::complement ( void  )
inlineinherited

Complement the current bit set.

References elm::BitVector::applyNot(), and otawa::dfa::BitSet::vec.

Referenced by otawa::cat::CATProblem::preserve().

BitSet otawa::dfa::BitSet::doComp ( void  ) const
inlineinherited

Compute a bit set complement of the current one.

Returns
Complemented bit set.

References otawa::dfa::BitSet::BitSet(), elm::BitVector::makeNot(), and otawa::dfa::BitSet::vec.

BitSet otawa::dfa::BitSet::doDiff ( const BitSet set) const
inlineinherited

Build a new bit set as difference between the current and the given one.

Parameters
setSet to do difference with.
Returns
Difference of both sets.

References otawa::dfa::BitSet::BitSet(), elm::BitVector::makeReset(), and otawa::dfa::BitSet::vec.

Referenced by otawa::dfa::BitSet::operator-().

BitSet otawa::dfa::BitSet::doInter ( const BitSet set) const
inlineinherited

Build a new bit set as intersection between the current and the given one.

Parameters
setSet to do intersection with.
Returns
Intersection of both sets.

References otawa::dfa::BitSet::BitSet(), elm::BitVector::makeAnd(), and otawa::dfa::BitSet::vec.

Referenced by otawa::dfa::BitSet::operator&().

BitSet otawa::dfa::BitSet::doUnion ( const BitSet set) const
inlineinherited

Build a new bit set as union between the current and the given one.

Parameters
setSet to do union with.
Returns
Union of both sets.

References otawa::dfa::BitSet::BitSet(), elm::BitVector::makeOr(), and otawa::dfa::BitSet::vec.

Referenced by otawa::dfa::BitSet::operator+(), and otawa::dfa::BitSet::operator|().

void otawa::dfa::BitSet::empty ( void  )
inlineinherited
bool otawa::ccg::Domain::equals ( Domain d)
inline
bool otawa::dfa::BitSet::equals ( const BitSet set) const
inlineinherited

Test if two bit sets are equals.

Parameters
setBit set to compare the current one with.
Returns
True if they are equal, false else.

References elm::BitVector::equals(), and otawa::dfa::BitSet::vec.

Referenced by equals(), otawa::dcache::DirtyManager::equals(), otawa::dfa::BitSet::operator!=(), and otawa::dfa::BitSet::operator==().

void otawa::dfa::BitSet::fill ( void  )
inlineinherited
bool otawa::dfa::BitSet::includes ( const BitSet set) const
inlineinherited

Test if the current bit set contains the given one.

Parameters
setSet to test for inclusion.
Returns
True if the current bit set contains the given one.

References elm::BitVector::includes(), and otawa::dfa::BitSet::vec.

Referenced by otawa::dfa::BitSet::operator<=(), and otawa::dfa::BitSet::operator>=().

bool otawa::dfa::BitSet::includesStrictly ( const BitSet set) const
inlineinherited

Test if the current bit set contains strictly the given one, that is, both bit sets are equals.

Parameters
setSet to test for inclusion.
Returns
True if the current bit set contains the given one.

References elm::BitVector::includesStrictly(), and otawa::dfa::BitSet::vec.

Referenced by otawa::dfa::BitSet::operator<(), and otawa::dfa::BitSet::operator>().

bool otawa::dfa::BitSet::isEmpty ( void  ) const
inlineinherited

Test if the bit set is empty.

Returns
True if it is empty, false else.

References elm::BitVector::isEmpty(), and otawa::dfa::BitSet::vec.

bool otawa::dfa::BitSet::isFull ( void  ) const
inlineinherited

Test if the bit set contains all existing items.

Returns
True if it is full, false else.

References elm::BitVector::countBits(), elm::BitVector::size(), and otawa::dfa::BitSet::vec.

void otawa::ccg::Domain::join ( Domain d)
inline
void otawa::dfa::BitSet::mask ( const BitSet set)
inlineinherited

Keep only in this set the items also containted in the given one (performs intersection operation).

Parameters
setSet to intersect with.

References elm::BitVector::applyAnd(), OTAWA_BITSET_ALLOC, OTAWA_BITSET_FREE, and otawa::dfa::BitSet::vec.

Referenced by meet(), otawa::cat::CATDomain::meet(), otawa::dfa::BitSet::operator&=(), and otawa::cat::CATBuilder::worst().

void otawa::ccg::Domain::meet ( Domain d)
inline
bool otawa::dfa::BitSet::operator!= ( const BitSet set) const
inlineinherited

Same as !equals().

References otawa::dfa::BitSet::equals().

BitSet otawa::dfa::BitSet::operator& ( const BitSet set)
inlineinherited
BitSet & otawa::dfa::BitSet::operator&= ( const BitSet set)
inlineinherited
BitSet otawa::dfa::BitSet::operator+ ( const BitSet set)
inlineinherited
BitSet & otawa::dfa::BitSet::operator+= ( int  index)
inlineinherited

Same as add(int).

References otawa::dfa::BitSet::add().

BitSet & otawa::dfa::BitSet::operator+= ( const BitSet set)
inlineinherited
BitSet otawa::dfa::BitSet::operator- ( const BitSet set)
inlineinherited

Same as doDiff().

References otawa::dfa::BitSet::doDiff().

BitSet & otawa::dfa::BitSet::operator-= ( int  index)
inlineinherited

Same as remove(int).

BitSet & otawa::dfa::BitSet::operator-= ( const BitSet set)
inlineinherited
bool otawa::dfa::BitSet::operator< ( const BitSet set) const
inlineinherited
bool otawa::dfa::BitSet::operator<= ( const BitSet set) const
inlineinherited
bool otawa::dfa::BitSet::operator== ( const BitSet set) const
inlineinherited

Same as equals().

References otawa::dfa::BitSet::equals().

bool otawa::dfa::BitSet::operator> ( const BitSet set) const
inlineinherited
bool otawa::dfa::BitSet::operator>= ( const BitSet set) const
inlineinherited
BitSet otawa::dfa::BitSet::operator| ( const BitSet set)
inlineinherited
BitSet & otawa::dfa::BitSet::operator|= ( const BitSet set)
inlineinherited
void otawa::dfa::BitSet::remove ( int  index)
inlineinherited
void otawa::dfa::BitSet::remove ( const BitSet set)
inlineinherited

Remove the items contained in the given bit set from the current one.

Parameters
setSet containing items to remove.

References elm::BitVector::applyReset(), OTAWA_BITSET_ALLOC, OTAWA_BITSET_FREE, and otawa::dfa::BitSet::vec.

void otawa::ccg::Domain::reset ( void  )
inline

Member Data Documentation

int otawa::dfa::BitSet::__max_size = 0
staticinherited
int otawa::dfa::BitSet::__total_size = 0
staticinherited
int otawa::dfa::BitSet::__used_size = 0
staticinherited

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