Return value type fields in registers

Tobias Hartmann tobias.hartmann at oracle.com
Wed Jun 7 12:00:13 UTC 2017


Hi Roland,

I found some additional (build) problems. With below patch, no additional failures show up on JPRT. Also the Windows problem is gone.

I'll look into the VboxUnbox failure next. I'm fine with pushing webrev.02 including below changes.

Best regards,
Tobias

diff -r f453ec22aae0 src/cpu/x86/vm/stubGenerator_x86_64.cpp
--- a/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Wed Jun 07 12:41:45 2017 +0200
+++ b/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Wed Jun 07 13:27:47 2017 +0200
@@ -4984,7 +4984,7 @@
     // the runtime calls read or update those registers. This needs to
     // be in sync with SharedRuntime::java_return_convention().
     enum layout {
-      pad_off, pad_off_2,
+      pad_off = frame::arg_reg_save_area_bytes/BytesPerInt, pad_off_2,
       rax_off, rax_off_2,
       j_rarg5_off, j_rarg5_2,
       j_rarg4_off, j_rarg4_2,
diff -r f453ec22aae0 src/share/vm/code/pcDesc.hpp
--- a/src/share/vm/code/pcDesc.hpp	Wed Jun 07 12:41:45 2017 +0200
+++ b/src/share/vm/code/pcDesc.hpp	Wed Jun 07 13:27:47 2017 +0200
@@ -44,7 +44,7 @@
     PCDESC_is_method_handle_invoke = 1 << 1,
     PCDESC_return_oop              = 1 << 2,
     PCDESC_rethrow_exception       = 1 << 3,
-    PCDESC_return_vt               = 1 << 4,
+    PCDESC_return_vt               = 1 << 4
   };
 
   int _flags;
diff -r f453ec22aae0 src/share/vm/opto/compile.cpp
--- a/src/share/vm/opto/compile.cpp	Wed Jun 07 12:41:45 2017 +0200
+++ b/src/share/vm/opto/compile.cpp	Wed Jun 07 13:27:47 2017 +0200
@@ -2696,9 +2696,9 @@
     // call.
     Node* ret = call->proj_out(TypeFunc::Parms);
     assert(ret->bottom_type()->is_valuetypeptr()->klass() == env()->___Value_klass(), "unexpected return type from MH intrinsic");
-    const TypeFunc* _tf = call->_tf;
+    const TypeFunc* tf = call->_tf;
     const TypeTuple* domain = OptoRuntime::store_value_type_fields_Type()->domain_cc();
-    const TypeFunc* new_tf = TypeFunc::make(_tf->domain_sig(), _tf->domain_cc(), _tf->range_sig(), domain);
+    const TypeFunc* new_tf = TypeFunc::make(tf->domain_sig(), tf->domain_cc(), tf->range_sig(), domain);
     call->_tf = new_tf;
 
     CallProjections projs;
diff -r f453ec22aae0 test/compiler/valhalla/valuetypes/ValueTypeTestBench.java
--- a/test/compiler/valhalla/valuetypes/ValueTypeTestBench.java	Wed Jun 07 12:41:45 2017 +0200
+++ b/test/compiler/valhalla/valuetypes/ValueTypeTestBench.java	Wed Jun 07 13:27:47 2017 +0200
@@ -35,16 +35,16 @@
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-TieredCompilation -XX:+VerifyAdapterSharing
  *                   -XX:+EnableValhalla -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1 -XX:+FullGCALotWithValueTypes
- *                   compiler.valhalla.valuetypes.ValueTypeTestBench
+ *                   -Dvalhalla.enableValueLambdaForms=true compiler.valhalla.valuetypes.ValueTypeTestBench
  * @run main/othervm -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-TieredCompilation
  *                   -XX:+EnableValhalla -XX:+EnableMVT -XX:-ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:-ValueArrayFlatten
- *                   compiler.valhalla.valuetypes.ValueTypeTestBench
+ *                   -Dvalhalla.enableValueLambdaForms=true compiler.valhalla.valuetypes.ValueTypeTestBench
  * @run main/othervm -Xbootclasspath/a:. -ea -noverify -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-TieredCompilation -XX:+AlwaysIncrementalInline
  *                   -XX:+EnableValhalla -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1
- *                   compiler.valhalla.valuetypes.ValueTypeTestBench
+ *                   -Dvalhalla.enableValueLambdaForms=true compiler.valhalla.valuetypes.ValueTypeTestBench
  */
 
 package compiler.valhalla.valuetypes;





More information about the valhalla-dev mailing list