src/hotspot/share/opto/phaseX.cpp
changeset 58516 d376d86b0a01
parent 57632 9c523692db7e
child 58679 9c3209ff7550
child 58751 0f882d53c204
equal deleted inserted replaced
58515:8f849d3ec1e5 58516:d376d86b0a01
  1646     }
  1646     }
  1647     // Loading the java mirror from a Klass requires two loads and the type
  1647     // Loading the java mirror from a Klass requires two loads and the type
  1648     // of the mirror load depends on the type of 'n'. See LoadNode::Value().
  1648     // of the mirror load depends on the type of 'n'. See LoadNode::Value().
  1649     //   LoadBarrier?(LoadP(LoadP(AddP(foo:Klass, #java_mirror))))
  1649     //   LoadBarrier?(LoadP(LoadP(AddP(foo:Klass, #java_mirror))))
  1650     BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
  1650     BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
  1651     bool has_load_barriers = bs->has_load_barriers();
  1651     bool has_load_barrier_nodes = bs->has_load_barrier_nodes();
  1652 
  1652 
  1653     if (use_op == Op_LoadP && use->bottom_type()->isa_rawptr()) {
  1653     if (use_op == Op_LoadP && use->bottom_type()->isa_rawptr()) {
  1654       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
  1654       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
  1655         Node* u = use->fast_out(i2);
  1655         Node* u = use->fast_out(i2);
  1656         const Type* ut = u->bottom_type();
  1656         const Type* ut = u->bottom_type();
  1657         if (u->Opcode() == Op_LoadP && ut->isa_instptr()) {
  1657         if (u->Opcode() == Op_LoadP && ut->isa_instptr()) {
  1658           if (has_load_barriers) {
  1658           if (has_load_barrier_nodes) {
  1659             // Search for load barriers behind the load
  1659             // Search for load barriers behind the load
  1660             for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
  1660             for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
  1661               Node* b = u->fast_out(i3);
  1661               Node* b = u->fast_out(i3);
  1662               if (bs->is_gc_barrier_node(b)) {
  1662               if (bs->is_gc_barrier_node(b)) {
  1663                 _worklist.push(b);
  1663                 _worklist.push(b);
  1806           }
  1806           }
  1807         }
  1807         }
  1808         // Loading the java mirror from a Klass requires two loads and the type
  1808         // Loading the java mirror from a Klass requires two loads and the type
  1809         // of the mirror load depends on the type of 'n'. See LoadNode::Value().
  1809         // of the mirror load depends on the type of 'n'. See LoadNode::Value().
  1810         BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
  1810         BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
  1811         bool has_load_barriers = bs->has_load_barriers();
  1811         bool has_load_barrier_nodes = bs->has_load_barrier_nodes();
  1812 
  1812 
  1813         if (m_op == Op_LoadP && m->bottom_type()->isa_rawptr()) {
  1813         if (m_op == Op_LoadP && m->bottom_type()->isa_rawptr()) {
  1814           for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
  1814           for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
  1815             Node* u = m->fast_out(i2);
  1815             Node* u = m->fast_out(i2);
  1816             const Type* ut = u->bottom_type();
  1816             const Type* ut = u->bottom_type();
  1817             if (u->Opcode() == Op_LoadP && ut->isa_instptr() && ut != type(u)) {
  1817             if (u->Opcode() == Op_LoadP && ut->isa_instptr() && ut != type(u)) {
  1818               if (has_load_barriers) {
  1818               if (has_load_barrier_nodes) {
  1819                 // Search for load barriers behind the load
  1819                 // Search for load barriers behind the load
  1820                 for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
  1820                 for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
  1821                   Node* b = u->fast_out(i3);
  1821                   Node* b = u->fast_out(i3);
  1822                   if (bs->is_gc_barrier_node(b)) {
  1822                   if (bs->is_gc_barrier_node(b)) {
  1823                     worklist.push(b);
  1823                     worklist.push(b);