< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp

Print this page

        

*** 858,869 **** phase->lazy_replace(outer, new_outer); phase->lazy_replace(le, new_le); inner->clear_strip_mined(); } ! void ShenandoahBarrierC2Support::test_heap_stable(Node*& ctrl, Node* raw_mem, Node*& heap_stable_ctrl, ! PhaseIdealLoop* phase) { IdealLoopTree* loop = phase->get_loop(ctrl); Node* thread = new ThreadLocalNode(); phase->register_new_node(thread, ctrl); Node* offset = phase->igvn().MakeConX(in_bytes(ShenandoahThreadLocalData::gc_state_offset())); phase->set_ctrl(offset, phase->C->root()); --- 858,869 ---- phase->lazy_replace(outer, new_outer); phase->lazy_replace(le, new_le); inner->clear_strip_mined(); } ! void ShenandoahBarrierC2Support::test_heap_state(Node*& ctrl, Node* raw_mem, Node*& heap_stable_ctrl, ! PhaseIdealLoop* phase, int flags) { IdealLoopTree* loop = phase->get_loop(ctrl); Node* thread = new ThreadLocalNode(); phase->register_new_node(thread, ctrl); Node* offset = phase->igvn().MakeConX(in_bytes(ShenandoahThreadLocalData::gc_state_offset())); phase->set_ctrl(offset, phase->C->root());
*** 873,883 **** const TypePtr* gc_state_adr_type = NULL; // debug-mode-only argument debug_only(gc_state_adr_type = phase->C->get_adr_type(gc_state_idx)); Node* gc_state = new LoadBNode(ctrl, raw_mem, gc_state_addr, gc_state_adr_type, TypeInt::BYTE, MemNode::unordered); phase->register_new_node(gc_state, ctrl); ! Node* heap_stable_and = new AndINode(gc_state, phase->igvn().intcon(ShenandoahHeap::HAS_FORWARDED)); phase->register_new_node(heap_stable_and, ctrl); Node* heap_stable_cmp = new CmpINode(heap_stable_and, phase->igvn().zerocon(T_INT)); phase->register_new_node(heap_stable_cmp, ctrl); Node* heap_stable_test = new BoolNode(heap_stable_cmp, BoolTest::ne); phase->register_new_node(heap_stable_test, ctrl); --- 873,883 ---- const TypePtr* gc_state_adr_type = NULL; // debug-mode-only argument debug_only(gc_state_adr_type = phase->C->get_adr_type(gc_state_idx)); Node* gc_state = new LoadBNode(ctrl, raw_mem, gc_state_addr, gc_state_adr_type, TypeInt::BYTE, MemNode::unordered); phase->register_new_node(gc_state, ctrl); ! Node* heap_stable_and = new AndINode(gc_state, phase->igvn().intcon(flags)); phase->register_new_node(heap_stable_and, ctrl); Node* heap_stable_cmp = new CmpINode(heap_stable_and, phase->igvn().zerocon(T_INT)); phase->register_new_node(heap_stable_cmp, ctrl); Node* heap_stable_test = new BoolNode(heap_stable_cmp, BoolTest::ne); phase->register_new_node(heap_stable_test, ctrl);
*** 887,897 **** heap_stable_ctrl = new IfFalseNode(heap_stable_iff); phase->register_control(heap_stable_ctrl, loop, heap_stable_iff); ctrl = new IfTrueNode(heap_stable_iff); phase->register_control(ctrl, loop, heap_stable_iff); ! assert(is_heap_stable_test(heap_stable_iff), "Should match the shape"); } void ShenandoahBarrierC2Support::test_null(Node*& ctrl, Node* val, Node*& null_ctrl, PhaseIdealLoop* phase) { const Type* val_t = phase->igvn().type(val); if (val_t->meet(TypePtr::NULL_PTR) == val_t) { --- 887,897 ---- heap_stable_ctrl = new IfFalseNode(heap_stable_iff); phase->register_control(heap_stable_ctrl, loop, heap_stable_iff); ctrl = new IfTrueNode(heap_stable_iff); phase->register_control(ctrl, loop, heap_stable_iff); ! assert(is_heap_state_test(heap_stable_iff, flags), "Should match the shape"); } void ShenandoahBarrierC2Support::test_null(Node*& ctrl, Node* val, Node*& null_ctrl, PhaseIdealLoop* phase) { const Type* val_t = phase->igvn().type(val); if (val_t->meet(TypePtr::NULL_PTR) == val_t) {
*** 1435,1445 **** Node* region = new RegionNode(PATH_LIMIT); Node* val_phi = new PhiNode(region, uncasted_val->bottom_type()->is_oopptr()); Node* raw_mem_phi = PhiNode::make(region, raw_mem, Type::MEMORY, TypeRawPtr::BOTTOM); // Stable path. ! test_heap_stable(ctrl, raw_mem, heap_stable_ctrl, phase); IfNode* heap_stable_iff = heap_stable_ctrl->in(0)->as_If(); // Heap stable case region->init_req(_heap_stable, heap_stable_ctrl); val_phi->init_req(_heap_stable, uncasted_val); --- 1435,1445 ---- Node* region = new RegionNode(PATH_LIMIT); Node* val_phi = new PhiNode(region, uncasted_val->bottom_type()->is_oopptr()); Node* raw_mem_phi = PhiNode::make(region, raw_mem, Type::MEMORY, TypeRawPtr::BOTTOM); // Stable path. ! test_heap_state(ctrl, raw_mem, heap_stable_ctrl, phase, ShenandoahHeap::HAS_FORWARDED); IfNode* heap_stable_iff = heap_stable_ctrl->in(0)->as_If(); // Heap stable case region->init_req(_heap_stable, heap_stable_ctrl); val_phi->init_req(_heap_stable, uncasted_val);
*** 1606,1616 **** enum { _fast_path = 1, _slow_path, _null_path, PATH_LIMIT2 }; Node* region2 = new RegionNode(PATH_LIMIT2); Node* phi2 = PhiNode::make(region2, raw_mem, Type::MEMORY, TypeRawPtr::BOTTOM); // Stable path. ! test_heap_stable(ctrl, raw_mem, heap_stable_ctrl, phase); region->init_req(_heap_stable, heap_stable_ctrl); phi->init_req(_heap_stable, raw_mem); // Null path Node* reg2_ctrl = NULL; --- 1606,1616 ---- enum { _fast_path = 1, _slow_path, _null_path, PATH_LIMIT2 }; Node* region2 = new RegionNode(PATH_LIMIT2); Node* phi2 = PhiNode::make(region2, raw_mem, Type::MEMORY, TypeRawPtr::BOTTOM); // Stable path. ! test_heap_state(ctrl, raw_mem, heap_stable_ctrl, phase, ShenandoahHeap::MARKING | ShenandoahHeap::TRAVERSAL); region->init_req(_heap_stable, heap_stable_ctrl); phi->init_req(_heap_stable, raw_mem); // Null path Node* reg2_ctrl = NULL;
< prev index next >