swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.37k stars 10.34k forks source link

[NFC] Refactor PredictableMemoryOptimization #76714

Closed atrick closed 2 days ago

atrick commented 2 days ago

In preparation for adding mark_dependence support. Required to support addressors (unsafeAddress) in places other than UnsafePointer.pointee.

This is a literal refactor. It formally separates the load optimizations and dead allocation optimizations, which are actually different algorithms. This obvious refactor will allow each optimization, which is fundamentally different to be naturally extended to handle other kinds of uses, like mark_dependence.

I made no attempt to update the code style. That's not the goal of this PR.

atrick commented 2 days ago

@swift-ci test

atrick commented 2 days ago

A validation test running in the simulator appears to have timed out

atrick commented 2 days ago

@swift-ci smoke test