RFR: 8262355: Support for AVX-512 opmask register allocation. [v4]

Vladimir Ivanov vlivanov at openjdk.java.net
Thu Mar 11 08:27:08 UTC 2021


On Thu, 11 Mar 2021 02:31:58 GMT, Ningsheng Jian <njian at openjdk.org> wrote:

> But I think there should not be any mask type for those non-mask hardware targets.

It seems what you are calling "non-mask hardware targets" are ISAs without dedicated predicate registers. Still, it doesn't mean such ISA doesn't support masked operations (e.g., AVX/AVX2 on x86). It will be unfortunate if we have to distinguish between different mask representations in Ideal IR. `TypeVectMask` describes an "ideal" vector mask and IMO it is natural to represent it as a vector. 

>  If in future we would like to have some type based optimization, e.g. all-true/all-false, that may be confusing with vector type.

The missing piece to make it work is vector constant support. Once it's there, it'll be possible to inspect elements of a vector constant. It is not limited to masks, but nicely generalizes to all vector shapes.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2768


More information about the hotspot-compiler-dev mailing list