RFR: 8252848: Optimize small primitive arrayCopy operations through partial inlining using AVX-512 masked instructions [v9]
Jatin Bhateja
jbhateja at openjdk.java.net
Fri Oct 23 12:05:51 UTC 2020
On Thu, 22 Oct 2020 09:48:51 GMT, Ningsheng Jian <njian at openjdk.org> wrote:
>> Jatin Bhateja has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
>
> src/hotspot/share/opto/vectornode.hpp line 835:
>
>> 833: static VectorMaskGenNode* make(int opc, Node* src, const Type* ty, const Type* ety);
>> 834: private:
>> 835: const Type* _elemType;
>
> Will an additional field in the node valid after some optimizations, i.e. clone()? I think I know the ety, but I don't know the usage of ty. If so, do you need to have a new type like what TypeVect does for mask?
As currently there is no support for mask registers in RA, for X86 long ideal type is sufficient for a mask producing node (def operand is a mask register) ; But for complete support returning Op_RegVMask as an ideal_reg() type for masked Ideal node should do the trick without creating an explicit new ideal Type for mask generating nodes. Spill sizes and number of slots may be different for X86 and ARM (SVE).
Shallow copy during Node::clone should be sufficient here since encapsulated element type will be preserved.
> src/hotspot/share/opto/vectornode.cpp line 775:
>
>> 773: VectorMaskGenNode* make(int opc, Node* src, const Type* ty, const Type* ety) {
>> 774: return new VectorMaskGenNode(src, ty, ety);
>> 775: }
>
> These are not used?
This is a just a helper routine not used currently though.
> src/hotspot/share/opto/vectornode.hpp line 826:
>
>> 824: class VectorMaskGenNode : public TypeNode {
>> 825: public:
>> 826: VectorMaskGenNode(Node* src, const Type* ty, const Type* ety): TypeNode(ty, 2), _elemType(ety) {
>
> Sorry, I don't quite understand the arguments here. What does 'src' mean to the mask?
ty -> Node type , long in this case since for X86 mask register is 64 bit wide.
ety -> Mask element type, currently used during LoadVectorMasked/StoreVectorMasked idealization to compute the block sizes for constant masks and replace masked vector operations with non-masked if block size is equal to vector size. Src has been replaced by a better name "length" used for mask computation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/302
More information about the hotspot-compiler-dev
mailing list