Skip branch folding in ilgen if OSR enabled#23097
Skip branch folding in ilgen if OSR enabled#23097vijaysun-omr merged 1 commit intoeclipse-openj9:masterfrom
Conversation
Do not perform branch folding in ilgen if OSR is enabled. OSR def and liveness analyses rely on dataflow over the IL trees to make conclusions about the bytecode. To ensure correctness, the IL must accurately reflect the bytecode at the time of OSR analysis: It should preserve the same CFG and perform all local variable loads and stores at the same points as in the bytecode. Branch folding will likely be taken care of by later optimizations after OSR analyses such as tree simplification, etc. Signed-off-by: Annabelle Huo <[email protected]>
|
A little more information on what the trees will look like with this change if OSR is enabled. Without this change, With this change before osrLiveRangeAnalysis: With this change after treeSimplification: @vijaysun-omr May I ask you to review this change? Thank you! @jdmpapin Thank you very much for your help in identifying the proper fix! |
|
jenkins test sanity all jdk21 |
|
Three test failures are all known issues or have been observed in other PR build tests. (1) (2) (3) |
Do not perform branch folding in ilgen if OSR is enabled. OSR def and liveness analyses rely on dataflow over the IL trees to make conclusions about the bytecode. To ensure correctness, the IL must accurately reflect the bytecode at the time of OSR analysis: It should preserve the same CFG and perform all local variable loads and stores at the same points as in the bytecode. Branch folding will likely be taken care of by later optimizations after OSR analyses such as tree simplification, etc.