mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
7173340: C2: code cleanup: use PhaseIterGVN::replace_edge(Node*, int, Node*) where applicable
Replace frequent C2 optimizer code patterns with new methods calls Reviewed-by: kvn, twisti
This commit is contained in:
parent
529b370174
commit
dd85e2f356
11 changed files with 92 additions and 180 deletions
|
@ -212,9 +212,8 @@ ProjNode* PhaseIdealLoop::create_new_if_for_predicate(ProjNode* cont_proj, Node*
|
|||
Node* use = rgn->fast_out(i);
|
||||
if (use->is_Phi() && use->outcnt() > 0) {
|
||||
assert(use->in(0) == rgn, "");
|
||||
_igvn.hash_delete(use);
|
||||
_igvn.rehash_node_delayed(use);
|
||||
use->add_req(use->in(proj_index));
|
||||
_igvn._worklist.push(use);
|
||||
has_phi = true;
|
||||
}
|
||||
}
|
||||
|
@ -284,9 +283,8 @@ ProjNode* PhaseIterGVN::create_new_if_for_predicate(ProjNode* cont_proj, Node* n
|
|||
for (DUIterator_Fast imax, i = rgn->fast_outs(imax); i < imax; i++) {
|
||||
Node* use = rgn->fast_out(i);
|
||||
if (use->is_Phi() && use->outcnt() > 0) {
|
||||
hash_delete(use);
|
||||
rehash_node_delayed(use);
|
||||
use->add_req(use->in(proj_index));
|
||||
_worklist.push(use);
|
||||
has_phi = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue