[code-reflection] RFR: OpBuilder optimizations - part 1. [v5]

Adam Sotona asotona at openjdk.org
Tue Nov 18 10:26:14 UTC 2025


On Tue, 18 Nov 2025 10:09:23 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> This PR include following changes:
>> 
>> - op-building methods delegate to a synthetic inner class
>> - fixed boxing in `OpBuilder`
>> - op-building methods are generated by `BytecodeGenerator` and support wide range of ops
>> - `CodeModelTranslator` is deleted
>> - synthetic op-building method overrides significantly reduce overhead (by 60% on `TestBytecode`)
>> - refactored `OpBuilder` to build `ModuleOp` instead of individual `FuncCallOp`s 
>> - fixed `BytecodeGenerator` to support `ModuleOp` and `FuncCallOp`
>
> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Op reverted to the original
>    
>  - builder methods delegating to the synth. inner class

I suggest to merge current PR, so @mabbay can follow up with part 2. of the optimization and I can independently follow up with the strategy proposed by @mcimadamore in the comment above.

-------------

PR Comment: https://git.openjdk.org/babylon/pull/679#issuecomment-3546728292


More information about the babylon-dev mailing list