if (inst0->in(1)->is_MachSpillCopy()) {
OptoReg::Name in = ra_->get_reg_first(inst0->in(1)->in(1)); if (OptoReg::is_reg(in) && OptoReg::as_VMReg(in)->is_Register()) {
inst1 = inst0->in(1)->as_Mach();
src1 = in;
}
} if (inst1 == nullptr) { returnfalse;
}
assert(dst != src1, "");
// Only coalesce if inst1 is immediately followed by inst0 // Can be improved for more general cases if (block_index < 1 || block->get_node(block_index - 1) != inst1) { returnfalse;
} int inst1_index = block_index - 1;
Node* inst2; if (imm) {
inst2 = nullptr;
} else {
inst2 = inst0->in(2); if (inst2 == inst1) {
inst2 = inst2->in(1);
}
}
// Go down the block to find the output proj node (the flag output) of inst0 int proj_index = -1;
Node* proj = nullptr; for (uint pos = block_index + 1; pos < block->number_of_nodes(); pos++) {
Node* curr = block->get_node(pos); if (curr->is_MachProj() && curr->in(0) == inst0) {
proj_index = pos;
proj = curr; break;
}
}
assert(proj != nullptr, ""); // If some node uses the flag, cannot remove if (proj->outcnt() > 0) { returnfalse;
}
MachNode* root = new_root(); // Assign register for the newly allocated node
ra_->set_oop(root, ra_->is_oop(inst0));
ra_->set_pair(root->_idx, ra_->get_reg_second(inst0), ra_->get_reg_first(inst0));
// Set input and output for the node
root->add_req(inst0->in(0));
root->add_req(inst1->in(1)); // No input for constant after matching if (!imm) {
root->add_req(inst2);
}
inst0->replace_by(root);
proj->set_req(0, inst0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.