706 } |
706 } |
707 |
707 |
708 void ShenandoahBarrierSetC2::clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const { |
708 void ShenandoahBarrierSetC2::clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const { |
709 assert(!src->is_AddP(), "unexpected input"); |
709 assert(!src->is_AddP(), "unexpected input"); |
710 BarrierSetC2::clone(kit, src, dst, size, is_array); |
710 BarrierSetC2::clone(kit, src, dst, size, is_array); |
711 } |
|
712 |
|
713 Node* ShenandoahBarrierSetC2::obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem, Node* toobig_false, Node* size_in_bytes, |
|
714 Node*& i_o, Node*& needgc_ctrl, |
|
715 Node*& fast_oop_ctrl, Node*& fast_oop_rawmem, |
|
716 intx prefetch_lines) const { |
|
717 PhaseIterGVN& igvn = macro->igvn(); |
|
718 |
|
719 // Allocate several words more for the Shenandoah brooks pointer. |
|
720 size_in_bytes = new AddXNode(size_in_bytes, igvn.MakeConX(ShenandoahForwarding::byte_size())); |
|
721 macro->transform_later(size_in_bytes); |
|
722 |
|
723 Node* fast_oop = BarrierSetC2::obj_allocate(macro, ctrl, mem, toobig_false, size_in_bytes, |
|
724 i_o, needgc_ctrl, fast_oop_ctrl, fast_oop_rawmem, |
|
725 prefetch_lines); |
|
726 |
|
727 // Bump up object for Shenandoah brooks pointer. |
|
728 fast_oop = new AddPNode(macro->top(), fast_oop, igvn.MakeConX(ShenandoahForwarding::byte_size())); |
|
729 macro->transform_later(fast_oop); |
|
730 |
|
731 // Initialize Shenandoah brooks pointer to point to the object itself. |
|
732 fast_oop_rawmem = macro->make_store(fast_oop_ctrl, fast_oop_rawmem, fast_oop, ShenandoahForwarding::byte_offset(), fast_oop, T_OBJECT); |
|
733 |
|
734 return fast_oop; |
|
735 } |
711 } |
736 |
712 |
737 // Support for GC barriers emitted during parsing |
713 // Support for GC barriers emitted during parsing |
738 bool ShenandoahBarrierSetC2::is_gc_barrier_node(Node* node) const { |
714 bool ShenandoahBarrierSetC2::is_gc_barrier_node(Node* node) const { |
739 if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) return true; |
715 if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) return true; |