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