Mercurial > hg > truffle
diff src/share/vm/opto/split_if.cpp @ 6144:5e990493719e
7173340: C2: code cleanup: use PhaseIterGVN::replace_edge(Node*, int, Node*) where applicable
Summary: replace frequent C2 optimizer code patterns with new methods calls
Reviewed-by: kvn, twisti
Contributed-by: vladimir.x.ivanov@oracle.com
author | kvn |
---|---|
date | Tue, 12 Jun 2012 16:23:31 -0700 |
parents | 8805f8c1e23e |
children | e626685e9f6c |
line wrap: on
line diff
--- a/src/share/vm/opto/split_if.cpp Tue Jun 12 14:31:44 2012 -0700 +++ b/src/share/vm/opto/split_if.cpp Tue Jun 12 16:23:31 2012 -0700 @@ -137,9 +137,7 @@ Node *iff_ctrl = iff->is_If() ? iff->in(0) : get_ctrl(iff); Node *x = bol->clone(); register_new_node(x, iff_ctrl); - _igvn.hash_delete(iff); - iff->set_req(1, x); - _igvn._worklist.push(iff); + _igvn.replace_input_of(iff, 1, x); } _igvn.remove_dead_node( bol ); --i; @@ -151,9 +149,7 @@ assert( bol->in(1) == n, "" ); Node *x = n->clone(); register_new_node(x, get_ctrl(bol)); - _igvn.hash_delete(bol); - bol->set_req(1, x); - _igvn._worklist.push(bol); + _igvn.replace_input_of(bol, 1, x); } _igvn.remove_dead_node( n ); @@ -387,9 +383,7 @@ if( use->in(i) == def ) break; assert( i < use->req(), "def should be among use's inputs" ); - _igvn.hash_delete(use); - use->set_req(i, new_def); - _igvn._worklist.push(use); + _igvn.replace_input_of(use, i, new_def); } //------------------------------do_split_if------------------------------------