-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8298935: fix independence bug in create_pack logic in SuperWord::find_adjacent_refs #12350
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
Closed
Closed
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b142e4f
8298935: Superword: handle cyclic dependencies with offset larger than 1
eme64 5e01c9f
refactored verification code
eme64 2def5f7
Add IR test for compile option Vectorize
eme64 744dc23
Extended TestForEachRem.java with distance 2 case that fails on master
eme64 c668b5f
remove useless comment
eme64 830a05a
cyclic dependency test is now an IR test
eme64 b393693
Replace old verification code, and remove first fix
eme64 ddb9dc5
Filter out dependent packs if we have _do_vector_loop
eme64 d1f19ba
small improvement for printing
eme64 b633a3a
Implement fix
eme64 bf4befa
refactoring to improve readability
eme64 d170f54
remove duplicate verification
eme64 32df5de
refactoring again, better comments, _do_vector_loop only if vector al…
eme64 3fa535b
require avx and sve
eme64 0a834cd
apply a IR verification only for cpu feature
eme64 a7e88e1
typos
eme64 b3d4d29
improve IR annotation for TestCyclicDependency.java, allow running it…
eme64 f02433b
Improved IR test TestOptionVectorizeIR.java
eme64 113b9ff
Merge branch 'master' into JDK-8298935
eme64 796eb3f
fixed a few IR cpuFeature requirements
eme64 4ebfa80
fixed another IR cpuFeature issue for aarch64 asimd vs sve
eme64 befb017
Merge branch 'master' into JDK-8298935
eme64 08cccf4
Regression test for Test.java byte case that crashed on arm
eme64 8dce09b
Merge branch 'master' into JDK-8298935
eme64 7033a87
Version 1 of script-generated offset dependency test
eme64 5955c29
v2 TestDependencyOffsets.java based on MaxVectorSize not SuperWordMax…
eme64 7462cd1
Fix TestCyclicDependency.java for aarch64 machines with AlignVector =…
eme64 8349906
Fix TestOptionVectorizeIR.java for aarch64 machines with AlignVector …
eme64 0cb67e5
TestDependencyOffsets.java: MulVL not supported on NEON / asimd. Repl…
eme64 366bc31
removed negative rules for TestCyclicDependency.java
eme64 9b8738a
remove negative IR rules for TestOptionVectorizeIR.java
eme64 645ed50
Reworked TestDependencyOffsets.java
eme64 199fcf0
Merge branch 'master' into JDK-8298935
eme64 fb7f6dd
TestOptionVectorizeIR.java: removed PopulateIndex IR rule - fails on …
eme64 9e3d480
TestDependencyOffsets.java: parallelize it + various AVX settings
eme64 a44082b
TestDependencyOffsets.java: add vanilla run
eme64 0f7e39c
resolve merge conflict after Roland's fix
eme64 216bb1a
A little renaming and improved comments
eme64 ef61acd
Fixed wording from last commit
eme64 731cc7b
Merge master after NULL -> nullptr conversion
eme64 ff0850e
merge master: resolved conflict in test/hotspot/jtreg/compiler/lib/ir…
eme64 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hi @eme64 , Dependency captures three scenarios :-
a) RAW(ture) : Store -> Load
b) WAR(anti) : Load -> Store
c) WAW : Store -> Store.
RAR is a non-dependency. Existing routine independent_path is called during statement packing after its certain that statements are isomorphic. Newly added find_dependence routine optimizes the dependency checking but it does not seem to be skipping over anti-dependence checks which may prevent vectorization in some cases. Can you share your thoughts on this.
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks @jatin-bhateja . In essence, I am trusting
DepPredsto give me the correct dependency information. Is that not correct? Do you have an example whereDepPredswould have aLoaddepend on aLoad, without a store in between?Also: it seems that
SuperWord::independent_pathdoes nothing special about RAR, it just follows all dependencies ofDepPredsrecursively. This is what is used inSuperWord::independent. So ifDepPredscould not be trusted, then we have the same issue here.In the end,
find_dependenceshould do nothing else butSuperWord::independent, except for a whole pack at once, and not only pairwise for two memops.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.
You are correct Load-Load(RAR) is not captured in dependence graph anyways.
My above comment was in context of scenario b), I verified that newly added find_dependence method will not find any circular intra-pack dependence in this case.
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 Ah, I misunderstood. Thanks for clarifying. So you verified that WAR is not an issue? Thanks!
I agree that it should not be an issue. For a
Load -> Storeto block vectorization, we would have to find a dependency path from aLoad -> Store -> Load(LSL) or aStore -> Load -> Store(SLS), since my verification only checks if any of the memops in the pack depend on another memop of the pack (both loads or both stores).But both LSL and SLS have a
Store -> Load(RAW) and so we cannot vectorize.Do you agree with this argument?
Uh oh!
There was an error while loading. Please reload this page.
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.
Correct, as long as Load in (Store->Load) not feeding back into any other Store in the same pack.
Without complicating the way I see this is that dependence checking looking for an intra-pack dependency where pack is comprised of isomorphic nodes (loads/stores) does a walk over data pendency edges of each memory node in the pack and if the traversal lands back to one the nodes in the pack it should declare a cyclic dependence.