< prev index next >
src/share/vm/opto/macro.cpp
Print this page
rev 8961 : [mq]: diff-shenandoah.patch
*** 40,49 ****
--- 40,50 ----
#include "opto/node.hpp"
#include "opto/opaquenode.hpp"
#include "opto/phaseX.hpp"
#include "opto/rootnode.hpp"
#include "opto/runtime.hpp"
+ #include "opto/shenandoahSupport.hpp"
#include "opto/subnode.hpp"
#include "opto/type.hpp"
#include "runtime/sharedRuntime.hpp"
*** 931,940 ****
--- 932,944 ----
field_val = field_val->in(1);
} else {
field_val = transform_later(new DecodeNNode(field_val, field_val->get_ptr_type()));
}
}
+ if (field_val->isa_ShenandoahBarrier()) {
+ field_val = field_val->in(ShenandoahBarrierNode::ValueIn);
+ }
sfpt->add_req(field_val);
}
JVMState *jvms = sfpt->jvms();
jvms->set_endoff(sfpt->req());
// Now make a pass over the debug information replacing any references
*** 1409,1418 ****
--- 1413,1429 ----
? new LoadPNode (ctrl, contended_phi_rawmem, eden_top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered)
: new LoadPLockedNode(contended_region, contended_phi_rawmem, eden_top_adr, MemNode::acquire);
transform_later(old_eden_top);
// Add to heap top to get a new heap top
+
+ if (UseShenandoahGC) {
+ // Allocate one word more for the Shenandoah brooks pointer.
+ size_in_bytes = new AddLNode(size_in_bytes, _igvn.MakeConX(8));
+ transform_later(size_in_bytes);
+ }
+
Node *new_eden_top = new AddPNode(top(), old_eden_top, size_in_bytes);
transform_later(new_eden_top);
// Check for needing a GC; compare against heap end
Node *needgc_cmp = new CmpPNode(new_eden_top, eden_end);
transform_later(needgc_cmp);
*** 1499,1508 ****
--- 1510,1526 ----
transform_later(new_alloc_bytes);
fast_oop_rawmem = make_store(fast_oop_ctrl, store_eden_top, alloc_bytes_adr,
0, new_alloc_bytes, T_LONG);
}
+ if (UseShenandoahGC) {
+ // Bump up object by one word. The preceding word is used for
+ // the Shenandoah brooks pointer.
+ fast_oop = new AddPNode(top(), fast_oop, _igvn.MakeConX(8));
+ transform_later(fast_oop);
+ }
+
InitializeNode* init = alloc->initialization();
fast_oop_rawmem = initialize_object(alloc,
fast_oop_ctrl, fast_oop_rawmem, fast_oop,
klass_node, length, size_in_bytes);
*** 1776,1785 ****
--- 1794,1808 ----
ciKlass* k = _igvn.type(klass_node)->is_klassptr()->klass();
if (k->is_array_klass()) // we know the exact header size in most cases:
header_size = Klass::layout_helper_header_size(k->layout_helper());
}
+ if (UseShenandoahGC) {
+ // Initialize Shenandoah brooks pointer to point to the object itself.
+ rawmem = make_store(control, rawmem, object, -8, object, T_OBJECT);
+ }
+
// Clear the object body, if necessary.
if (init == NULL) {
// The init has somehow disappeared; be cautious and clear everything.
//
// This can happen if a node is allocated but an uncommon trap occurs
< prev index next >