-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
8295867: TestVerifyGraphEdges.java fails with exit code -1073741571 when using AlwaysIncrementalInline #11065
Closed
Closed
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
96031bf
8295867: TestVerifyGraphEdges.java fails with exit code -1073741571 w…
vnkozlov 6ea8de6
Merge branch 'master' into JDK-8295867
vnkozlov 2978787
remove white space
vnkozlov d760070
Merge branch 'master' into JDK-8295867
vnkozlov b74d121
Rename verify_edges() method and move it to Compile class
vnkozlov 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2683,46 +2683,52 @@ void Node::dump_comp(const char* suffix, outputStream *st) const { | |
// For each input edge to a node (ie - for each Use-Def edge), verify that | ||
// there is a corresponding Def-Use edge. | ||
//------------------------------verify_edges----------------------------------- | ||
void Node::verify_edges(Unique_Node_List &visited) { | ||
uint i, j, idx; | ||
int cnt; | ||
Node *n; | ||
void Node::verify_edges(Node* root, Unique_Node_List &visited, Node_List &nstack) { | ||
nstack.push(root); | ||
|
||
// Recursive termination test | ||
if (visited.member(this)) return; | ||
visited.push(this); | ||
|
||
// Walk over all input edges, checking for correspondence | ||
for( i = 0; i < len(); i++ ) { | ||
n = in(i); | ||
if (n != NULL && !n->is_top()) { | ||
// Count instances of (Node *)this | ||
cnt = 0; | ||
for (idx = 0; idx < n->_outcnt; idx++ ) { | ||
if (n->_out[idx] == (Node *)this) cnt++; | ||
} | ||
assert( cnt > 0,"Failed to find Def-Use edge." ); | ||
// Check for duplicate edges | ||
// walk the input array downcounting the input edges to n | ||
for( j = 0; j < len(); j++ ) { | ||
if( in(j) == n ) cnt--; | ||
while (nstack.size() > 0) { | ||
Node* next = nstack.pop(); | ||
if (visited.member(next)) { | ||
continue; | ||
} | ||
visited.push(next); | ||
|
||
// Walk over all input edges, checking for correspondence | ||
uint length = next->len(); | ||
for (uint i = 0; i < length; i++) { | ||
Node* n = next->in(i); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to rename There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renamed to |
||
if (n != NULL && !visited.member(n)) { | ||
nstack.push(n); // Put it on stack | ||
} | ||
assert( cnt == 0,"Mismatched edge count."); | ||
} else if (n == NULL) { | ||
assert(i >= req() || i == 0 || is_Region() || is_Phi() || is_ArrayCopy() || (is_Unlock() && i == req()-1) | ||
|| (is_MemBar() && i == 5), // the precedence edge to a membar can be removed during macro node expansion | ||
if (n != NULL && !n->is_top()) { | ||
// Count instances of `next` | ||
int cnt = 0; | ||
for (uint idx = 0; idx < n->_outcnt; idx++) { | ||
if (n->_out[idx] == next) { | ||
cnt++; | ||
} | ||
} | ||
assert(cnt > 0, "Failed to find Def-Use edge."); | ||
// Check for duplicate edges | ||
// walk the input array downcounting the input edges to n | ||
for(uint j = 0; j < length; j++) { | ||
vnkozlov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (next->in(j) == n) { | ||
cnt--; | ||
} | ||
} | ||
assert(cnt == 0, "Mismatched edge count."); | ||
} else if (n == NULL) { | ||
assert(i >= next->req() || i == 0 || | ||
next->is_Region() || next->is_Phi() || next->is_ArrayCopy() || | ||
(next->is_Unlock() && i == (next->req() - 1)) || | ||
(next->is_MemBar() && i == 5), // the precedence edge to a membar can be removed during macro node expansion | ||
"only region, phi, arraycopy, unlock or membar nodes have null data edges"); | ||
} else { | ||
assert(n->is_top(), "sanity"); | ||
// Nothing to check. | ||
} else { | ||
assert(n->is_top(), "sanity"); | ||
// Nothing to check. | ||
} | ||
} | ||
} | ||
// Recursive walk over all input edges | ||
for( i = 0; i < len(); i++ ) { | ||
n = in(i); | ||
if( n != NULL ) | ||
in(i)->verify_edges(visited); | ||
} | ||
} | ||
|
||
// Verify all nodes if verify_depth is negative | ||
|
This file contains 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
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.
As you only need the stack in
verify_edges()
, I suggest to move these lines directly into the methodverify_edges()
.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 need
live_nodes()
value orstack_size
orC
to pass for creating list inside method.I decided to move renamed
verify_bidirectional_edges()
method toCompile
class to get these values inside the method.It does not need to be in
Node
class after I removed recursion.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.
Right, I've missed that before. Moving it to
Compile
is a good idea to apply that!