Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
16573:a2ec1ac769e4 | 16574:042b5e9aeb76 |
---|---|
1680 // Initialize it once and make it shared: | 1680 // Initialize it once and make it shared: |
1681 // set control to _root and place it into Start block | 1681 // set control to _root and place it into Start block |
1682 // (where top() node is placed). | 1682 // (where top() node is placed). |
1683 base->init_req(0, _cfg.get_root_node()); | 1683 base->init_req(0, _cfg.get_root_node()); |
1684 Block *startb = _cfg.get_block_for_node(C->top()); | 1684 Block *startb = _cfg.get_block_for_node(C->top()); |
1685 startb->insert_node(base, startb->find_node(C->top())); | 1685 uint node_pos = startb->find_node(C->top()); |
1686 startb->insert_node(base, node_pos); | |
1686 _cfg.map_node_to_block(base, startb); | 1687 _cfg.map_node_to_block(base, startb); |
1687 assert(_lrg_map.live_range_id(base) == 0, "should not have LRG yet"); | 1688 assert(_lrg_map.live_range_id(base) == 0, "should not have LRG yet"); |
1689 | |
1690 // The loadConP0 might have projection nodes depending on architecture | |
1691 // Add the projection nodes to the CFG | |
1692 for (DUIterator_Fast imax, i = base->fast_outs(imax); i < imax; i++) { | |
1693 Node* use = base->fast_out(i); | |
1694 if (use->is_MachProj()) { | |
1695 startb->insert_node(use, ++node_pos); | |
1696 _cfg.map_node_to_block(use, startb); | |
1697 new_lrg(use, maxlrg++); | |
1698 } | |
1699 } | |
1688 } | 1700 } |
1689 if (_lrg_map.live_range_id(base) == 0) { | 1701 if (_lrg_map.live_range_id(base) == 0) { |
1690 new_lrg(base, maxlrg++); | 1702 new_lrg(base, maxlrg++); |
1691 } | 1703 } |
1692 assert(base->in(0) == _cfg.get_root_node() && _cfg.get_block_for_node(base) == _cfg.get_block_for_node(C->top()), "base NULL should be shared"); | 1704 assert(base->in(0) == _cfg.get_root_node() && _cfg.get_block_for_node(base) == _cfg.get_block_for_node(C->top()), "base NULL should be shared"); |