RFR: 8339849: Enumerate opto and C1 stubs, generate enums, names, fields and generator calls
Vladimir Kozlov
kvn at openjdk.org
Thu Sep 12 00:30:08 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.
Few comments
src/hotspot/share/c1/c1_CodeStubs.hpp line 267:
> 265: LIR_Opr _result;
> 266: CodeEmitInfo* _info;
> 267: C1StubId _stub_id;
Preserve spacing
src/hotspot/share/c1/c1_CodeStubs.hpp line 518:
> 516: private:
> 517: LIR_Opr _obj;
> 518: C1StubId _stub;
Spacing.
src/hotspot/share/opto/escape.cpp line 2046:
> 2044: if (meth == nullptr) {
> 2045: const char* name = call->as_CallStaticJava()->_name;
> 2046: assert(strncmp(name, "Opto Runtime multianewarray", 27) == 0, "TODO: add failed case check");
Please use "C2" instead of "Opto" in your changes in C2 code and in tests.
src/hotspot/share/opto/runtime.cpp line 92:
> 90:
> 91: #define OPTO_BLOB_FIELD_DEFINE(name, type) \
> 92: type OptoRuntime:: BLOB_FIELD_NAME(name) = nullptr;
Please use C2 instead of OPTO in macro names.
src/hotspot/share/opto/runtime.cpp line 147:
> 145: // from the stub name by appending suffix '_C'. However, in two cases
> 146: // a common target method also needs to be called from shared runtime
> 147: // stubs. In these two cases the opto stubs rely on method
"opto" -> "C2"
-------------
PR Review: https://git.openjdk.org/jdk/pull/20936#pullrequestreview-2298980632
PR Review Comment: https://git.openjdk.org/jdk/pull/20936#discussion_r1755886284
PR Review Comment: https://git.openjdk.org/jdk/pull/20936#discussion_r1755888197
PR Review Comment: https://git.openjdk.org/jdk/pull/20936#discussion_r1755890608
PR Review Comment: https://git.openjdk.org/jdk/pull/20936#discussion_r1755895998
PR Review Comment: https://git.openjdk.org/jdk/pull/20936#discussion_r1755901868
More information about the hotspot-dev
mailing list