diff options
| author | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-06-02 09:42:43 +0000 |
|---|---|---|
| committer | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-06-02 09:42:43 +0000 |
| commit | 43eb31bfae470b33bab9a6764b98b5e8a0beeda5 (patch) | |
| tree | 9751b83c2cc411dfc58438db8a03d149e90b720f /include/llvm/Support/IntegersSubsetMapping.h | |
| parent | 0fa2b7b90df9a20baf2d14b7bc4fe7db5144efde (diff) | |
| download | external_llvm-43eb31bfae470b33bab9a6764b98b5e8a0beeda5.zip external_llvm-43eb31bfae470b33bab9a6764b98b5e8a0beeda5.tar.gz external_llvm-43eb31bfae470b33bab9a6764b98b5e8a0beeda5.tar.bz2 | |
PR1255: case ranges.
IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/IntegersSubsetMapping.h')
| -rw-r--r-- | include/llvm/Support/IntegersSubsetMapping.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/Support/IntegersSubsetMapping.h b/include/llvm/Support/IntegersSubsetMapping.h index 7ff317b..b630119 100644 --- a/include/llvm/Support/IntegersSubsetMapping.h +++ b/include/llvm/Support/IntegersSubsetMapping.h @@ -36,7 +36,7 @@ public: struct RangeEx : public RangeTy { RangeEx() : Weight(1) {} - RangeEx(const RangeTy &R) : RangeTy(R.Low, R.High), Weight(1) {} + RangeEx(const RangeTy &R) : RangeTy(R), Weight(1) {} RangeEx(const IntTy &C) : RangeTy(C), Weight(1) {} RangeEx(const IntTy &L, const IntTy &H) : RangeTy(L, H), Weight(1) {} RangeEx(const IntTy &L, const IntTy &H, unsigned W) : @@ -68,7 +68,7 @@ protected: bool Sorted; bool isIntersected(CaseItemIt& LItem, CaseItemIt& RItem) { - return LItem->first.High >= RItem->first.Low; + return LItem->first.getHigh() >= RItem->first.getLow(); } bool isJoinable(CaseItemIt& LItem, CaseItemIt& RItem) { @@ -77,10 +77,10 @@ protected: "Intersected items with different successors!"); return false; } - APInt RLow = RItem->first.Low; + APInt RLow = RItem->first.getLow(); if (RLow != APInt::getNullValue(RLow.getBitWidth())) --RLow; - return LItem->first.High >= RLow; + return LItem->first.getHigh() >= RLow; } void sort() { @@ -126,22 +126,22 @@ public: sort(); CaseItems OldItems = Items; Items.clear(); - IntTy *Low = &OldItems.begin()->first.Low; - IntTy *High = &OldItems.begin()->first.High; + const IntTy *Low = &OldItems.begin()->first.getLow(); + const IntTy *High = &OldItems.begin()->first.getHigh(); unsigned Weight = 1; SuccessorClass *Successor = OldItems.begin()->second; for (CaseItemIt i = OldItems.begin(), j = i+1, e = OldItems.end(); j != e; i = j++) { if (isJoinable(i, j)) { - IntTy *CurHigh = &j->first.High; + const IntTy *CurHigh = &j->first.getHigh(); ++Weight; if (*CurHigh > *High) High = CurHigh; } else { RangeEx R(*Low, *High, Weight); add(R, Successor); - Low = &j->first.Low; - High = &j->first.High; + Low = &j->first.getLow(); + High = &j->first.getHigh(); Weight = 1; Successor = j->second; } |
