Uh oh!
There was an error while loading. Please reload this page.
JIT: Prototype an aggressive SSA-based dead code elimination phase - #103087
JIT: Prototype an aggressive SSA-based dead code elimination phase#103087jakobbotsch wants to merge 9 commits into
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
jakobbotsch
commented
Jun 5, 2024
This algorithm unfortunately does not seem to be compatible with IL semantics. In particular it is very non-trivial to identify when we can get rid of conditional backedges because it requires us to prove that the forward edge will eventually be taken. That is, for an example like publicstaticvoidTest(intk){for(inti=0;i<=k;i++){}}the algorithm naturally uncovers that the loop has no side effect, and will happily delete |
Unlike normal liveness based DCE, this algorithm is able to remove loops that do not compute any values that are externally visible.
The algorithm implemented here appears in Cytron, Ron, et al. "Efficiently computing static single assignment form and the control dependence graph.". It was implemented in collaboration with @AndyAyersMS and @TIHan.
Example:
Before:
After: