swift
4d20423e - Optimizer: re-implement the RedundantLoadElimination pass in Swift

Commit
2 years ago
Optimizer: re-implement the RedundantLoadElimination pass in Swift The new implementation has several benefits compared to the old C++ implementation: * It is significantly simpler. It optimizes each load separately instead of all at once with bit-field based dataflow. * It's using alias analysis more accurately which enables more loads to be optimized * It avoids inserting additional copies in OSSA The algorithm is a data flow analysis which starts at the original load and searches for preceding stores or loads by following the control flow in backward direction. The preceding stores and loads provide the "available values" with which the original load can be replaced.
Author
Committer
Parents
Loading