693 Node* ShenandoahBarrierSetC2::resolve_for_write(GraphKit* kit, Node* n) const {
694 return shenandoah_write_barrier(kit, n);
695 }
696
697 // Support for GC barriers emitted during parsing
698 bool ShenandoahBarrierSetC2::is_gc_barrier_node(Node* node) const {
699 if (node->Opcode() != Op_CallLeaf && node->Opcode() != Op_CallLeafNoFP) {
700 return false;
701 }
702 CallLeafNode *call = node->as_CallLeaf();
703 if (call->_name == NULL) {
704 return false;
705 }
706
707 return strcmp(call->_name, "shenandoah_clone_barrier") == 0 ||
708 strcmp(call->_name, "shenandoah_cas_obj") == 0 ||
709 strcmp(call->_name, "shenandoah_wb_pre") == 0;
710 }
711
712 Node* ShenandoahBarrierSetC2::step_over_gc_barrier(Node* c) const {
713 // Currently not needed.
714 return c;
715 }
716
717 bool ShenandoahBarrierSetC2::array_copy_requires_gc_barriers(BasicType type) const {
718 return false;
719 }
720
721 // Support for macro expanded GC barriers
722 void ShenandoahBarrierSetC2::register_potential_barrier_node(Node* node) const {
723 if (node->Opcode() == Op_ShenandoahWriteBarrier) {
724 state()->add_shenandoah_barrier((ShenandoahWriteBarrierNode*) node);
725 }
726 }
727
728 void ShenandoahBarrierSetC2::unregister_potential_barrier_node(Node* node) const {
729 if (node->Opcode() == Op_ShenandoahWriteBarrier) {
730 state()->remove_shenandoah_barrier((ShenandoahWriteBarrierNode*) node);
731 }
732 }
733
734 void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* n) const {
|
693 Node* ShenandoahBarrierSetC2::resolve_for_write(GraphKit* kit, Node* n) const {
694 return shenandoah_write_barrier(kit, n);
695 }
696
697 // Support for GC barriers emitted during parsing
698 bool ShenandoahBarrierSetC2::is_gc_barrier_node(Node* node) const {
699 if (node->Opcode() != Op_CallLeaf && node->Opcode() != Op_CallLeafNoFP) {
700 return false;
701 }
702 CallLeafNode *call = node->as_CallLeaf();
703 if (call->_name == NULL) {
704 return false;
705 }
706
707 return strcmp(call->_name, "shenandoah_clone_barrier") == 0 ||
708 strcmp(call->_name, "shenandoah_cas_obj") == 0 ||
709 strcmp(call->_name, "shenandoah_wb_pre") == 0;
710 }
711
712 Node* ShenandoahBarrierSetC2::step_over_gc_barrier(Node* c) const {
713 return ShenandoahBarrierNode::skip_through_barrier(c);
714 }
715
716 bool ShenandoahBarrierSetC2::array_copy_requires_gc_barriers(BasicType type) const {
717 return false;
718 }
719
720 // Support for macro expanded GC barriers
721 void ShenandoahBarrierSetC2::register_potential_barrier_node(Node* node) const {
722 if (node->Opcode() == Op_ShenandoahWriteBarrier) {
723 state()->add_shenandoah_barrier((ShenandoahWriteBarrierNode*) node);
724 }
725 }
726
727 void ShenandoahBarrierSetC2::unregister_potential_barrier_node(Node* node) const {
728 if (node->Opcode() == Op_ShenandoahWriteBarrier) {
729 state()->remove_shenandoah_barrier((ShenandoahWriteBarrierNode*) node);
730 }
731 }
732
733 void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* n) const {
|