You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JIT: Optimize data flow used in assertion prop/CSE (#94701)
The data flow used by assertion prop and CSE utilize "all-succs" which
includes handler successors. However, in reality neither analysis needs
full treatment of handlers; we do not CSE variables that are live-in to
handlers, and assertion prop never kills assertions that would need to
be propagated to handlers.
Additionally, the data flow framework used conflates end-of-block
propagation of facts with reachability of the handler. If no facts
changed at the ends of the preds of the handler, then the handler is not
visited. This is despite the fact that the handler in the general case
is also reachable with facts from the beginning of every enclosed basic
block (or more generally with facts that were invalidated in the middle
of enclosed basic blocks).
This ends up working out today only because of the fake successor edges
we have from preds of the try to the handler, in addition to the
restrictions on the data flows described above. Since I'm removing these
fake edges, we need a more explicit solution. The change here has such a
solution, by making it more explicit what exactly is needed in the data
flow for CSE and AP here: they only need to consider regular successors,
with the added catch that they need to consider reachability of handlers
once we see the corresponding 'try' being reachable.
0 commit comments