equal
deleted
inserted
replaced
1022 if (n->is_Phi()) { |
1022 if (n->is_Phi()) { |
1023 for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) { |
1023 for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) { |
1024 Node* m = n->fast_out(j); |
1024 Node* m = n->fast_out(j); |
1025 if (m->is_FastLock()) |
1025 if (m->is_FastLock()) |
1026 return false; |
1026 return false; |
|
1027 #if INCLUDE_SHENANDOAHGC |
|
1028 if (m->is_ShenandoahBarrier() && m->has_out_with(Op_FastLock)) { |
|
1029 return false; |
|
1030 } |
|
1031 #endif |
1027 #ifdef _LP64 |
1032 #ifdef _LP64 |
1028 if (m->Opcode() == Op_ConvI2L) |
1033 if (m->Opcode() == Op_ConvI2L) |
1029 return false; |
1034 return false; |
1030 if (m->is_CastII() && m->isa_CastII()->has_range_check()) { |
1035 if (m->is_CastII() && m->isa_CastII()->has_range_check()) { |
1031 return false; |
1036 return false; |
1308 } |
1313 } |
1309 // If n is a load, and the late control is the same as the current |
1314 // If n is a load, and the late control is the same as the current |
1310 // control, then the cloning of n is a pointless exercise, because |
1315 // control, then the cloning of n is a pointless exercise, because |
1311 // GVN will ensure that we end up where we started. |
1316 // GVN will ensure that we end up where we started. |
1312 if (!n->is_Load() || late_load_ctrl != n_ctrl) { |
1317 if (!n->is_Load() || late_load_ctrl != n_ctrl) { |
|
1318 BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2(); |
1313 for (DUIterator_Last jmin, j = n->last_outs(jmin); j >= jmin; ) { |
1319 for (DUIterator_Last jmin, j = n->last_outs(jmin); j >= jmin; ) { |
1314 Node *u = n->last_out(j); // Clone private computation per use |
1320 Node *u = n->last_out(j); // Clone private computation per use |
1315 _igvn.rehash_node_delayed(u); |
1321 _igvn.rehash_node_delayed(u); |
1316 Node *x = n->clone(); // Clone computation |
1322 Node *x = n->clone(); // Clone computation |
1317 Node *x_ctrl = NULL; |
1323 Node *x_ctrl = NULL; |
1337 } |
1343 } |
1338 |
1344 |
1339 // Find control for 'x' next to use but not inside inner loops. |
1345 // Find control for 'x' next to use but not inside inner loops. |
1340 // For inner loop uses get the preheader area. |
1346 // For inner loop uses get the preheader area. |
1341 x_ctrl = place_near_use(x_ctrl); |
1347 x_ctrl = place_near_use(x_ctrl); |
|
1348 |
|
1349 if (bs->sink_node(this, n, x, x_ctrl, n_ctrl)) { |
|
1350 continue; |
|
1351 } |
1342 |
1352 |
1343 if (n->is_Load()) { |
1353 if (n->is_Load()) { |
1344 // For loads, add a control edge to a CFG node outside of the loop |
1354 // For loads, add a control edge to a CFG node outside of the loop |
1345 // to force them to not combine and return back inside the loop |
1355 // to force them to not combine and return back inside the loop |
1346 // during GVN optimization (4641526). |
1356 // during GVN optimization (4641526). |
3135 |
3145 |
3136 if ( !has_use_internal_to_set(n, peel, loop) ) { |
3146 if ( !has_use_internal_to_set(n, peel, loop) ) { |
3137 |
3147 |
3138 // if not pinned and not a load (which maybe anti-dependent on a store) |
3148 // if not pinned and not a load (which maybe anti-dependent on a store) |
3139 // and not a CMove (Matcher expects only bool->cmove). |
3149 // and not a CMove (Matcher expects only bool->cmove). |
3140 if ( n->in(0) == NULL && !n->is_Load() && !n->is_CMove() ) { |
3150 if (n->in(0) == NULL && !n->is_Load() && !n->is_CMove() && n->Opcode() != Op_ShenandoahWBMemProj) { |
3141 cloned_for_outside_use += clone_for_use_outside_loop( loop, n, worklist ); |
3151 cloned_for_outside_use += clone_for_use_outside_loop( loop, n, worklist ); |
3142 sink_list.push(n); |
3152 sink_list.push(n); |
3143 peel >>= n->_idx; // delete n from peel set. |
3153 peel >>= n->_idx; // delete n from peel set. |
3144 not_peel <<= n->_idx; // add n to not_peel set. |
3154 not_peel <<= n->_idx; // add n to not_peel set. |
3145 peel_list.remove(i); |
3155 peel_list.remove(i); |