RFR(M): 8028580: PPC64 (part 114/120): Support for Call nodes with constants.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Tue Nov 19 15:24:51 PST 2013


Hi Vladimir, 

> I think the next code should be more general
I know what you mean.  But I have no way to find out what kind of constant the
nodes will put into the table. So I can not check for their size in this loop.
That's all hidden in the emitters, which are platform dependent.
So I must assume 8 bytes of size.

Therefore I proposed to move the functionality from MachConstantNode
to operands, and add operands to calls (similar to TEMP operands).  Then 
I could check the operands in this loop and find out about the constants
But I guess that's far more change, out of scope for the PPC port.  

I updated the webrev with the improved formatting.

Thanks a lot for the review!
  Best regards,
  Goetz


-----Original Message-----
From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com] 
Sent: Tuesday, November 19, 2013 11:04 PM
To: Lindenmaier, Goetz; 'hotspot-dev at openjdk.java.net'; 'ppc-aix-port-dev at openjdk.java.net'
Subject: Re: RFR(M): 8028580: PPC64 (part 114/120): Support for Call nodes with constants.

It is much better than I expected!
This is too good to be true :) Are you sure it is complete changes?

Few small notes:

Could you, please, change code (new and old) in in_RegMask() methods you 
touched in machnode.cpp to put 'return' on separate line after condition 
and use {} ?

I think the next code should be more general where you loop over all 
const inputs and ask each one for size:

add_size += (n->as_Mach()->ins_num_consts() * 8);

In ConstantTable::calculate_offsets_and_size() we have:

     int typesize = type_to_size_in_bytes(con->type());
     offset = align_size_up(offset, typesize);

Thanks,
Vladimir

On 11/19/13 3:58 AM, Lindenmaier, Goetz wrote:
> Hi,
>
> C2 Call nodes use several constant values. So far C2 does not
> support placing these values in the constant table of the nmethod.
>
> Among others, these constants are
>   - the called address
> - the inline cache
> - values required by the C-calling convention (on PPC, env pointer
>     and toc from function descriptor)
>
> This change extends Call nodes so that they can issue constants
> to the constant table.
> http://cr.openjdk.java.net/~goetz/webrevs/8028580-0-call/
>
> - Extend adlc to add edge to MachConstantBaseNode if
>    $constanttablebase is used in the specification.
> - Extend Call nodes to deliver proper register mask to
>    register allocation for this new input.
> - Add method ins_num_consts() so that number of required
>    constants can be specified in the call node.
> - Extend output() so that it reserves space for the
>    constants in the Calls, using ins_num_consts().
>
> Please review and test this change.
>
> Thanks and best regards,
>    Goetz.
>


More information about the ppc-aix-port-dev mailing list