File tree Expand file tree Collapse file tree 5 files changed +57
-964
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 5 files changed +57
-964
lines changed Original file line number Diff line number Diff line change @@ -91,17 +91,11 @@ class FrozenMultiMap {
91
91
frozen = true ;
92
92
}
93
93
94
- // / Reset the frozen multimap in an unfrozen state with its storage cleared.
95
- void reset () {
96
- storage.clear ();
97
- frozen = false ;
98
- }
99
-
100
94
unsigned size () const { return storage.size (); }
101
95
bool empty () const { return storage.empty (); }
102
96
103
97
struct iterator : std::iterator<std::forward_iterator_tag,
104
- std::pair<Key, PairToSecondEltRange >> {
98
+ std::pair<Key, ArrayRef<Value> >> {
105
99
using base_iterator = typename decltype (storage)::iterator;
106
100
107
101
FrozenMultiMap ↦
@@ -165,11 +159,9 @@ class FrozenMultiMap {
165
159
}
166
160
};
167
161
168
- using RangeType = llvm::iterator_range<iterator>;
169
-
170
162
// / Return a range of (key, ArrayRef<Value>) pairs. The keys are guaranteed to
171
163
// / be in key sorted order and the ArrayRef<Value> are in insertion order.
172
- RangeType getRange () const {
164
+ llvm::iterator_range<iterator> getRange () const {
173
165
assert (isFrozen () &&
174
166
" Can not create range until data structure is frozen?!" );
175
167
auto *self = const_cast <FrozenMultiMap *>(this );
Original file line number Diff line number Diff line change @@ -598,28 +598,6 @@ struct OwnedValueIntroducer {
598
598
return OwnedValueIntroducer (value, *kind);
599
599
}
600
600
601
- // / Returns true if this owned introducer is able to be converted into a
602
- // / guaranteed form if none of its uses are consuming uses (looking through
603
- // / forwarding uses).
604
- bool isConvertableToGuaranteed () const {
605
- switch (kind) {
606
- case OwnedValueIntroducerKind::Copy:
607
- case OwnedValueIntroducerKind::LoadCopy:
608
- return true ;
609
- case OwnedValueIntroducerKind::Apply:
610
- case OwnedValueIntroducerKind::BeginApply:
611
- case OwnedValueIntroducerKind::TryApply:
612
- case OwnedValueIntroducerKind::LoadTake:
613
- case OwnedValueIntroducerKind::Phi:
614
- case OwnedValueIntroducerKind::FunctionArgument:
615
- case OwnedValueIntroducerKind::PartialApplyInit:
616
- case OwnedValueIntroducerKind::AllocBoxInit:
617
- case OwnedValueIntroducerKind::AllocRefInit:
618
- return false ;
619
- }
620
- llvm_unreachable (" Covered switch isn't covered?!" );
621
- }
622
-
623
601
bool operator ==(const OwnedValueIntroducer &other) const {
624
602
return value == other.value ;
625
603
}
You can’t perform that action at this time.
0 commit comments