< prev index next >

src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp

Print this page




  93       unregister_potential_barrier_node(n);
  94     }
  95   }
  96 }
  97 
  98 void ZBarrierSetC2::enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const {
  99   if (node->is_LoadBarrier() && !node->as_LoadBarrier()->has_true_uses()) {
 100     worklist.push(node);
 101   }
 102 }
 103 
 104 void ZBarrierSetC2::find_dominating_barriers(PhaseIterGVN& igvn) {
 105   // Look for dominating barriers on the same address only once all
 106   // other loop opts are over: loop opts may cause a safepoint to be
 107   // inserted between a barrier and its dominating barrier.
 108   Compile* C = Compile::current();
 109   ZBarrierSetC2* bs = (ZBarrierSetC2*)BarrierSet::barrier_set()->barrier_set_c2();
 110   ZBarrierSetC2State* s = bs->state();
 111   if (s->load_barrier_count() >= 2) {
 112     Compile::TracePhase tp("idealLoop", &C->timers[Phase::_t_idealLoop]);
 113     PhaseIdealLoop ideal_loop(igvn, true, false, true);
 114     if (C->major_progress()) C->print_method(PHASE_PHASEIDEALLOOP_ITERATIONS, 2);
 115   }
 116 }
 117 
 118 void ZBarrierSetC2::add_users_to_worklist(Unique_Node_List* worklist) const {
 119   // Permanent temporary workaround
 120   // Loadbarriers may have non-obvious dead uses keeping them alive during parsing. The use is
 121   // removed by RemoveUseless (after parsing, before optimize) but the barriers won't be added to
 122   // the worklist. Unless we add them explicitly they are not guaranteed to end up there.
 123   ZBarrierSetC2State* s = state();
 124 
 125   for (int i = 0; i < s->load_barrier_count(); i++) {
 126     LoadBarrierNode* n = s->load_barrier_node(i);
 127     worklist->push(n);
 128   }
 129 }
 130 
 131 const TypeFunc* ZBarrierSetC2::load_barrier_Type() const {
 132   const Type** fields;
 133 




  93       unregister_potential_barrier_node(n);
  94     }
  95   }
  96 }
  97 
  98 void ZBarrierSetC2::enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const {
  99   if (node->is_LoadBarrier() && !node->as_LoadBarrier()->has_true_uses()) {
 100     worklist.push(node);
 101   }
 102 }
 103 
 104 void ZBarrierSetC2::find_dominating_barriers(PhaseIterGVN& igvn) {
 105   // Look for dominating barriers on the same address only once all
 106   // other loop opts are over: loop opts may cause a safepoint to be
 107   // inserted between a barrier and its dominating barrier.
 108   Compile* C = Compile::current();
 109   ZBarrierSetC2* bs = (ZBarrierSetC2*)BarrierSet::barrier_set()->barrier_set_c2();
 110   ZBarrierSetC2State* s = bs->state();
 111   if (s->load_barrier_count() >= 2) {
 112     Compile::TracePhase tp("idealLoop", &C->timers[Phase::_t_idealLoop]);
 113     PhaseIdealLoop ideal_loop(igvn, LoopOptsZgcLastRound);
 114     if (C->major_progress()) C->print_method(PHASE_PHASEIDEALLOOP_ITERATIONS, 2);
 115   }
 116 }
 117 
 118 void ZBarrierSetC2::add_users_to_worklist(Unique_Node_List* worklist) const {
 119   // Permanent temporary workaround
 120   // Loadbarriers may have non-obvious dead uses keeping them alive during parsing. The use is
 121   // removed by RemoveUseless (after parsing, before optimize) but the barriers won't be added to
 122   // the worklist. Unless we add them explicitly they are not guaranteed to end up there.
 123   ZBarrierSetC2State* s = state();
 124 
 125   for (int i = 0; i < s->load_barrier_count(); i++) {
 126     LoadBarrierNode* n = s->load_barrier_node(i);
 127     worklist->push(n);
 128   }
 129 }
 130 
 131 const TypeFunc* ZBarrierSetC2::load_barrier_Type() const {
 132   const Type** fields;
 133 


< prev index next >