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

Adam Sotona asotona at openjdk.org
Tue Nov 18 08:56:05 UTC 2025


> This PR include following changes:
> 
> - op-building methods isolated from the original code and moved 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`)
> 
> Remaining tasks:
> 
> - implement part 2. type-building helper method(s) to reduce the overhead even more
> - refactor `OpBuilder` to build `ModuleOp` instead of individual `FuncOp`s (and re-enable `TestCodeBuilder`)
> - cleanup `BytecodeGenerator` API

Adam Sotona has updated the pull request incrementally with three additional commits since the last revision:

 - ReflectMethods::synthClassDecl generates from module
   
 - OpBuilder forms ModuleOp and support functions renamed
   
 - ModuleOp and FuncCallOp support in BytecodeGenerator

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

Changes:
  - all: https://git.openjdk.org/babylon/pull/679/files
  - new: https://git.openjdk.org/babylon/pull/679/files/50e01fdf..4a12aa77

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=679&range=02
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=679&range=01-02

  Stats: 168 lines in 3 files changed: 57 ins; 45 del; 66 mod
  Patch: https://git.openjdk.org/babylon/pull/679.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/679/head:pull/679

PR: https://git.openjdk.org/babylon/pull/679


More information about the babylon-dev mailing list