< prev index next >

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

Print this page
*** 782,11 ***
      enum { _heap_stable = 1, _heap_unstable, PATH_LIMIT };
      Node* region = new RegionNode(PATH_LIMIT);
      Node* mem_phi = new PhiNode(region, Type::MEMORY, TypeRawPtr::BOTTOM);
  
      Node* thread = phase->transform_later(new ThreadLocalNode());
!     Node* offset = phase->igvn().MakeConX(in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
      Node* gc_state_addr = phase->transform_later(new AddPNode(phase->C->top(), thread, offset));
  
      uint gc_state_idx = Compile::AliasIdxRaw;
      const TypePtr* gc_state_adr_type = nullptr; // debug-mode-only argument
      debug_only(gc_state_adr_type = phase->C->get_adr_type(gc_state_idx));
--- 782,11 ---
      enum { _heap_stable = 1, _heap_unstable, PATH_LIMIT };
      Node* region = new RegionNode(PATH_LIMIT);
      Node* mem_phi = new PhiNode(region, Type::MEMORY, TypeRawPtr::BOTTOM);
  
      Node* thread = phase->transform_later(new ThreadLocalNode());
!     Node* offset = phase->MakeConX(in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
      Node* gc_state_addr = phase->transform_later(new AddPNode(phase->C->top(), thread, offset));
  
      uint gc_state_idx = Compile::AliasIdxRaw;
      const TypePtr* gc_state_adr_type = nullptr; // debug-mode-only argument
      debug_only(gc_state_adr_type = phase->C->get_adr_type(gc_state_idx));

*** 830,11 ***
                                   src, dest, length
                                   LP64_ONLY(COMMA phase->top()));
      call = phase->transform_later(call);
  
      // Hook up the whole thing into the graph
!     phase->igvn().replace_node(ac, call);
    } else {
      BarrierSetC2::clone_at_expansion(phase, ac);
    }
  }
  
--- 830,11 ---
                                   src, dest, length
                                   LP64_ONLY(COMMA phase->top()));
      call = phase->transform_later(call);
  
      // Hook up the whole thing into the graph
!     phase->replace_node(ac, call);
    } else {
      BarrierSetC2::clone_at_expansion(phase, ac);
    }
  }
  

*** 850,13 ***
    if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
      state()->remove_load_reference_barrier((ShenandoahLoadReferenceBarrierNode*) node);
    }
  }
  
! void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* n) const {
    if (is_shenandoah_wb_pre_call(n)) {
!     shenandoah_eliminate_wb_pre(n, &macro->igvn());
    }
  }
  
  void ShenandoahBarrierSetC2::shenandoah_eliminate_wb_pre(Node* call, PhaseIterGVN* igvn) const {
    assert(UseShenandoahGC && is_shenandoah_wb_pre_call(call), "");
--- 850,13 ---
    if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
      state()->remove_load_reference_barrier((ShenandoahLoadReferenceBarrierNode*) node);
    }
  }
  
! void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseIterGVN* igvn, Node* n) const {
    if (is_shenandoah_wb_pre_call(n)) {
!     shenandoah_eliminate_wb_pre(n, igvn);
    }
  }
  
  void ShenandoahBarrierSetC2::shenandoah_eliminate_wb_pre(Node* call, PhaseIterGVN* igvn) const {
    assert(UseShenandoahGC && is_shenandoah_wb_pre_call(call), "");

*** 983,11 ***
  }
  #endif
  
  Node* ShenandoahBarrierSetC2::ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const {
    if (is_shenandoah_wb_pre_call(n)) {
!     uint cnt = ShenandoahBarrierSetC2::write_ref_field_pre_Type()->domain()->cnt();
      if (n->req() > cnt) {
        Node* addp = n->in(cnt);
        if (has_only_shenandoah_wb_pre_uses(addp)) {
          n->del_req(cnt);
          if (can_reshape) {
--- 983,11 ---
  }
  #endif
  
  Node* ShenandoahBarrierSetC2::ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const {
    if (is_shenandoah_wb_pre_call(n)) {
!     uint cnt = ShenandoahBarrierSetC2::write_ref_field_pre_Type()->domain_sig()->cnt();
      if (n->req() > cnt) {
        Node* addp = n->in(cnt);
        if (has_only_shenandoah_wb_pre_uses(addp)) {
          n->del_req(cnt);
          if (can_reshape) {

*** 1069,11 ***
      case Op_CallLeaf:
      case Op_CallLeafNoFP: {
        assert (n->is_Call(), "");
        CallNode *call = n->as_Call();
        if (ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(call)) {
!         uint cnt = ShenandoahBarrierSetC2::write_ref_field_pre_Type()->domain()->cnt();
          if (call->req() > cnt) {
            assert(call->req() == cnt + 1, "only one extra input");
            Node *addp = call->in(cnt);
            assert(!ShenandoahBarrierSetC2::has_only_shenandoah_wb_pre_uses(addp), "useless address computation?");
            call->del_req(cnt);
--- 1069,11 ---
      case Op_CallLeaf:
      case Op_CallLeafNoFP: {
        assert (n->is_Call(), "");
        CallNode *call = n->as_Call();
        if (ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(call)) {
!         uint cnt = ShenandoahBarrierSetC2::write_ref_field_pre_Type()->domain_sig()->cnt();
          if (call->req() > cnt) {
            assert(call->req() == cnt + 1, "only one extra input");
            Node *addp = call->in(cnt);
            assert(!ShenandoahBarrierSetC2::has_only_shenandoah_wb_pre_uses(addp), "useless address computation?");
            call->del_req(cnt);
< prev index next >