File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -260,13 +260,12 @@ bool ElementUseCollector::collectFrom() {
260
260
return false ;
261
261
262
262
// Collect information about the retain count result as well.
263
- for (auto UI : TheMemory.MemoryInst ->getUses ()) {
264
- auto *User = UI ->getUser ();
263
+ for (auto *op : TheMemory.MemoryInst ->getUses ()) {
264
+ auto *user = op ->getUser ();
265
265
266
- // If this is a release or dealloc_stack, then remember it as such.
267
- if (isa<StrongReleaseInst>(User) || isa<DeallocStackInst>(User) ||
268
- isa<DeallocBoxInst>(User)) {
269
- Releases.push_back (User);
266
+ // If this is a strong_release, stash it.
267
+ if (isa<StrongReleaseInst>(user)) {
268
+ Releases.push_back (user);
270
269
}
271
270
}
272
271
Original file line number Diff line number Diff line change @@ -1282,7 +1282,7 @@ bool AllocOptimize::tryToRemoveDeadAllocation() {
1282
1282
if (!MemoryType.isTrivial (Module)) {
1283
1283
for (auto P : llvm::enumerate (Releases)) {
1284
1284
auto *R = P.value ();
1285
- if (R == nullptr || isa<DeallocStackInst>(R) || isa<DeallocBoxInst>(R) )
1285
+ if (R == nullptr )
1286
1286
continue ;
1287
1287
1288
1288
// We stash all of the destroy_addr that we see.
You can’t perform that action at this time.
0 commit comments