< prev index next >

src/hotspot/share/opto/parse1.cpp

Print this page




1864                 jvms->is_mon(j) && jvms->is_monitor_box(j)) {
1865               // BoxLock nodes are not commoning.
1866               // Use old BoxLock node as merged box.
1867               assert(newin->jvms()->is_monitor_box(j), "sanity");
1868               // This assert also tests that nodes are BoxLock.
1869               assert(BoxLockNode::same_slot(n, m), "sanity");
1870               C->gvn_replace_by(n, m);
1871             } else if (!check_elide_phi || !target->can_elide_SEL_phi(j)) {
1872               phi = ensure_phi(j, nophi);
1873             }
1874           }
1875           break;
1876         }
1877       }
1878       // At this point, n might be top if:
1879       //  - there is no phi (because TypeFlow detected a conflict), or
1880       //  - the corresponding control edges is top (a dead incoming path)
1881       // It is a bug if we create a phi which sees a garbage value on a live path.
1882 
1883       // Merging two value types?
1884       assert(n->is_top() || m->is_ValueType() == n->is_ValueType(), "value types should only be merged with other value types");
1885       if (phi != NULL && n->isa_ValueType()) {
1886         // Reload current state because it may have been updated by ensure_phi
1887         m = map()->in(j);
1888         ValueTypeNode* vtm = m->as_ValueType(); // Current value type
1889         ValueTypeNode* vtn = n->as_ValueType(); // Incoming value type
1890         assert(vtm->get_oop() == phi, "Value type should have Phi input");
1891         if (TraceOptoParse) {
1892 #ifdef ASSERT
1893           tty->print_cr("\nMerging value types");
1894           tty->print_cr("Current:");
1895           vtm->dump(2);
1896           tty->print_cr("Incoming:");
1897           vtn->dump(2);
1898           tty->cr();
1899 #endif
1900         }
1901         // Do the merge
1902         vtm->merge_with(&_gvn, vtn, pnum, last_merge);
1903         if (last_merge) {
1904           map()->set_req(j, _gvn.transform_no_reclaim(vtm));




1864                 jvms->is_mon(j) && jvms->is_monitor_box(j)) {
1865               // BoxLock nodes are not commoning.
1866               // Use old BoxLock node as merged box.
1867               assert(newin->jvms()->is_monitor_box(j), "sanity");
1868               // This assert also tests that nodes are BoxLock.
1869               assert(BoxLockNode::same_slot(n, m), "sanity");
1870               C->gvn_replace_by(n, m);
1871             } else if (!check_elide_phi || !target->can_elide_SEL_phi(j)) {
1872               phi = ensure_phi(j, nophi);
1873             }
1874           }
1875           break;
1876         }
1877       }
1878       // At this point, n might be top if:
1879       //  - there is no phi (because TypeFlow detected a conflict), or
1880       //  - the corresponding control edges is top (a dead incoming path)
1881       // It is a bug if we create a phi which sees a garbage value on a live path.
1882 
1883       // Merging two value types?

1884       if (phi != NULL && n->isa_ValueType()) {
1885         // Reload current state because it may have been updated by ensure_phi
1886         m = map()->in(j);
1887         ValueTypeNode* vtm = m->as_ValueType(); // Current value type
1888         ValueTypeNode* vtn = n->as_ValueType(); // Incoming value type
1889         assert(vtm->get_oop() == phi, "Value type should have Phi input");
1890         if (TraceOptoParse) {
1891 #ifdef ASSERT
1892           tty->print_cr("\nMerging value types");
1893           tty->print_cr("Current:");
1894           vtm->dump(2);
1895           tty->print_cr("Incoming:");
1896           vtn->dump(2);
1897           tty->cr();
1898 #endif
1899         }
1900         // Do the merge
1901         vtm->merge_with(&_gvn, vtn, pnum, last_merge);
1902         if (last_merge) {
1903           map()->set_req(j, _gvn.transform_no_reclaim(vtm));


< prev index next >