[code-reflection] Integrated: Bytecode locals compaction
Adam Sotona
asotona at openjdk.org
Wed Sep 11 08:46:38 UTC 2024
On Mon, 9 Sep 2024 17:35:04 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> `LocalsCompactor` is a bytecode transformation reducing generated method `maxLocals` by re-using local slots.
> Roundtrip of lift and bytecode generation doubles the `maxLocals` value, while `LocalsCompactor` reduces the regression by 50%.
>
> Lifting of compacted locals revealed bugs in `LocalsTypeMapper` variables graph construction. This patch includes significantly refactored `LocalsTypeMapper` to support lifting of compacted locals.
>
> `BytecodeGenerator` has slightly improved performance (so `TestSmallCorpus` finishes in a reasonable time). However performance has not been main focus of this PR.
>
> `TestSmallCorpus` has been slightly refactored to provide better debugging feedback and compaction statistics. Overall stability is still >99%.
>
> Please review.
>
> Thanks,
> Adam
This pull request has now been integrated.
Changeset: 15e8b6e4
Author: Adam Sotona <asotona at openjdk.org>
URL: https://git.openjdk.org/babylon/commit/15e8b6e48a1c799f420583d69988e822fb047164
Stats: 684 lines in 5 files changed: 483 ins; 102 del; 99 mod
Bytecode locals compaction
Reviewed-by: psandoz
-------------
PR: https://git.openjdk.org/babylon/pull/224
More information about the babylon-dev
mailing list