Integrated: 8326139: C2 SuperWord: split packs (match use/def packs, implemented, mutual independence)
Emanuel Peter
epeter at openjdk.org
Tue Mar 12 07:30:24 UTC 2024
On Wed, 14 Feb 2024 15:10:18 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> After `combine_pairs_to_longer_packs`, we sometimes create packs that are too long and cannot be vectorized.
> There are multiple reason for that:
>
> - A pack does not "match" with a use of def pack, and we need to split it. Example: split Z:
>
> X X X X Y Y Y Y
> Z Z Z Z Z Z Z Z
>
>
> - A pack is not implemented in the current size, but would be implemented for a smaller size. Some operations are not implemented at max vector size, and we just need to split every pack to the smaller size that is implemented. Or we have a pack of a non-power-of-2 size, and need to split it down into smaller sizes that are power-of-2.
>
> - Packs can have pack internal dependence. This dependence happens at a certain "distance". If we split a pack to be smaller than that "distance", then the internal dependence disappears, and we have the desired mutual independence. Example:
> https://github.com/openjdk/jdk/blob/9ee274b0480a6e8e399830fd40c34d99c5621c1b/test/hotspot/jtreg/compiler/loopopts/superword/TestSplitPacks.java#L657-L669
>
> Note: Soon I will refactor the packset into a new `PackSet` class, and move the split / filter code there.
>
> **Further Work**
>
> [JDK-8309267](https://bugs.openjdk.org/browse/JDK-8309267) C2 SuperWord: some tests fail on KNL machines - fail to vectorize
> The issue on KNL machines is that some operations only support vector widths that are smaller than the maximal vector length. Hence, we must split all other vectors that are uses/defs. This change here does exactly that, and so I will be able to put the `UseKNLSetting` in the IRFramework whitelist. I will do that in a separate RFE.
This pull request has now been integrated.
Changeset: 251347bd
Author: Emanuel Peter <epeter at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/251347bd7e589b51354a2318bfac0c71cd71bf5f
Stats: 1265 lines in 5 files changed: 1203 ins; 23 del; 39 mod
8326139: C2 SuperWord: split packs (match use/def packs, implemented, mutual independence)
Reviewed-by: kvn, vlivanov, chagedorn
-------------
PR: https://git.openjdk.org/jdk/pull/17848
More information about the hotspot-compiler-dev
mailing list