< prev index next >
src/share/vm/opto/node.cpp
Print this page
*** 903,931 ****
else
return (Node*) this;
}
// Find out of current node that matches opcode.
! Node* Node::find_out_with(int opcode) {
for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
Node* use = fast_out(i);
if (use->Opcode() == opcode) {
return use;
}
}
return NULL;
}
// Return true if the current node has an out that matches opcode.
! bool Node::has_out_with(int opcode) {
return (find_out_with(opcode) != NULL);
}
// Return true if the current node has an out that matches any of the opcodes.
! bool Node::has_out_with(int opcode1, int opcode2, int opcode3, int opcode4) {
for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
! int opcode = fast_out(i)->Opcode();
if (opcode == opcode1 || opcode == opcode2 || opcode == opcode3 || opcode == opcode4) {
return true;
}
}
return false;
--- 903,931 ----
else
return (Node*) this;
}
// Find out of current node that matches opcode.
! Node* Node::find_out_with(uint opcode) {
for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
Node* use = fast_out(i);
if (use->Opcode() == opcode) {
return use;
}
}
return NULL;
}
// Return true if the current node has an out that matches opcode.
! bool Node::has_out_with(uint opcode) {
return (find_out_with(opcode) != NULL);
}
// Return true if the current node has an out that matches any of the opcodes.
! bool Node::has_out_with(uint opcode1, uint opcode2, uint opcode3, uint opcode4) {
for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
! uint opcode = fast_out(i)->Opcode();
if (opcode == opcode1 || opcode == opcode2 || opcode == opcode3 || opcode == opcode4) {
return true;
}
}
return false;
*** 1129,1139 ****
// unique users of specific nodes. Such nodes should be put on IGVN worklist
// for the transformations to happen.
bool Node::has_special_unique_user() const {
assert(outcnt() == 1, "match only for unique out");
Node* n = unique_out();
! int op = Opcode();
if (this->is_Store()) {
// Condition for back-to-back stores folding.
return n->Opcode() == op && n->in(MemNode::Memory) == this;
} else if (this->is_Load()) {
// Condition for removing an unused LoadNode from the MemBarAcquire precedence input
--- 1129,1139 ----
// unique users of specific nodes. Such nodes should be put on IGVN worklist
// for the transformations to happen.
bool Node::has_special_unique_user() const {
assert(outcnt() == 1, "match only for unique out");
Node* n = unique_out();
! uint op = Opcode();
if (this->is_Store()) {
// Condition for back-to-back stores folding.
return n->Opcode() == op && n->in(MemNode::Memory) == this;
} else if (this->is_Load()) {
// Condition for removing an unused LoadNode from the MemBarAcquire precedence input
*** 2288,2298 ****
}
//--------------------------find_similar------------------------------
// Return a node with opcode "opc" and same inputs as "this" if one can
// be found; Otherwise return NULL;
! Node* Node::find_similar(int opc) {
if (req() >= 2) {
Node* def = in(1);
if (def && def->outcnt() >= 2) {
for (DUIterator_Fast dmax, i = def->fast_outs(dmax); i < dmax; i++) {
Node* use = def->fast_out(i);
--- 2288,2298 ----
}
//--------------------------find_similar------------------------------
// Return a node with opcode "opc" and same inputs as "this" if one can
// be found; Otherwise return NULL;
! Node* Node::find_similar(uint opc) {
if (req() >= 2) {
Node* def = in(1);
if (def && def->outcnt() >= 2) {
for (DUIterator_Fast dmax, i = def->fast_outs(dmax); i < dmax; i++) {
Node* use = def->fast_out(i);
< prev index next >