8230015: [instruction selector] generic vector operands support.

Bhateja, Jatin jatin.bhateja at intel.com
Thu Aug 22 06:49:58 UTC 2019

Hi All,

Please find below a patch for generic vector operands[1] support during instruction selection.

Motivation behind the patch is to reduce the number of vector selection patterns whose operands meagerly differ in vector lengths.
This will not only result in lesser code being generated by ADLC which effectively translates to size reduction in libjvm.so but also
help in better maintenance of AD files.

Using generic operands we were able to collapse multiple vector patterns over mainline
             Initial number of vector instruction patterns (vec[XYZSD] + legVec[ZXYSD]   :  510
             Reduced vector instruction patterns  (vecG + legVecG)                                  :  222

With this we could see around 1MB size reduction in libjvm.so.

In order to have minimal impact over downstream compiler passes, a post-selection pass has been introduced (currently enabled only for X86 target)
which replaces these generic operands with their corresponding concreter vector length variants.

JBS      : https://bugs.openjdk.java.net/browse/JDK-8230015
Patch  : http://cr.openjdk.java.net/~jbhateja/genericVectorOperands/webrev.00/

Kindly review and share your feedback.

Best Regards,
Jatin Bhateja

[1] http://cr.openjdk.java.net/~jbhateja/genericVectorOperands/generic_operands_support_v1.0.pdf

More information about the hotspot-compiler-dev mailing list