[code-reflection] RFR: Improved NormalizeBlocksTransformer and its application in BytecodeGenerator.
Adam Sotona
asotona at openjdk.org
Wed Jan 14 17:36:05 UTC 2026
On Mon, 12 Jan 2026 12:06:04 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> Lowering of pattern matching in switch statements and expressions produces an inefficient tree of conditional branches. This PR does not improve the lowering itself; however, it reduces overhead in the generated bytecode.
>
> `NormalizeBlocksTransformer` is improved to handle redundant conditional branches. It skips intermediate conditional branches with constant boolean arguments and re-targets them directly to the true or false branch, based on the argument's constant value.
>
> The `BytecodeGenerator` prepends `NormalizeBlocksTransformer` to leverage the optimized models for bytecode generation.
... working on move to `NormalizeBlocksTransformer`
-------------
PR Comment: https://git.openjdk.org/babylon/pull/829#issuecomment-3740017972
More information about the babylon-dev
mailing list