src/share/vm/opto/reg_split.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8022284 Cdiff src/share/vm/opto/reg_split.cpp

src/share/vm/opto/reg_split.cpp

Print this page

        

*** 130,140 **** b = b->_succs[sidx]; // Switch to successor block i = 1; // Right at start of block } b->_nodes.insert(i,spill); // Insert node in block ! _cfg._bbs.map(spill->_idx,b); // Update node->block mapping to reflect // Adjust the point where we go hi-pressure if( i <= b->_ihrp_index ) b->_ihrp_index++; if( i <= b->_fhrp_index ) b->_fhrp_index++; // Assign a new Live Range Number to the SpillCopy and grow --- 130,140 ---- b = b->_succs[sidx]; // Switch to successor block i = 1; // Right at start of block } b->_nodes.insert(i,spill); // Insert node in block ! _cfg.map_node_to_block(spill, b); // Update node->block mapping to reflect // Adjust the point where we go hi-pressure if( i <= b->_ihrp_index ) b->_ihrp_index++; if( i <= b->_fhrp_index ) b->_fhrp_index++; // Assign a new Live Range Number to the SpillCopy and grow
*** 217,227 **** if( def_down ) { // DEF is DOWN, so connect USE directly to the DEF use->set_req(useidx, def); } else { // Block and index where the use occurs. ! Block *b = _cfg._bbs[use->_idx]; // Put the clone just prior to use int bindex = b->find_node(use); // DEF is UP, so must copy it DOWN and hook in USE // Insert SpillCopy before the USE, which uses DEF as its input, // and defs a new live range, which is used by this node. --- 217,227 ---- if( def_down ) { // DEF is DOWN, so connect USE directly to the DEF use->set_req(useidx, def); } else { // Block and index where the use occurs. ! Block *b = _cfg.get_block_for_node(use); // Put the clone just prior to use int bindex = b->find_node(use); // DEF is UP, so must copy it DOWN and hook in USE // Insert SpillCopy before the USE, which uses DEF as its input, // and defs a new live range, which is used by this node.
*** 268,278 **** // Block and index where the use occurs. int bindex; // Phi input spill-copys belong at the end of the prior block if( use->is_Phi() ) { ! b = _cfg._bbs[b->pred(useidx)->_idx]; bindex = b->end_idx(); } else { // Put the clone just prior to use bindex = b->find_node(use); } --- 268,278 ---- // Block and index where the use occurs. int bindex; // Phi input spill-copys belong at the end of the prior block if( use->is_Phi() ) { ! b = _cfg.get_block_for_node(b->pred(useidx)); bindex = b->end_idx(); } else { // Put the clone just prior to use bindex = b->find_node(use); }
*** 333,343 **** } if (lrgs(lidx).is_singledef()) { continue; } ! Block *b_def = _cfg._bbs[def->_idx]; int idx_def = b_def->find_node(def); Node *in_spill = get_spillcopy_wide( in, def, i ); if( !in_spill ) return 0; // Bailed out insert_proj(b_def,idx_def,in_spill,maxlrg++); if( b_def == b ) --- 333,343 ---- } if (lrgs(lidx).is_singledef()) { continue; } ! Block *b_def = _cfg.get_block_for_node(def); int idx_def = b_def->find_node(def); Node *in_spill = get_spillcopy_wide( in, def, i ); if( !in_spill ) return 0; // Bailed out insert_proj(b_def,idx_def,in_spill,maxlrg++); if( b_def == b )
*** 587,597 **** // reset the Reaches & UP entries Reachblock[slidx] = lrgs(lidx)._def; UPblock[slidx] = true; // Record following instruction in case 'n' rematerializes and // kills flags ! Block *pred1 = _cfg._bbs[b->pred(1)->_idx]; continue; } // Initialize needs_phi and needs_split bool needs_phi = false; --- 587,597 ---- // reset the Reaches & UP entries Reachblock[slidx] = lrgs(lidx)._def; UPblock[slidx] = true; // Record following instruction in case 'n' rematerializes and // kills flags ! Block *pred1 = _cfg.get_block_for_node(b->pred(1)); continue; } // Initialize needs_phi and needs_split bool needs_phi = false;
*** 599,609 **** bool has_phi = false; // Walk the predecessor blocks to check inputs for that live range // Grab predecessor block header n1 = b->pred(1); // Grab the appropriate reaching def info for inpidx ! pred = _cfg._bbs[n1->_idx]; pidx = pred->_pre_order; Node **Ltmp = Reaches[pidx]; bool *Utmp = UP[pidx]; n1 = Ltmp[slidx]; u1 = Utmp[slidx]; --- 599,609 ---- bool has_phi = false; // Walk the predecessor blocks to check inputs for that live range // Grab predecessor block header n1 = b->pred(1); // Grab the appropriate reaching def info for inpidx ! pred = _cfg.get_block_for_node(n1); pidx = pred->_pre_order; Node **Ltmp = Reaches[pidx]; bool *Utmp = UP[pidx]; n1 = Ltmp[slidx]; u1 = Utmp[slidx];
*** 614,624 **** // Compare inputs to see if a Phi is needed for( inpidx = 2; inpidx < b->num_preds(); inpidx++ ) { // Grab predecessor block headers n2 = b->pred(inpidx); // Grab the appropriate reaching def info for inpidx ! pred = _cfg._bbs[n2->_idx]; pidx = pred->_pre_order; Ltmp = Reaches[pidx]; Utmp = UP[pidx]; n2 = Ltmp[slidx]; u2 = Utmp[slidx]; --- 614,624 ---- // Compare inputs to see if a Phi is needed for( inpidx = 2; inpidx < b->num_preds(); inpidx++ ) { // Grab predecessor block headers n2 = b->pred(inpidx); // Grab the appropriate reaching def info for inpidx ! pred = _cfg.get_block_for_node(n2); pidx = pred->_pre_order; Ltmp = Reaches[pidx]; Utmp = UP[pidx]; n2 = Ltmp[slidx]; u2 = Utmp[slidx];
*** 699,709 **** // Do not need a phi, so grab the reaching DEF else { // Grab predecessor block header n1 = b->pred(1); // Grab the appropriate reaching def info for k ! pred = _cfg._bbs[n1->_idx]; pidx = pred->_pre_order; Node **Ltmp = Reaches[pidx]; bool *Utmp = UP[pidx]; // reset the Reaches & UP entries Reachblock[slidx] = Ltmp[slidx]; --- 699,709 ---- // Do not need a phi, so grab the reaching DEF else { // Grab predecessor block header n1 = b->pred(1); // Grab the appropriate reaching def info for k ! pred = _cfg.get_block_for_node(n1); pidx = pred->_pre_order; Node **Ltmp = Reaches[pidx]; bool *Utmp = UP[pidx]; // reset the Reaches & UP entries Reachblock[slidx] = Ltmp[slidx];
*** 917,927 **** def = clone_node(def, b, C); if (def == NULL || C->check_node_count(NodeLimitFudgeFactor, out_of_nodes)) { return 0; } _lrg_map.extend(def->_idx, 0); ! _cfg._bbs.map(def->_idx,b); n->set_req(inpidx, def); continue; } // Rematerializable? Then clone def at use site instead --- 917,927 ---- def = clone_node(def, b, C); if (def == NULL || C->check_node_count(NodeLimitFudgeFactor, out_of_nodes)) { return 0; } _lrg_map.extend(def->_idx, 0); ! _cfg.map_node_to_block(def, b); n->set_req(inpidx, def); continue; } // Rematerializable? Then clone def at use site instead
*** 1289,1299 **** // Walk the phis list to patch inputs, split phis, and name phis uint lrgs_before_phi_split = maxlrg; for( insidx = 0; insidx < phis->size(); insidx++ ) { Node *phi = phis->at(insidx); assert(phi->is_Phi(),"This list must only contain Phi Nodes"); ! Block *b = _cfg._bbs[phi->_idx]; // Grab the live range number uint lidx = _lrg_map.find_id(phi); uint slidx = lrg2reach[lidx]; // Update node to lidx map new_lrg(phi, maxlrg++); --- 1289,1299 ---- // Walk the phis list to patch inputs, split phis, and name phis uint lrgs_before_phi_split = maxlrg; for( insidx = 0; insidx < phis->size(); insidx++ ) { Node *phi = phis->at(insidx); assert(phi->is_Phi(),"This list must only contain Phi Nodes"); ! Block *b = _cfg.get_block_for_node(phi); // Grab the live range number uint lidx = _lrg_map.find_id(phi); uint slidx = lrg2reach[lidx]; // Update node to lidx map new_lrg(phi, maxlrg++);
*** 1313,1323 **** // Walk the predecessor blocks and assign the reaching def to the Phi. // Split Phi nodes by placing USE side splits wherever the reaching // DEF has the wrong UP/DOWN value. for( uint i = 1; i < b->num_preds(); i++ ) { // Get predecessor block pre-order number ! Block *pred = _cfg._bbs[b->pred(i)->_idx]; pidx = pred->_pre_order; // Grab reaching def Node *def = Reaches[pidx][slidx]; assert( def, "must have reaching def" ); // If input up/down sense and reg-pressure DISagree --- 1313,1323 ---- // Walk the predecessor blocks and assign the reaching def to the Phi. // Split Phi nodes by placing USE side splits wherever the reaching // DEF has the wrong UP/DOWN value. for( uint i = 1; i < b->num_preds(); i++ ) { // Get predecessor block pre-order number ! Block *pred = _cfg.get_block_for_node(b->pred(i)); pidx = pred->_pre_order; // Grab reaching def Node *def = Reaches[pidx][slidx]; assert( def, "must have reaching def" ); // If input up/down sense and reg-pressure DISagree
src/share/vm/opto/reg_split.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File