[lworld] RFR: 8327150: [lworld] Update C1 to support new value construction scheme from JEP 401
Frederic Parain
fparain at openjdk.org
Mon Mar 4 14:10:58 UTC 2024
On Mon, 4 Mar 2024 13:36:58 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Fix value creation in C1, remove the old special node for value creation and out everything under the NewInstance node.
>> There's also a fix in can_be_inline_klass() method that was causing a wrong behavior for acmp.
>
> src/hotspot/share/c1/c1_Compiler.cpp line 260:
>
>> 258: if (PrintCFGToFile) { // borrowing flag for JDK build
>> 259: tty->print_cr("Starting C1 compilation of %s.%s", method->holder()->name()->as_utf8(), method->name()->as_utf8());
>> 260: }
>
> Why do you need this?
Oops, remaining of tracing during debugging. Removed.
> src/hotspot/share/c1/c1_Instruction.hpp line 2068:
>
>> 2066: // FIXME: Removal of NewInlineTypeInstance instruction makes those assert hard to write
>> 2067: // assert(x->as_NewInlineTypeInstance() == nullptr || y->type() == objectNull, "Sanity check");
>> 2068: // assert(y->as_NewInlineTypeInstance() == nullptr || x->type() == objectNull, "Sanity check");
>
> Let's remove these checks for now.
OK
> src/hotspot/share/c1/c1_Runtime1.cpp line 373:
>
>> 371: h->initialize(CHECK);
>> 372: oop obj = nullptr;
>> 373: if(h->is_empty_inline_type()) {
>
> Suggestion:
>
> if (h->is_empty_inline_type()) {
Fixed.
> src/hotspot/share/c1/c1_Runtime1.cpp line 374:
>
>> 372: oop obj = nullptr;
>> 373: if(h->is_empty_inline_type()) {
>> 374: assert(h->is_inline_klass(), "Sanity check");
>
> Below `InlineKlass::cast` will already assert that.
Removed.
> src/hotspot/share/c1/c1_Runtime1.cpp line 375:
>
>> 373: if(h->is_empty_inline_type()) {
>> 374: assert(h->is_inline_klass(), "Sanity check");
>> 375: assert(InlineKlass::cast(h)->default_value() != nullptr, "");
>
> This can be moved below and check `obj != nullptr` directly.
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1029#discussion_r1511223684
PR Review Comment: https://git.openjdk.org/valhalla/pull/1029#discussion_r1511222524
PR Review Comment: https://git.openjdk.org/valhalla/pull/1029#discussion_r1511218396
PR Review Comment: https://git.openjdk.org/valhalla/pull/1029#discussion_r1511221526
PR Review Comment: https://git.openjdk.org/valhalla/pull/1029#discussion_r1511221856
More information about the valhalla-dev
mailing list