1602 assert(phi == NULL, "the merge contains phis, not vice versa"); |
1602 assert(phi == NULL, "the merge contains phis, not vice versa"); |
1603 merge_memory_edges(n->as_MergeMem(), pnum, nophi); |
1603 merge_memory_edges(n->as_MergeMem(), pnum, nophi); |
1604 continue; |
1604 continue; |
1605 default: // All normal stuff |
1605 default: // All normal stuff |
1606 if (phi == NULL) { |
1606 if (phi == NULL) { |
1607 if (!check_elide_phi || !target->can_elide_SEL_phi(j)) { |
1607 const JVMState* jvms = map()->jvms(); |
|
1608 if (EliminateNestedLocks && |
|
1609 jvms->is_mon(j) && jvms->is_monitor_box(j)) { |
|
1610 // BoxLock nodes are not commoning. |
|
1611 // Use old BoxLock node as merged box. |
|
1612 assert(newin->jvms()->is_monitor_box(j), "sanity"); |
|
1613 // This assert also tests that nodes are BoxLock. |
|
1614 assert(BoxLockNode::same_slot(n, m), "sanity"); |
|
1615 C->gvn_replace_by(n, m); |
|
1616 } else if (!check_elide_phi || !target->can_elide_SEL_phi(j)) { |
1608 phi = ensure_phi(j, nophi); |
1617 phi = ensure_phi(j, nophi); |
1609 } |
1618 } |
1610 } |
1619 } |
1611 break; |
1620 break; |
1612 } |
1621 } |
1817 if (jvms->is_loc(idx)) { |
1826 if (jvms->is_loc(idx)) { |
1818 t = block()->local_type_at(idx - jvms->locoff()); |
1827 t = block()->local_type_at(idx - jvms->locoff()); |
1819 } else if (jvms->is_stk(idx)) { |
1828 } else if (jvms->is_stk(idx)) { |
1820 t = block()->stack_type_at(idx - jvms->stkoff()); |
1829 t = block()->stack_type_at(idx - jvms->stkoff()); |
1821 } else if (jvms->is_mon(idx)) { |
1830 } else if (jvms->is_mon(idx)) { |
1822 if (EliminateNestedLocks && jvms->is_monitor_box(idx)) { |
1831 assert(!jvms->is_monitor_box(idx), "no phis for boxes"); |
1823 // BoxLock nodes are not commoning. Create Phi. |
1832 t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object |
1824 t = o->bottom_type(); // TypeRawPtr::BOTTOM |
|
1825 } else { |
|
1826 t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object |
|
1827 } |
|
1828 } else if ((uint)idx < TypeFunc::Parms) { |
1833 } else if ((uint)idx < TypeFunc::Parms) { |
1829 t = o->bottom_type(); // Type::RETURN_ADDRESS or such-like. |
1834 t = o->bottom_type(); // Type::RETURN_ADDRESS or such-like. |
1830 } else { |
1835 } else { |
1831 assert(false, "no type information for this phi"); |
1836 assert(false, "no type information for this phi"); |
1832 } |
1837 } |