8071302: assert(!_reg_node[reg_lo] || edge_from_to(_reg_node[reg_lo], def)) failed: after block local
Summary: Add merge nodes to node to block mapping
Reviewed-by: kvn, vlivanov
--- a/hotspot/src/share/vm/opto/output.cpp Thu Jan 22 11:23:13 2015 +0100
+++ b/hotspot/src/share/vm/opto/output.cpp Thu Jan 22 11:25:23 2015 -0800
@@ -2475,7 +2475,7 @@
if( iop == Op_Con ) continue; // Do not schedule Top
if( iop == Op_Node && // Do not schedule PhiNodes, ProjNodes
mach->pipeline() == MachNode::pipeline_class() &&
- !n->is_SpillCopy() ) // Breakpoints, Prolog, etc
+ !n->is_SpillCopy() && !n->is_MachMerge() ) // Breakpoints, Prolog, etc
continue;
break; // Funny loop structure to be sure...
}
--- a/hotspot/src/share/vm/opto/postaloc.cpp Thu Jan 22 11:23:13 2015 +0100
+++ b/hotspot/src/share/vm/opto/postaloc.cpp Thu Jan 22 11:25:23 2015 -0800
@@ -428,6 +428,7 @@
// Insert the merge node into the block before the first use.
uint use_index = block->find_node(reg2defuse.at(reg).first_use());
block->insert_node(merge, use_index++);
+ _cfg.map_node_to_block(merge, block);
// Let the allocator know about the new node, use the same lrg
_lrg_map.extend(merge->_idx, lrg);