1607 case Op_LoadBarrierSlowReg:
1608 case Op_LoadBarrierWeakSlowReg: {
1609 const Type *t = gvn->type(n);
1610 if (t->make_ptr() != NULL) {
1611 Node *adr = n->in(MemNode::Address);
1612 conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL);
1613 return true;
1614 }
1615 }
1616 case Op_Proj: {
1617 if (n->as_Proj()->_con == LoadBarrierNode::Oop && n->in(0)->is_LoadBarrier()) {
1618 conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(0)->in(LoadBarrierNode::Oop), NULL);
1619 return true;
1620 }
1621 }
1622 default:
1623 break;
1624 }
1625 return false;
1626 }
|
1607 case Op_LoadBarrierSlowReg:
1608 case Op_LoadBarrierWeakSlowReg: {
1609 const Type *t = gvn->type(n);
1610 if (t->make_ptr() != NULL) {
1611 Node *adr = n->in(MemNode::Address);
1612 conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL);
1613 return true;
1614 }
1615 }
1616 case Op_Proj: {
1617 if (n->as_Proj()->_con == LoadBarrierNode::Oop && n->in(0)->is_LoadBarrier()) {
1618 conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(0)->in(LoadBarrierNode::Oop), NULL);
1619 return true;
1620 }
1621 }
1622 default:
1623 break;
1624 }
1625 return false;
1626 }
1627
1628 void ZBarrierSetC2::igvn_add_users_to_worklist(PhaseIterGVN* igvn, Node* use) const {
1629 // Loading the java mirror from a Klass requires two loads and the type
1630 // of the mirror load depends on the type of 'n'. See LoadNode::Value().
1631 // LoadBarrier?(LoadP(LoadP(AddP(foo:Klass, #java_mirror))))
1632 int use_op = use->Opcode();
1633 if (use_op == Op_LoadP && use->bottom_type()->isa_rawptr()) {
1634 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
1635 Node* u = use->fast_out(i2);
1636 const Type* ut = u->bottom_type();
1637 if (u->Opcode() == Op_LoadP && ut->isa_instptr()) {
1638 // Search for load barriers behind the load
1639 for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
1640 Node* b = u->fast_out(i3);
1641 if (is_gc_barrier_node(b)) {
1642 igvn->_worklist.push(b);
1643 }
1644 }
1645 }
1646 }
1647 }
1648 }
1649
1650 void ZBarrierSetC2::ccp_analyze(PhaseCCP* ccp, Unique_Node_List& worklist, Node* use) const {
1651 // Loading the java mirror from a Klass requires two loads and the type
1652 // of the mirror load depends on the type of 'n'. See LoadNode::Value().
1653 int use_op = use->Opcode();
1654 if (use_op == Op_LoadP && use->bottom_type()->isa_rawptr()) {
1655 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
1656 Node* u = use->fast_out(i2);
1657 const Type* ut = u->bottom_type();
1658 if (u->Opcode() == Op_LoadP && ut->isa_instptr() && ut != ccp->type(u)) {
1659 // Search for load barriers behind the load
1660 for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
1661 Node* b = u->fast_out(i3);
1662 if (is_gc_barrier_node(b)) {
1663 worklist.push(b);
1664 }
1665 }
1666 }
1667 }
1668 }
1669 }
|