RFR: 8339849: Enumerate opto and C1 stubs, generate enums, names, fields and generator calls
Andrew Dinn
adinn at openjdk.org
Wed Sep 11 08:41:09 UTC 2024
On Tue, 10 Sep 2024 15:27:09 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
> Systematize handling of Opto and C1 stubs. Generate enum ids, static fields, stub/blob names and generator code from declarations using template macros as previously done with Shared stubs. Systematically reference stubs and stub names using ids.
src/hotspot/share/opto/runtime.cpp line 151:
> 149: // defines temporarily rebind the generated names to reference the
> 150: // relevant implementations.
> 151:
I am not 100% happy about using defines to finesse this problem of common C targets.
One alternative here is to define methods local to class OptoRuntime which fit the generator naming convention and have them forward the call to the SharedRuntime methods. n.b. I used (local) method forwarding to allow blobs to share common typefunc providers.
Another alternative is to declare the C target as a parameter to the opto blob declaration macro. That's more flexible but in almost all cases it repeats information already present and makes understanding and updating the declarations more complex.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20936#discussion_r1753617986
More information about the hotspot-dev
mailing list