RFR/RFC calling convention change for value types in compiled code

Tobias Hartmann tobias.hartmann at oracle.com
Tue Dec 13 08:54:48 UTC 2016


Hi Roland,

On 13.12.2016 09:44, Roland Westrelin wrote:
> Here it is rebased:
> 
> http://cr.openjdk.java.net/~roland/valhalla/callingconvention/webrev.02/

Looks good to me!

> I also had to make the fix below to collect all value type fields at
> a safepoint.

Good catch, I think I screwed that up when removing the double-loop.

Thanks,
Tobias

> Roland.
> 
> diff --git a/src/share/vm/opto/valuetypenode.cpp b/src/share/vm/opto/valuetypenode.cpp
> --- a/src/share/vm/opto/valuetypenode.cpp
> +++ b/src/share/vm/opto/valuetypenode.cpp
> @@ -298,7 +298,7 @@
>  void ValueTypeNode::make_scalar_in_safepoints(Compile* C) {
>    const TypeValueTypePtr* res_type = TypeValueTypePtr::make(bottom_type()->isa_valuetype(), TypePtr::NotNull);
>    ciValueKlass* vk = value_klass();
> -  uint nfields = vk->field_count();
> +  uint nfields = vk->flattened_field_count();
>    for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
>      Node* u = fast_out(i);
>      if (u->is_SafePoint() && (!u->is_Call() || u->as_Call()->has_debug_use(this))) {
> 


More information about the valhalla-dev mailing list