-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8284960: Integration of JEP 426: Vector API (Fourth Incubator) #8425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back jbhateja! A progress list of the required criteria for merging this PR into |
|
@jatin-bhateja The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
|
/contributor add @jatin-bhateja |
|
/contributor add @PaulSandoz |
|
@jatin-bhateja |
|
@jatin-bhateja |
|
/contributor add @sviswa7 |
|
@jatin-bhateja |
|
/contributor add @smita-kamath |
|
@jatin-bhateja |
|
/contributor add @JoshuaZhuwj |
|
@jatin-bhateja |
|
@jatin-bhateja Could not parse
|
|
@jatin-bhateja Unknown command |
|
/contributor add @XiaohongGong |
|
@jatin-bhateja |
|
/contributor add @rose00 |
|
@jatin-bhateja |
|
/contributor add @theRealELiu |
|
/contributor add @nsjian |
|
@jatin-bhateja |
…iew participant. Code re-organization related to Reverse/ReverseByte IR transforms.
| import java.util.Map; | ||
| import java.util.Set; | ||
|
|
||
| import static com.sun.tools.javac.code.Flags.PREVIEW_API; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import static com.sun.tools.javac.code.Flags.PREVIEW_API; |
Redundant import (sorry i should have checked before i sent you updates to this area)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged
| /** | ||
| * Returns true if {@code s} is participating in the preview of {@code previewSymbol}, and | ||
| * therefore no warnings or errors will be produced. | ||
| * | ||
| * @param s the symbol depending on the preview symbol | ||
| * @param previewSymbol the preview symbol marked with @Preview | ||
| * @return true if {@code s} is participating in the preview of {@code previewSymbol} | ||
| */ | ||
| public boolean isPreviewParticipating(Symbol s, Symbol previewSymbol) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedback from a colleague:
| /** | |
| * Returns true if {@code s} is participating in the preview of {@code previewSymbol}, and | |
| * therefore no warnings or errors will be produced. | |
| * | |
| * @param s the symbol depending on the preview symbol | |
| * @param previewSymbol the preview symbol marked with @Preview | |
| * @return true if {@code s} is participating in the preview of {@code previewSymbol} | |
| */ | |
| public boolean isPreviewParticipating(Symbol s, Symbol previewSymbol) { | |
| /** | |
| * Returns true if {@code s} is deemed to participate in the preview of {@code previewSymbol}, and | |
| * therefore no warnings or errors will be produced. | |
| * | |
| * @param s the symbol depending on the preview symbol | |
| * @param previewSymbol the preview symbol marked with @Preview | |
| * @return true if {@code s} is participating in the preview of {@code previewSymbol} | |
| */ | |
| public boolean participatesInPreview(Symbol s, Symbol previewSymbol) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged.
mcimadamore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javac changes look good
lahodaj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The javac changes look OK to me.
|
Hi @iwanowww , your comments have been addressed. kindly let me know if you have other comments on x86 side changes. |
iwanowww
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
| } | ||
|
|
||
| void Assembler::evplzcntd(XMMRegister dst, KRegister mask, XMMRegister src, bool merge, int vector_len) { | ||
| assert(VM_Version::supports_avx512cd() && (vector_len == AVX_512bit || VM_Version::supports_avx512vl()), ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, split assert as in other instructions - it will help to understand failure better.
| } | ||
|
|
||
| void Assembler::evplzcntq(XMMRegister dst, KRegister mask, XMMRegister src, bool merge, int vector_len) { | ||
| assert(VM_Version::supports_avx512cd() && (vector_len == AVX_512bit || VM_Version::supports_avx512vl()), ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split assert.
| } | ||
|
|
||
| void Assembler::evpcompressb(XMMRegister dst, KRegister mask, XMMRegister src, bool merge, int vector_len) { | ||
| assert(VM_Version::supports_avx512_vbmi2() && (vector_len == AVX_512bit || VM_Version::supports_avx512vl()), ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split assert in this and following new instructions.
| assert(VM_Version::supports_avx2(), ""); | ||
| assert(VM_Version::supports_evex(), ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, did we never trigger this wrong assert because the use was guarded by correct check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jatin-bhateja something wrong with merge.
vpadd()is removed. It was added by #8778 and still is used inx86.ad.
Hi @vnkozlov , after integration of PR 8778 there were there were two copies of vpadd with same signature, so removed one of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Got it.
| evcompresspd(dst, mask, src, merge, vec_enc); | ||
| break; | ||
| default: | ||
| fatal("Unsupported type"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print wrong type: fatal("Unsupported type : %s", type2name(type));
Below too.
| vpaddq(dst, src1, src2, vec_enc); | ||
| break; | ||
| default: | ||
| ShouldNotReachHere(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use fatal and print type.
src/hotspot/cpu/x86/x86.ad
Outdated
| // should be succeeded by its corresponding vector IR and following | ||
| // special handling should be removed. | ||
| if (bt == T_LONG && rbt == T_INT) { | ||
| if (VM_Version::supports_avx512vl()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Predicate say !VM_Version::supports_avx512vl()
src/hotspot/share/opto/node.hpp
Outdated
| // The node is a CountedLoopEnd with a mask annotation so as to emit a restore context | ||
| bool has_vector_mask_set() const { return (_flags & Flag_has_vector_mask_set) != 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see use of this flag.
| if ((mask_use_type & VecMaskUseLoad) != 0) { | ||
| if (!Matcher::match_rule_supported_vector(Op_VectorLoadMask, num_elem, elem_bt)) { | ||
| if (!Matcher::match_rule_supported_vector(Op_VectorLoadMask, num_elem, elem_bt) || | ||
| !Matcher::match_rule_supported_vector(Op_LoadVector, num_elem, T_BOOLEAN)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment explaining new check. In follow ing places too.
| declare_c2_type(CMoveVFNode, VectorNode) \ | ||
| declare_c2_type(CMoveVDNode, VectorNode) \ | ||
| declare_c2_type(CompressVNode, VectorNode) \ | ||
| declare_c2_type(ExpandVNode, VectorNode) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all new nodes listed.
|
Hi @vnkozlov , Your comments have been addressed. |
|
@jatin-bhateja something wrong with merge. |
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
|
/integrate |
|
Thanks reviewers for your comments. |
|
Going to push as commit 6f6486e.
Your commit was automatically rebased without conflicts. |
|
@jatin-bhateja Pushed as commit 6f6486e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi All,
Patch adds the planned support for new vector operations and APIs targeted for JEP 426: Vector API (Fourth Incubator).
Following is the brief summary of changes:-
Patch has been regressed over AARCH64 and X86 targets different AVX levels.
Kindly review and share your feedback.
Best Regards,
Jatin
Progress
Issues
Reviewers
Contributors
<jbhateja@openjdk.org><psandoz@openjdk.org><sviswanathan@openjdk.org><svkamath@openjdk.org><jzhu@openjdk.org><xgong@openjdk.org><jrose@openjdk.org><eliu@openjdk.org><njian@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8425/head:pull/8425$ git checkout pull/8425Update a local copy of the PR:
$ git checkout pull/8425$ git pull https://git.openjdk.java.net/jdk pull/8425/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8425View PR using the GUI difftool:
$ git pr show -t 8425Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8425.diff