RFR: 8348556: Inlining fails earlier for MemorySegment::reinterpret [v6]

Per Minborg pminborg at openjdk.org
Tue Apr 8 11:44:23 UTC 2025


On Tue, 8 Apr 2025 11:33:54 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> This PR proposes to add some `@ForceInline` annotations in the `Module` class in order to assist inlining of FFM var/method handles.
>> 
>> There are also some changes in other classes which, if implemented, can take us three additional levels of inlining. I drew a line there. There is a tradeoff with adding `@ForceInline` and just trying to get as deep as possible for a specific use case is probably not the best idea. 
>> 
>> I have opted not to inline the `j.l.Object` constructor in anticipation of broad impact. This currently sets the depth limit for this use case.
>> 
>> Tested and passed tier1-3
>
> Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains nine additional commits since the last revision:
> 
>  - Revert copyright year
>  - Revert changes to Object
>  - Merge branch 'master' into module-force-inline
>  - Add more @ForceInline and a benchmark
>  - Remove reformatting
>  - Remove file
>  - Revert change
>  - Rename method and variable
>  - Add @ForceInline annotations and restructure some methods

I have reverted the changes to `Object` and so, resetting the number of required reviewers

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

PR Comment: https://git.openjdk.org/jdk/pull/23460#issuecomment-2786158848


More information about the hotspot-compiler-dev mailing list