Skip to content

Commit 001c514

Browse files
y1yang0Nils Eliasson
authored andcommitted
8265322: C2: Simplify control inputs for BarrierSetC2::obj_allocate
Reviewed-by: kvn, neliasso
1 parent 194bcec commit 001c514

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/hotspot/share/gc/shared/c2/barrierSetC2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ void BarrierSetC2::clone(GraphKit* kit, Node* src_base, Node* dst_base, Node* si
700700
}
701701
}
702702

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

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

749749
macro->transform_later(old_eden_top);

src/hotspot/share/gc/shared/c2/barrierSetC2.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class BarrierSetC2: public CHeapObj<mtGC> {
240240

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

243-
virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem, Node* toobig_false, Node* size_in_bytes,
243+
virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* mem, Node* toobig_false, Node* size_in_bytes,
244244
Node*& i_o, Node*& needgc_ctrl,
245245
Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
246246
intx prefetch_lines) const;

src/hotspot/share/opto/macro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ void PhaseMacroExpand::expand_allocate_common(
13371337

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

0 commit comments

Comments
 (0)