Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/chaitin.cpp @ 16574:042b5e9aeb76
Cherry-picking "8029446: assert(_cfg.get_block_for_node(proj) == borig) failed: incorrect block for kill projections" by adlertz
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 18 Jul 2014 14:28:43 +0200 |
parents | 4ca6dc0799b6 |
children | 52b4284cb496 |
line wrap: on
line diff
--- a/src/share/vm/opto/chaitin.cpp Fri Jul 18 11:14:54 2014 +0200 +++ b/src/share/vm/opto/chaitin.cpp Fri Jul 18 14:28:43 2014 +0200 @@ -1682,9 +1682,21 @@ // (where top() node is placed). base->init_req(0, _cfg.get_root_node()); Block *startb = _cfg.get_block_for_node(C->top()); - startb->insert_node(base, startb->find_node(C->top())); + uint node_pos = startb->find_node(C->top()); + startb->insert_node(base, node_pos); _cfg.map_node_to_block(base, startb); assert(_lrg_map.live_range_id(base) == 0, "should not have LRG yet"); + + // The loadConP0 might have projection nodes depending on architecture + // Add the projection nodes to the CFG + for (DUIterator_Fast imax, i = base->fast_outs(imax); i < imax; i++) { + Node* use = base->fast_out(i); + if (use->is_MachProj()) { + startb->insert_node(use, ++node_pos); + _cfg.map_node_to_block(use, startb); + new_lrg(use, maxlrg++); + } + } } if (_lrg_map.live_range_id(base) == 0) { new_lrg(base, maxlrg++);