1614 switch (bs->kind()) {
1615 case BarrierSet::G1SATBCTLogging:
1616 g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise);
1617 break;
1618
1619 case BarrierSet::CardTableForRS:
1620 case BarrierSet::CardTableExtension:
1621 write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
1622 break;
1623
1624 case BarrierSet::ModRef:
1625 case BarrierSet::ShenandoahBarrierSet:
1626 break;
1627
1628 default :
1629 ShouldNotReachHere();
1630
1631 }
1632 }
1633
1634 Node* GraphKit::store_oop(Node* ctl,
1635 Node* obj,
1636 Node* adr,
1637 const TypePtr* adr_type,
1638 Node* val,
1639 const TypeOopPtr* val_type,
1640 BasicType bt,
1641 bool use_precise,
1642 MemNode::MemOrd mo,
1643 bool mismatched) {
1644 // Transformation of a value which could be NULL pointer (CastPP #NULL)
1645 // could be delayed during Parse (for example, in adjust_map_after_if()).
1646 // Execute transformation here to avoid barrier generation in such case.
1647 if (_gvn.type(val) == TypePtr::NULL_PTR)
1648 val = _gvn.makecon(TypePtr::NULL_PTR);
1649
1650 set_control(ctl);
1651 if (stopped()) return top(); // Dead path ?
1652
1653 assert(bt == T_OBJECT, "sanity");
|
1614 switch (bs->kind()) {
1615 case BarrierSet::G1SATBCTLogging:
1616 g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise);
1617 break;
1618
1619 case BarrierSet::CardTableForRS:
1620 case BarrierSet::CardTableExtension:
1621 write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
1622 break;
1623
1624 case BarrierSet::ModRef:
1625 case BarrierSet::ShenandoahBarrierSet:
1626 break;
1627
1628 default :
1629 ShouldNotReachHere();
1630
1631 }
1632 }
1633
1634 void GraphKit::keep_alive_barrier(Node* ctl, Node* obj) {
1635 BarrierSet* bs = Universe::heap()->barrier_set();
1636 switch (bs->kind()) {
1637 case BarrierSet::G1SATBCTLogging:
1638 pre_barrier(false /* do_load */,
1639 ctl,
1640 NULL /* obj */,
1641 NULL /* adr */,
1642 max_juint /* alias_idx */,
1643 NULL /* val */,
1644 NULL /* val_type */,
1645 obj /* pre_val */,
1646 T_OBJECT);
1647 break;
1648 case BarrierSet::ShenandoahBarrierSet:
1649 if (ShenandoahKeepAliveBarrier) {
1650 pre_barrier(false /* do_load */,
1651 ctl,
1652 NULL /* obj */,
1653 NULL /* adr */,
1654 max_juint /* alias_idx */,
1655 NULL /* val */,
1656 NULL /* val_type */,
1657 obj /* pre_val */,
1658 T_OBJECT);
1659 }
1660 break;
1661 case BarrierSet::CardTableForRS:
1662 case BarrierSet::CardTableExtension:
1663 case BarrierSet::ModRef:
1664 break;
1665 default :
1666 ShouldNotReachHere();
1667
1668 }
1669 }
1670
1671 Node* GraphKit::store_oop(Node* ctl,
1672 Node* obj,
1673 Node* adr,
1674 const TypePtr* adr_type,
1675 Node* val,
1676 const TypeOopPtr* val_type,
1677 BasicType bt,
1678 bool use_precise,
1679 MemNode::MemOrd mo,
1680 bool mismatched) {
1681 // Transformation of a value which could be NULL pointer (CastPP #NULL)
1682 // could be delayed during Parse (for example, in adjust_map_after_if()).
1683 // Execute transformation here to avoid barrier generation in such case.
1684 if (_gvn.type(val) == TypePtr::NULL_PTR)
1685 val = _gvn.makecon(TypePtr::NULL_PTR);
1686
1687 set_control(ctl);
1688 if (stopped()) return top(); // Dead path ?
1689
1690 assert(bt == T_OBJECT, "sanity");
|