src/share/vm/opto/coalesce.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/coalesce.cpp

src/share/vm/opto/coalesce.cpp

Print this page

        

*** 279,291 **** uint src_name = _phc._lrg_map.find(m); if (src_name != phi_name) { Block *pred = _phc._cfg.get_block_for_node(b->pred(j)); Node *copy; assert(!m->is_Con() || m->is_Mach(), "all Con must be Mach"); ! // Rematerialize constants instead of copying them ! if( m->is_Mach() && m->as_Mach()->is_Con() && ! m->as_Mach()->rematerialize() ) { copy = m->clone(); // Insert the copy in the predecessor basic block pred->add_inst(copy); // Copy any flags as well _phc.clone_projs(pred, pred->end_idx(), m, copy, _phc._lrg_map); --- 279,293 ---- uint src_name = _phc._lrg_map.find(m); if (src_name != phi_name) { Block *pred = _phc._cfg.get_block_for_node(b->pred(j)); Node *copy; assert(!m->is_Con() || m->is_Mach(), "all Con must be Mach"); ! // Rematerialize constants instead of copying them. ! // We do this only for immediate constants, we avoid constant table loads ! // because that will unsafely extend the live range of the constant table base. ! if (m->is_Mach() && m->as_Mach()->is_Con() && !m->as_Mach()->is_MachConstant() && ! m->as_Mach()->rematerialize()) { copy = m->clone(); // Insert the copy in the predecessor basic block pred->add_inst(copy); // Copy any flags as well _phc.clone_projs(pred, pred->end_idx(), m, copy, _phc._lrg_map);
*** 315,325 **** if (_phc._lrg_map.find(m) != name) { Node *copy; assert(!m->is_Con() || m->is_Mach(), "all Con must be Mach"); // At this point it is unsafe to extend live ranges (6550579). // Rematerialize only constants as we do for Phi above. ! if(m->is_Mach() && m->as_Mach()->is_Con() && m->as_Mach()->rematerialize()) { copy = m->clone(); // Insert the copy in the basic block, just before us b->insert_node(copy, l++); l += _phc.clone_projs(b, l, m, copy, _phc._lrg_map); --- 317,327 ---- if (_phc._lrg_map.find(m) != name) { Node *copy; assert(!m->is_Con() || m->is_Mach(), "all Con must be Mach"); // At this point it is unsafe to extend live ranges (6550579). // Rematerialize only constants as we do for Phi above. ! if (m->is_Mach() && m->as_Mach()->is_Con() && !m->as_Mach()->is_MachConstant() && m->as_Mach()->rematerialize()) { copy = m->clone(); // Insert the copy in the basic block, just before us b->insert_node(copy, l++); l += _phc.clone_projs(b, l, m, copy, _phc._lrg_map);
src/share/vm/opto/coalesce.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File