< prev index next >

src/share/vm/opto/loopopts.cpp

Print this page

        

*** 30,39 **** --- 30,42 ---- #include "opto/loopnode.hpp" #include "opto/matcher.hpp" #include "opto/mulnode.hpp" #include "opto/rootnode.hpp" #include "opto/subnode.hpp" + #if INCLUDE_ALL_GCS + #include "gc_implementation/shenandoah/c2/shenandoahSupport.hpp" + #endif //============================================================================= //------------------------------split_thru_phi--------------------------------- // Split Node 'n' through merge point if there is enough win. Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
*** 115,124 **** --- 118,128 ---- _igvn.set_type(x, t); // If x is a TypeNode, capture any more-precise type permanently into Node // otherwise it will be not updated during igvn->transform since // igvn->type(x) is set to x->Value() already. x->raise_bottom_type(t); + if (x->Opcode() != Op_ShenandoahLoadReferenceBarrier) { Node *y = x->Identity(&_igvn); if (y != x) { wins++; x = y; } else {
*** 131,140 **** --- 135,147 ---- // We do not need register_new_node_with_optimizer // because set_type has already been called. _igvn._worklist.push(x); } } + } else { + _igvn._worklist.push(x); + } } if (x != the_clone && the_clone != NULL) _igvn.remove_dead_node(the_clone); phi->set_req( i, x ); }
*** 302,312 **** // This allows us to split-up address expressions. if (m->is_AddP() && get_ctrl(m->in(2)) != n_ctrl && get_ctrl(m->in(3)) != n_ctrl) { // Move the AddP up to dominating point ! set_ctrl_and_loop(m, find_non_split_ctrl(idom(n_ctrl))); continue; } return NULL; } assert(n->is_Phi() || m->is_Phi() || is_dominator(get_ctrl(m), n_ctrl), "m has strange control"); --- 309,320 ---- // This allows us to split-up address expressions. if (m->is_AddP() && get_ctrl(m->in(2)) != n_ctrl && get_ctrl(m->in(3)) != n_ctrl) { // Move the AddP up to dominating point ! Node* c = find_non_split_ctrl(idom(n_ctrl)); ! set_ctrl_and_loop(m, c); continue; } return NULL; } assert(n->is_Phi() || m->is_Phi() || is_dominator(get_ctrl(m), n_ctrl), "m has strange control");
*** 742,751 **** --- 750,764 ---- // Moved a load around the loop, 'en-registering' something. if (n_blk->is_Loop() && n->is_Load() && !phi->in(LoopNode::LoopBackControl)->is_Load()) C->set_major_progress(); + // Moved a barrier around the loop, 'en-registering' something. + if (n_blk->is_Loop() && n->Opcode() == Op_ShenandoahLoadReferenceBarrier && + phi->in(LoopNode::LoopBackControl)->Opcode() != Op_ShenandoahLoadReferenceBarrier) + C->set_major_progress(); + return phi; } static bool merge_point_too_heavy(Compile* C, Node* region) { // Bail out if the region and its phis have too many users.
< prev index next >