Skip to content
Permalink
Browse files
8265322: C2: Simplify control inputs for BarrierSetC2::obj_allocate
Reviewed-by: kvn, neliasso
  • Loading branch information
Yi Yang authored and Nils Eliasson committed May 3, 2021
1 parent 194bcec commit 001c5142a6ff4c4073e651ebae9d6d7a8533eb42
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/hotspot/share/gc/shared/c2/barrierSetC2.cpp
  2. +1 −1 src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
  3. +1 −1 src/hotspot/share/opto/macro.cpp
@@ -700,7 +700,7 @@ void BarrierSetC2::clone(GraphKit* kit, Node* src_base, Node* dst_base, Node* si
}
}

Node* BarrierSetC2::obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem, Node* toobig_false, Node* size_in_bytes,
Node* BarrierSetC2::obj_allocate(PhaseMacroExpand* macro, Node* mem, Node* toobig_false, Node* size_in_bytes,
Node*& i_o, Node*& needgc_ctrl,
Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
intx prefetch_lines) const {
@@ -720,7 +720,7 @@ Node* BarrierSetC2::obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem,
// this will require extensive changes to the loop optimization in order to
// prevent a degradation of the optimization.
// See comment in memnode.hpp, around line 227 in class LoadPNode.
Node *eden_end = macro->make_load(ctrl, mem, eden_end_adr, 0, TypeRawPtr::BOTTOM, T_ADDRESS);
Node *eden_end = macro->make_load(toobig_false, mem, eden_end_adr, 0, TypeRawPtr::BOTTOM, T_ADDRESS);

// We need a Region for the loop-back contended case.
enum { fall_in_path = 1, contended_loopback_path = 2 };
@@ -743,7 +743,7 @@ Node* BarrierSetC2::obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem,
// Load(-locked) the heap top.
// See note above concerning the control input when using a TLAB
Node *old_eden_top = UseTLAB
? new LoadPNode (ctrl, contended_phi_rawmem, eden_top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered)
? new LoadPNode (toobig_false, contended_phi_rawmem, eden_top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered)
: new LoadPLockedNode(contended_region, contended_phi_rawmem, eden_top_adr, MemNode::acquire);

macro->transform_later(old_eden_top);
@@ -240,7 +240,7 @@ class BarrierSetC2: public CHeapObj<mtGC> {

virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;

virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem, Node* toobig_false, Node* size_in_bytes,
virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* mem, Node* toobig_false, Node* size_in_bytes,
Node*& i_o, Node*& needgc_ctrl,
Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
intx prefetch_lines) const;
@@ -1337,7 +1337,7 @@ void PhaseMacroExpand::expand_allocate_common(

intx prefetch_lines = length != NULL ? AllocatePrefetchLines : AllocateInstancePrefetchLines;
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
Node* fast_oop = bs->obj_allocate(this, ctrl, mem, toobig_false, size_in_bytes, i_o, needgc_ctrl,
Node* fast_oop = bs->obj_allocate(this, mem, toobig_false, size_in_bytes, i_o, needgc_ctrl,
fast_oop_ctrl, fast_oop_rawmem,
prefetch_lines);

0 comments on commit 001c514

Please sign in to comment.