-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b49
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082827 | emb-9 | Zoltan Majo | P4 | Resolved | Fixed | team |
We have a lot places which search for particular user node:
Node* xorx = NULL;
for (DUIterator_Fast imax, i = p2x->fast_outs(imax); i < imax; i++) {
Node* u = p2x->fast_out(i);
if (u->Opcode() == Op_XorX) {
xorx = u;
break;
}
}
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
Node *use = n->fast_out(i);
if (use->Opcode() == Op_SCMemProj) {
n = use;
break;
}
}
bool LoadStoreNode::result_not_used() const {
for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
Node *x = fast_out(i);
if (x->Opcode() == Op_SCMemProj) continue;
return false;
}
return true;
}
uint cnt = def->outcnt();
for (uint i = 0; i < cnt; i++) {
Node* proj = def->raw_out(i);
if (proj->Opcode() == Op_SCMemProj) {
return false;
}
}
and so on.
Add new Node* Node::find_user(int opc) method to be used in such cases.
Node* xorx = NULL;
for (DUIterator_Fast imax, i = p2x->fast_outs(imax); i < imax; i++) {
Node* u = p2x->fast_out(i);
if (u->Opcode() == Op_XorX) {
xorx = u;
break;
}
}
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
Node *use = n->fast_out(i);
if (use->Opcode() == Op_SCMemProj) {
n = use;
break;
}
}
bool LoadStoreNode::result_not_used() const {
for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
Node *x = fast_out(i);
if (x->Opcode() == Op_SCMemProj) continue;
return false;
}
return true;
}
uint cnt = def->outcnt();
for (uint i = 0; i < cnt; i++) {
Node* proj = def->raw_out(i);
if (proj->Opcode() == Op_SCMemProj) {
return false;
}
}
and so on.
Add new Node* Node::find_user(int opc) method to be used in such cases.
- backported by
-
JDK-8082827 Add new Node* Node::find_out(int opc) method
-
- Resolved
-
- relates to
-
JDK-8194987 Null pointer dereference in escape.cpp related to Node::find_out_with()
-
- Resolved
-