LLVM API Documentation
#include <IntegersSubsetMapping.h>

Classes | |
| struct | ClustersCmp |
| class | DiffStateMachine |
| struct | RangeEx |
Public Types | |
| typedef IntRange< IntTy > | RangeTy |
| typedef std::pair< RangeEx, SuccessorClass * > | Cluster |
| typedef std::list< RangeTy > | RangesCollection |
| typedef RangesCollection::iterator | RangesCollectionIt |
| typedef RangesCollection::const_iterator | RangesCollectionConstIt |
| typedef IntegersSubsetMapping < SuccessorClass, IntegersSubsetTy, IntTy > | self |
| typedef CaseItemIt | RangeIterator |
| typedef std::pair < SuccessorClass *, IntegersSubsetTy > | Case |
| typedef std::list< Case > | Cases |
| typedef Cases::iterator | CasesIt |
Public Member Functions | |
| IntegersSubsetMapping () | |
| bool | verify () |
| bool | verify (RangeIterator &errItem) |
| bool | isOverlapped (self &RHS) |
| void | optimize () |
| void | add (const IntTy &C, SuccessorClass *S=0) |
| Adds a constant value. | |
| void | add (const IntTy &Low, const IntTy &High, SuccessorClass *S=0) |
| Adds a range. | |
| void | add (const RangeTy &R, SuccessorClass *S=0) |
| void | add (const RangeEx &R, SuccessorClass *S=0) |
| void | add (const IntegersSubsetTy &CRS, SuccessorClass *S=0, unsigned Weight=0) |
| void | add (self &RHS) |
| void | add (self &RHS, SuccessorClass *S) |
| void | add (const RangesCollection &RHS, SuccessorClass *S=0) |
| void | removeItem (RangeIterator i) |
| Removes items from set. | |
| void | detachCase (self &NewMapping, SuccessorClass *Succ) |
| Moves whole case from current mapping to the NewMapping object. | |
| void | removeCase (SuccessorClass *Succ) |
| Removes all clusters for given successor. | |
| SuccessorClass * | findSuccessor (const IntTy &Val) |
| Find successor that satisfies given value. | |
| void | diff (self *LExclude, self *Intersection, self *RExclude, const self &RHS) |
| void | getCases (Cases &TheCases, bool PreventMerging=false) |
| Builds the finalized case objects. | |
| IntegersSubsetTy | getCase () |
| const IntTy * | getCaseSingleNumber (SuccessorClass *Succ) |
| bool | empty () const |
| Returns true if there is no ranges and values inside. | |
| void | clear () |
| unsigned | size () const |
| RangeIterator | begin () |
| RangeIterator | end () |
Protected Types | |
| enum | DiffProcessState { L_OPENED, INTERSECT_OPENED, R_OPENED, ALL_IS_CLOSED } |
| typedef std::list< Cluster > | CaseItems |
| typedef CaseItems::iterator | CaseItemIt |
| typedef CaseItems::const_iterator | CaseItemConstIt |
| typedef std::map < SuccessorClass *, RangesCollection > | CRSMap |
| typedef CRSMap::iterator | CRSMapIt |
Protected Member Functions | |
| bool | isIntersected (CaseItemIt &LItem, CaseItemIt &RItem) |
| bool | isJoinable (CaseItemIt &LItem, CaseItemIt &RItem) |
| void | sort () |
Protected Attributes | |
| CaseItems | Items |
| bool | Sorted |
Definition at line 33 of file IntegersSubsetMapping.h.
| typedef std::pair<SuccessorClass*, IntegersSubsetTy> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Case |
Definition at line 258 of file IntegersSubsetMapping.h.
typedef CaseItems::const_iterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::CaseItemConstIt [protected] |
Definition at line 64 of file IntegersSubsetMapping.h.
typedef CaseItems::iterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::CaseItemIt [protected] |
Definition at line 63 of file IntegersSubsetMapping.h.
typedef std::list<Cluster> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::CaseItems [protected] |
Definition at line 62 of file IntegersSubsetMapping.h.
| typedef std::list<Case> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Cases |
Definition at line 259 of file IntegersSubsetMapping.h.
| typedef Cases::iterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::CasesIt |
Definition at line 260 of file IntegersSubsetMapping.h.
| typedef std::pair<RangeEx, SuccessorClass*> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Cluster |
Definition at line 53 of file IntegersSubsetMapping.h.
typedef std::map<SuccessorClass*, RangesCollection > llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::CRSMap [protected] |
Definition at line 67 of file IntegersSubsetMapping.h.
typedef CRSMap::iterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::CRSMapIt [protected] |
Definition at line 68 of file IntegersSubsetMapping.h.
| typedef CaseItemIt llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::RangeIterator |
Definition at line 256 of file IntegersSubsetMapping.h.
| typedef std::list<RangeTy> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::RangesCollection |
Definition at line 55 of file IntegersSubsetMapping.h.
| typedef RangesCollection::const_iterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::RangesCollectionConstIt |
Definition at line 57 of file IntegersSubsetMapping.h.
| typedef RangesCollection::iterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::RangesCollectionIt |
Definition at line 56 of file IntegersSubsetMapping.h.
| typedef IntRange<IntTy> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::RangeTy |
Definition at line 40 of file IntegersSubsetMapping.h.
| typedef IntegersSubsetMapping<SuccessorClass, IntegersSubsetTy, IntTy> llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::self |
Definition at line 58 of file IntegersSubsetMapping.h.
enum llvm::IntegersSubsetMapping::DiffProcessState [protected] |
Definition at line 107 of file IntegersSubsetMapping.h.
| llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::IntegersSubsetMapping | ( | ) | [inline] |
Definition at line 262 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Sorted.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | const IntTy & | C, |
| SuccessorClass * | S = 0 |
||
| ) | [inline] |
Adds a constant value.
Definition at line 345 of file IntegersSubsetMapping.h.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add(), llvm::SwitchInst::addCase(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLClose(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLOpen(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLRClose(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onRClose(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onROpen(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::optimize(), and llvm::SwitchInst::CaseIt::setValue().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | const IntTy & | Low, |
| const IntTy & | High, | ||
| SuccessorClass * | S = 0 |
||
| ) | [inline] |
Adds a range.
Definition at line 351 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | const RangeTy & | R, |
| SuccessorClass * | S = 0 |
||
| ) | [inline] |
Definition at line 355 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | const RangeEx & | R, |
| SuccessorClass * | S = 0 |
||
| ) | [inline] |
Definition at line 359 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items, and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Sorted.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | const IntegersSubsetTy & | CRS, |
| SuccessorClass * | S = 0, |
||
| unsigned | Weight = 0 |
||
| ) | [inline] |
Adds all ranges and values from given ranges set to the current mapping.
Definition at line 366 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | self & | RHS | ) | [inline] |
Definition at line 380 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | self & | RHS, |
| SuccessorClass * | S | ||
| ) | [inline] |
Definition at line 384 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add | ( | const RangesCollection & | RHS, |
| SuccessorClass * | S = 0 |
||
| ) | [inline] |
Definition at line 389 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add().
| RangeIterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::begin | ( | ) | [inline] |
Definition at line 579 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCase(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCases().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::clear | ( | ) | [inline] |
Definition at line 567 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::detachCase | ( | self & | NewMapping, |
| SuccessorClass * | Succ | ||
| ) | [inline] |
Moves whole case from current mapping to the NewMapping object.
Definition at line 398 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::diff | ( | self * | LExclude, |
| self * | Intersection, | ||
| self * | RExclude, | ||
| const self & | RHS | ||
| ) | [inline] |
Calculates the difference between this mapping and RHS. THIS without RHS is placed into LExclude, RHS without THIS is placed into RExclude, THIS intersect RHS is placed into Intersection.
Definition at line 429 of file IntegersSubsetMapping.h.
References llvm::IntRange< IntType >::getHigh(), llvm::IntRange< IntType >::getLow(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::isLOpened(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::isROpened(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items, Machine, llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLClose(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLOpen(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLRClose(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onLROpen(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onRClose(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::DiffStateMachine::onROpen().
| bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::empty | ( | ) | const [inline] |
Returns true if there is no ranges and values inside.
Definition at line 565 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| RangeIterator llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::end | ( | ) | [inline] |
Definition at line 580 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCase(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCases().
| SuccessorClass* llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::findSuccessor | ( | const IntTy & | Val | ) | [inline] |
Find successor that satisfies given value.
Definition at line 417 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| IntegersSubsetTy llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCase | ( | ) | [inline] |
Builds the finalized case objects ignoring successor values, as though all ranges belongs to the same successor.
Definition at line 541 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::begin(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::end().
Referenced by llvm::SwitchInst::addCase(), and llvm::SwitchInst::CaseIt::setValue().
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCases | ( | Cases & | TheCases, |
| bool | PreventMerging = false |
||
| ) | [inline] |
Builds the finalized case objects.
Definition at line 518 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::begin(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::end().
| const IntTy* llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCaseSingleNumber | ( | SuccessorClass * | Succ | ) | [inline] |
Returns pointer to value of case if it is single-numbered or 0 in another case.
Definition at line 550 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isIntersected | ( | CaseItemIt & | LItem, |
| CaseItemIt & | RItem | ||
| ) | [inline, protected] |
Definition at line 79 of file IntegersSubsetMapping.h.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isJoinable(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::verify().
| bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isJoinable | ( | CaseItemIt & | LItem, |
| CaseItemIt & | RItem | ||
| ) | [inline, protected] |
Definition at line 83 of file IntegersSubsetMapping.h.
References llvm::APInt::getBitWidth(), llvm::APInt::getNullValue(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isIntersected().
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::optimize().
| bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isOverlapped | ( | self & | RHS | ) | [inline] |
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::optimize | ( | ) | [inline] |
Definition at line 312 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isJoinable(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items, llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::sort(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Sorted.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::removeCase | ( | SuccessorClass * | Succ | ) | [inline] |
Removes all clusters for given successor.
Definition at line 408 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::removeItem | ( | RangeIterator | i | ) | [inline] |
Removes items from set.
Definition at line 395 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| unsigned llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::size | ( | ) | const [inline] |
Definition at line 575 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items.
| void llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::sort | ( | ) | [inline, protected] |
Definition at line 95 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items, and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Sorted.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::optimize(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::verify().
| bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::verify | ( | ) | [inline] |
Definition at line 266 of file IntegersSubsetMapping.h.
| bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::verify | ( | RangeIterator & | errItem | ) | [inline] |
Definition at line 271 of file IntegersSubsetMapping.h.
References llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isIntersected(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items, and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::sort().
CaseItems llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Items [protected] |
Definition at line 76 of file IntegersSubsetMapping.h.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::begin(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::clear(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::detachCase(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::diff(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::empty(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::end(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::findSuccessor(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::getCaseSingleNumber(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::isOverlapped(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::optimize(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::removeCase(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::removeItem(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::size(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::sort(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::verify().
bool llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::Sorted [protected] |
Definition at line 77 of file IntegersSubsetMapping.h.
Referenced by llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::add(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::IntegersSubsetMapping(), llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::optimize(), and llvm::IntegersSubsetMapping< SuccessorClass, IntegersSubsetTy, IntTy >::sort().