< prev index next >

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

Print this page
rev 52710 : Upstream/backport Shenandoah to JDK11u


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




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


< prev index next >