File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -137,35 +137,14 @@ class CanonicalOSSAConsumeInfo {
137
137
// / Record any debug_value instructions found after a final consume.
138
138
SmallVector<DebugValueInst *, 8 > debugAfterConsume;
139
139
140
- // / The set of non-destroy consumes that need to be poisoned. This is
141
- // / determined in two steps. First findOrInsertDestroyInBlock() checks if the
142
- // / lifetime shrank within the block. Second rewriteCopies() checks if the
143
- // / consume is in remnantLiveOutBlock(). Finally injectPoison() inserts new
144
- // / copies and poison destroys for everything in this set.
145
- SmallPtrSetVector<SILInstruction *, 4 > needsPoisonConsumes;
146
-
147
140
public:
148
141
void clear () {
149
142
finalBlockConsumes.clear ();
150
143
debugAfterConsume.clear ();
151
- needsPoisonConsumes.clear ();
152
144
}
153
145
154
146
bool empty () {
155
- return finalBlockConsumes.empty () && debugAfterConsume.empty ()
156
- && needsPoisonConsumes.empty ();
157
- }
158
-
159
- void recordNeedsPoison (SILInstruction *consume) {
160
- needsPoisonConsumes.insert (consume);
161
- }
162
-
163
- bool needsPoison (SILInstruction *consume) const {
164
- return needsPoisonConsumes.count (consume);
165
- }
166
-
167
- ArrayRef<SILInstruction *> getNeedsPoisonConsumes () const {
168
- return needsPoisonConsumes.getArrayRef ();
147
+ return finalBlockConsumes.empty () && debugAfterConsume.empty ();
169
148
}
170
149
171
150
bool hasUnclaimedConsumes () const { return !finalBlockConsumes.empty (); }
You can’t perform that action at this time.
0 commit comments