swift
be475827 - [pmo] Move handling of releases: ElementUseCollector::{collectFrom,collectContainerUses}()

Commit
6 years ago
[pmo] Move handling of releases: ElementUseCollector::{collectFrom,collectContainerUses}() Since: 1. We only handle alloc_stack, alloc_box in predictable memopts. 2. alloc_stack can not be released. We know that the release collecting in collectFrom can just be done in collectContainerUses() [which only processes alloc_box]. This also let me simplify some code as well and add a defensive check in case for some reason we are passed a release_value on the box. NOTE: I verified that previously this did not result in a bug since we would consider the release_value to be an escape of the underlying value even though we didn't handle it in collectFrom. But the proper way to handle release_value is like strong_release, so I added code to do that as well.
Author
Committer
Parents
Loading