swift
ca503b54 - Redesign PrunedLiveness APIs, introducing live ranges

Commit
3 years ago
Redesign PrunedLiveness APIs, introducing live ranges First restore the basic PrunedLiveness abstraction to its original intention. Move code outside of the basic abstraction that polutes the abstraction and is fundamentally wrong from the perspective of the liveness abstraction. Most clients need to reason about live ranges, including the def points, not just liveness based on use points. Add a PrunedLiveRange layer of types that understand where the live range is defined. Knowing where the live range is defined (the kill set) helps reliably check that arbitrary points are within the boundary. This way, the client doesn't need to be manage this on its own. We can also support holes in the live range for non-SSA liveness. This makes it safe and correct for the way liveness is now being used. This layer safety handles: - multiple defs - instructions that are both uses and defs - dead values - unreachable code - self-loops So it's no longer the client's responsibility to check these things! Add SSAPrunedLiveness and MultiDefPrunedLiveness to safely handle each situation. Split code that I can't figure out into DiagnosticPrunedLiveness. Hopefully it will be deleted soon.
Author
Committer
Parents
Loading