RFR: 8332498: [aarch64, x86] improving OpToAssembly output for partialSubtypeCheckConstSuper Instruct
Amit Kumar
amitkumar at openjdk.org
Mon May 20 14:14:00 UTC 2024
On Sun, 19 May 2024 15:36:15 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
> format method generated previously:
>
> void partialSubtypeCheckConstSuperNode::format(PhaseRegAlloc *ra, outputStream *st) const {
> // Start at oper_input_base() and count operands
> unsigned idx0 = 1;
> unsigned idx1 = 1; // sub
> unsigned idx2 = idx1 + opnd_array(1)->num_edges(); // super_reg
> unsigned idx3 = idx2 + opnd_array(2)->num_edges(); // super_con
> unsigned idx4 = idx3 + opnd_array(3)->num_edges(); // vtemp
> unsigned idx5 = idx4 + opnd_array(4)->num_edges(); // tempR1
> unsigned idx6 = idx5 + opnd_array(5)->num_edges(); // tempR2
> unsigned idx7 = idx6 + opnd_array(6)->num_edges(); // tempR3
> st->print_raw("partialSubtypeCheck ");
> opnd_array(0)->int_format(ra, this, st); // result
> st->print_raw(", ");
> opnd_array(1)->ext_format(ra, this,idx1, st); // sub
> st->print_raw(", super");
> }
>
>
> format method generated with this change:
>
> void partialSubtypeCheckConstSuperNode::format(PhaseRegAlloc *ra, outputStream *st) const {
> // Start at oper_input_base() and count operands
> unsigned idx0 = 1;
> unsigned idx1 = 1; // sub
> unsigned idx2 = idx1 + opnd_array(1)->num_edges(); // super_reg
> unsigned idx3 = idx2 + opnd_array(2)->num_edges(); // super_con
> unsigned idx4 = idx3 + opnd_array(3)->num_edges(); // vtemp
> unsigned idx5 = idx4 + opnd_array(4)->num_edges(); // tempR1
> unsigned idx6 = idx5 + opnd_array(5)->num_edges(); // tempR2
> unsigned idx7 = idx6 + opnd_array(6)->num_edges(); // tempR3
> st->print_raw("partialSubtypeCheck ");
> opnd_array(0)->int_format(ra, this, st); // result
> st->print_raw(", ");
> opnd_array(1)->ext_format(ra, this,idx1, st); // sub
> st->print_raw(", ");
> opnd_array(2)->ext_format(ra, this,idx2, st); // super_reg
> st->print_raw(", ");
> opnd_array(3)->ext_format(ra, this,idx3, st); // super_con
> }
@theRealAph would you review this trivial fix.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19295#issuecomment-2120545914
More information about the hotspot-compiler-dev
mailing list