Vector API unboxing and masking support
Lupusoru, Razvan A
razvan.a.lupusoru at intel.com
Sun Sep 24 16:43:14 UTC 2017
Please review the following patch which adds more enhancements to the Vector API:
Changes in hotspot:
* Adds support to generate vptest and a node that represents these semantics. This is used for mask checking methods "anyTrue" and "allTrue"
* Added enum bounds for Vector API methods to improve robustness in checking whether a method is Vector API
* The intrinsics generator can now see which call node it is replacing (if one exists). This was needed to add in future functionality to analyze graph for boxing generation.
* Fixed a bug related to wrong class being set for Vector Box. Namely, the receiver type was always set as the class but in reality, the return type is the correct type.
* Added some support around masks and some double methods.
* Cleaned up intrinsics code and created common methods for getting vector operands and setting output.
* Added some support for Vector unboxing:
o In cases where VectorBox nodes feed into phis used by a vector unbox, a new vector phi is created that merge vector values
o In all the rest of cases, a vector load is generated to get vector value.
* Added a flag to be able to turn off unstable_if speculation named "DisableUnstableIfOpt". This is useful because there is no vector boxing support yet and the speculation makes it so that if there is branching inside vector loop, some values live to runtime which cannot be created.
Changes in jdk:
* Adds capability to generate true and false masks directly without going through constantMask call. This makes it easier to initialize masks.
* Marks more methods as being hotspot intrinsic
* Creates a copy of cast in FloatVector due to some limitations in the intrinsics matching technology being used. In future this can probably be removed but I needed it to show how to support on compiler side.
Let me know if you have any comments or questions.
More information about the panama-dev