< prev index next >

src/share/vm/opto/graphKit.cpp

Print this page




1521 void GraphKit::pre_barrier(bool do_load,
1522                            Node* ctl,
1523                            Node* obj,
1524                            Node* adr,
1525                            uint  adr_idx,
1526                            Node* val,
1527                            const TypeOopPtr* val_type,
1528                            Node* pre_val,
1529                            BasicType bt) {
1530 
1531   BarrierSet* bs = Universe::heap()->barrier_set();
1532   set_control(ctl);
1533   switch (bs->kind()) {
1534     case BarrierSet::G1SATBCTLogging:
1535       g1_write_barrier_pre(do_load, obj, adr, adr_idx, val, val_type, pre_val, bt);
1536       break;
1537 
1538     case BarrierSet::CardTableForRS:
1539     case BarrierSet::CardTableExtension:
1540     case BarrierSet::ModRef:

1541       break;
1542 
1543     default      :
1544       ShouldNotReachHere();
1545 
1546   }
1547 }
1548 
1549 bool GraphKit::can_move_pre_barrier() const {
1550   BarrierSet* bs = Universe::heap()->barrier_set();
1551   switch (bs->kind()) {
1552     case BarrierSet::G1SATBCTLogging:
1553       return true; // Can move it if no safepoint
1554 
1555     case BarrierSet::CardTableForRS:
1556     case BarrierSet::CardTableExtension:
1557     case BarrierSet::ModRef:

1558       return true; // There is no pre-barrier
1559 
1560     default      :
1561       ShouldNotReachHere();
1562   }
1563   return false;
1564 }
1565 
1566 void GraphKit::post_barrier(Node* ctl,
1567                             Node* store,
1568                             Node* obj,
1569                             Node* adr,
1570                             uint  adr_idx,
1571                             Node* val,
1572                             BasicType bt,
1573                             bool use_precise) {
1574   BarrierSet* bs = Universe::heap()->barrier_set();
1575   set_control(ctl);
1576   switch (bs->kind()) {
1577     case BarrierSet::G1SATBCTLogging:
1578       g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise);
1579       break;
1580 
1581     case BarrierSet::CardTableForRS:
1582     case BarrierSet::CardTableExtension:
1583       write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
1584       break;
1585 
1586     case BarrierSet::ModRef:

1587       break;
1588 
1589     default      :
1590       ShouldNotReachHere();
1591 
1592   }
1593 }
1594 
1595 Node* GraphKit::store_oop(Node* ctl,
1596                           Node* obj,
1597                           Node* adr,
1598                           const TypePtr* adr_type,
1599                           Node* val,
1600                           const TypeOopPtr* val_type,
1601                           BasicType bt,
1602                           bool use_precise,
1603                           MemNode::MemOrd mo,
1604                           bool mismatched) {
1605   // Transformation of a value which could be NULL pointer (CastPP #NULL)
1606   // could be delayed during Parse (for example, in adjust_map_after_if()).




1521 void GraphKit::pre_barrier(bool do_load,
1522                            Node* ctl,
1523                            Node* obj,
1524                            Node* adr,
1525                            uint  adr_idx,
1526                            Node* val,
1527                            const TypeOopPtr* val_type,
1528                            Node* pre_val,
1529                            BasicType bt) {
1530 
1531   BarrierSet* bs = Universe::heap()->barrier_set();
1532   set_control(ctl);
1533   switch (bs->kind()) {
1534     case BarrierSet::G1SATBCTLogging:
1535       g1_write_barrier_pre(do_load, obj, adr, adr_idx, val, val_type, pre_val, bt);
1536       break;
1537 
1538     case BarrierSet::CardTableForRS:
1539     case BarrierSet::CardTableExtension:
1540     case BarrierSet::ModRef:
1541     case BarrierSet::Epsilon:
1542       break;
1543 
1544     default      :
1545       ShouldNotReachHere();
1546 
1547   }
1548 }
1549 
1550 bool GraphKit::can_move_pre_barrier() const {
1551   BarrierSet* bs = Universe::heap()->barrier_set();
1552   switch (bs->kind()) {
1553     case BarrierSet::G1SATBCTLogging:
1554       return true; // Can move it if no safepoint
1555 
1556     case BarrierSet::CardTableForRS:
1557     case BarrierSet::CardTableExtension:
1558     case BarrierSet::ModRef:
1559     case BarrierSet::Epsilon:
1560       return true; // There is no pre-barrier
1561 
1562     default      :
1563       ShouldNotReachHere();
1564   }
1565   return false;
1566 }
1567 
1568 void GraphKit::post_barrier(Node* ctl,
1569                             Node* store,
1570                             Node* obj,
1571                             Node* adr,
1572                             uint  adr_idx,
1573                             Node* val,
1574                             BasicType bt,
1575                             bool use_precise) {
1576   BarrierSet* bs = Universe::heap()->barrier_set();
1577   set_control(ctl);
1578   switch (bs->kind()) {
1579     case BarrierSet::G1SATBCTLogging:
1580       g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise);
1581       break;
1582 
1583     case BarrierSet::CardTableForRS:
1584     case BarrierSet::CardTableExtension:
1585       write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
1586       break;
1587 
1588     case BarrierSet::ModRef:
1589     case BarrierSet::Epsilon:
1590       break;
1591 
1592     default      :
1593       ShouldNotReachHere();
1594 
1595   }
1596 }
1597 
1598 Node* GraphKit::store_oop(Node* ctl,
1599                           Node* obj,
1600                           Node* adr,
1601                           const TypePtr* adr_type,
1602                           Node* val,
1603                           const TypeOopPtr* val_type,
1604                           BasicType bt,
1605                           bool use_precise,
1606                           MemNode::MemOrd mo,
1607                           bool mismatched) {
1608   // Transformation of a value which could be NULL pointer (CastPP #NULL)
1609   // could be delayed during Parse (for example, in adjust_map_after_if()).


< prev index next >