Lines Matching refs:use

69       // Alter data node to use pre-phi inputs
144 // the existing Node picks up a new use. We need to make the
162 // New late point must dominate new use
171 // for each use outside of this loop.
217 set_ctrl(con, C->root()); // Constant gets a new use
552 Node* use = phi->fast_out(k);
553 if (use->is_Cmp() || use->is_DecodeN() || use->is_EncodeP())
555 // Is there a use inside the loop?
558 IdealLoopTree* u_loop = get_loop(has_ctrl(use) ? get_ctrl(use) : use);
655 // Attempt to use a conditional move instead of a phi/branch
774 // Place some computation next to use but not inside inner loops.
786 // in the post-order, so it can dirty the I-DOM info and not use the dirtied
932 if( u_loop == n_loop ) break; // Found loop-varying use
933 if( n_loop->is_member( u_loop ) ) break; // Found use in inner loop
950 Node *u = n->last_out(j); // Clone private computation per use
964 } else { // Normal use
975 // Find control for 'x' next to use but not inside inner loops.
1039 Node* use = n->raw_out(i);
1041 if (use->outcnt() != 0 && !visited.test_set(use->_idx)) {
1042 // Now do pre-visit work for this use
1043 use = split_if_with_blocks_pre( use );
1044 nstack.push(n, i); // Save parent and next use's index.
1045 n = use; // Process all children of current use.
1046 cnt = use->outcnt();
1060 // Get saved parent node and next use's index. Visit the rest of uses.
1215 // If 'use' was in the loop-exit block, it now needs to be sunk
1217 void PhaseIdealLoop::sink_use( Node *use, Node *post_loop ) {
1218 if (!use->is_CFG() && get_ctrl(use) == post_loop->in(2)) {
1219 set_ctrl(use, post_loop);
1220 for (DUIterator j = use->outs(); use->has_out(j); j++)
1221 sink_use(use->out(j), post_loop);
1266 // loop use it. If the old input is INside the loop, use the corresponding
1298 // point to merge the old and new IfFalse/IfTrue nodes; make the use
1308 // Copy uses to a worklist, so I can munge the def-use info
1314 Node *use = worklist.pop();
1315 if (!has_node(use)) continue; // Ignore dead nodes
1316 IdealLoopTree *use_loop = get_loop( has_ctrl(use) ? get_ctrl(use) : use );
1317 if( !loop->is_member( use_loop ) && use->is_CFG() ) {
1319 assert( use->is_Proj(), "" );
1322 Node *newuse = use->clone();
1331 // Map the old use to the new merge point
1332 old_new.map( use->_idx, r );
1333 uint dd_r = MIN2(dom_depth(newuse),dom_depth(use));
1334 assert( dd_r >= dom_depth(dom_lca(newuse,use)), "" );
1336 // The original user of 'use' uses 'r' instead.
1337 for (DUIterator_Last lmin, l = use->last_outs(lmin); l >= lmin;) {
1338 Node* useuse = use->last_out(l);
1341 if( useuse->in(0) == use ) {
1350 if( useuse->in(k) == use ) {
1360 r->set_req( 2, use );
1368 // Step 4: If loop-invariant use is not control, it must be dominated by a
1377 // Copy uses to a worklist, so I can munge the def-use info
1383 Node *use = worklist.pop();
1384 if (!has_node(use)) continue; // Ignore dead nodes
1385 if (use->in(0) == C->top()) continue;
1386 IdealLoopTree *use_loop = get_loop( has_ctrl(use) ? get_ctrl(use) : use );
1387 // Check for data-use outside of loop - at least one of OLD or USE
1389 if( !loop->is_member( use_loop ) && (!old->is_CFG() || !use->is_CFG())) {
1391 // If the Data use is an IF, that means we have an IF outside of the
1396 if( use->is_If() || use->is_CMove() ) {
1401 split_if_set->push(use);
1403 if( use->is_Bool() ) {
1406 split_bool_set->push(use);
1408 if( use->Opcode() == Op_CreateEx ) {
1411 split_cex_set->push(use);
1415 // Get "block" use is in
1417 while( use->in(idx) != old ) idx++;
1418 Node *prev = use->is_CFG() ? use : get_ctrl(use);
1423 if( use->is_Phi() ) // Phi use is in prior block
1426 _igvn.replace_input_of(use, idx, C->top());
1434 // If the use occurs after merging several exits from the loop, then
1443 phi = prev; // Just use existing control
1456 phi = prev; // Just use existing control
1469 // Remove the new phi from the graph and use the hit
1475 // Make 'use' use the Phi instead of the old loop body exit value
1476 _igvn.replace_input_of(use, idx, phi);
1477 if( use->_idx >= new_counter ) { // If updating new phis
1482 Node *hit = _igvn.hash_find_insert(use);
1484 _igvn.replace_node( use, hit );
1487 // If 'use' was in the loop-exit block, it now needs to be sunk
1489 sink_use( use, prev );
1596 Node* use = n->fast_out(i);
1597 if (!has_ctrl(use) && loop->is_member(get_loop(use))) {
1601 unique = use;
1879 Node* use = n->raw_out(idx);
1881 if (!visited.test_set(use->_idx)) {
1882 if (member.test(use->_idx)) {
1884 n = use;
1901 // Has a use in the vector set
1904 Node* use = n->fast_out(j);
1905 if (vset.test(use->_idx)) {
1914 // Has use internal to the vector set (ie. not in a phi at the loop head)
1918 Node* use = n->fast_out(j);
1919 if (vset.test(use->_idx) && !(use->is_Phi() && use->in(0) == head)) {
1933 Node* use = n->fast_out(j);
1934 if( !loop->is_member(get_loop(has_ctrl(use) ? get_ctrl(use) : use)) ) {
1935 worklist.push(use);
1939 Node *use = worklist.pop();
1940 if (!has_node(use) || use->in(0) == C->top()) continue;
1942 for (j = 0; j < use->req(); j++) {
1943 if (use->in(j) == n) break;
1945 assert(j < use->req(), "must be there");
1947 // clone "n" and insert it between the inputs of "n" and the use outside the loop
1949 _igvn.replace_input_of(use, j, n_clone);
1952 if (!use->is_Phi()) {
1953 use_c = has_ctrl(use) ? get_ctrl(use) : use->in(0);
1955 // Use in a phi is considered a use in the associated predecessor block
1956 use_c = use->in(0)->in(j);
1985 Node* use = n->fast_out(j);
1986 if ( not_peel.test(use->_idx) &&
1987 (use->is_If() || use->is_CMove() || use->is_Bool()) &&
1988 use->in(1) == n) {
1989 worklist.push(use);
1993 // clone "n" and insert it between inputs of "n" and the use
2006 Node *use = worklist.pop();
2007 _igvn.rehash_node_delayed(use);
2008 for (uint j = 1; j < use->req(); j++) {
2009 if (use->in(j) == n) {
2010 use->set_req(j, n_clone);
2019 // Insert phi(lp_entry_val, back_edge_val) at use->in(idx) for loop lp if phi does not already exist
2020 void PhaseIdealLoop::insert_phi_for_loop( Node* use, uint idx, Node* lp_entry_val, Node* back_edge_val, LoopNode* lp ) {
2029 // Remove the new phi from the graph and use the hit
2033 _igvn.replace_input_of(use, idx, phi);
2080 // Ensure a use outside of loop is of the right form
2081 bool PhaseIdealLoop::is_valid_clone_loop_exit_use( IdealLoopTree *loop, Node* use, uint exit_idx) {
2082 Node *use_c = has_ctrl(use) ? get_ctrl(use) : use;
2083 return (use->is_Phi() &&
2100 Node *use = def->fast_out(j);
2101 Node *use_c = has_ctrl(use) ? get_ctrl(use) : use;
2103 // use is not in the loop, check for correct structure
2104 if (use->in(0) == def) {
2106 } else if (!is_valid_clone_loop_exit_use(loop, use, orig_exit_idx)) {
2440 Node* use = n->fast_out(j);
2441 if (use->is_CFG() &&
2442 loop->is_member(get_loop(use)) &&
2443 !peel.test_set(use->_idx)) {
2444 worklist.push(use);
2475 Node* use = head->fast_out(j);
2476 if (use->is_Phi()) old_phi_cnt++;
2520 // Otherwise check for special def-use cases that span
2584 // Add phi if "def" node is in peel set and "use" is not
2590 Node *use = def->fast_out(j);
2591 if (has_node(use) && use->in(0) != C->top() &&
2592 (!peel.test(use->_idx) ||
2593 (use->is_Phi() && use->in(0) == head)) ) {
2594 worklist.push(use);
2598 Node *use = worklist.pop();
2599 for (uint j = 1; j < use->req(); j++) {
2600 Node* n = use->in(j);
2603 // "def" is in peel set, "use" is not in peel set
2604 // or "use" is in the entry boundary (a phi) of the peel set
2606 Node* use_c = has_ctrl(use) ? get_ctrl(use) : use;
2609 // use is in loop
2610 if (old_new[use->_idx] != NULL) { // null for dead code
2611 Node* use_clone = old_new[use->_idx];
2612 _igvn.replace_input_of(use, j, C->top());
2616 assert(is_valid_clone_loop_exit_use(loop, use, orig_exit_idx), "clone loop format");
2617 // use is not in the loop, check if the live range includes the cut
2620 assert(j == orig_exit_idx, "use from original loop");
2621 insert_phi_for_loop( use, clone_exit_idx, old_new[def->_idx], def, new_head_clone );
2656 new_head->set_req(LoopNode::EntryControl, C->top()); // use rehash_node_delayed / set_req instead of
2669 Node* use = head->fast_out(k);
2670 if (use->is_Phi() && use->outcnt() > 0) {
2671 Node* use_clone = old_new[use->_idx];
2672 _igvn.rehash_node_delayed(use); // Multiple edge updates
2673 use->set_req(LoopNode::EntryControl, use_clone->in(LoopNode::LoopBackControl));
2674 use->set_req(LoopNode::LoopBackControl, C->top());
2731 // Fix this by adjusting to use the post-increment trip counter.
2737 Node* use = phi->fast_out(i); // User of trip-counter
2738 if (!has_ctrl(use)) continue;
2739 Node *u_ctrl = get_ctrl(use);
2740 if (use->is_Phi()) {
2742 for (uint j = 1; j < use->req(); j++)
2743 if (use->in(j) == phi)
2744 u_ctrl = dom_lca(u_ctrl, use->in(0)->in(j));
2747 // Look for loop-invariant use
2750 // Check that use is live out the bottom. Assuming the trip-counter
2753 // Hit! Refactor use to use the post-incremented tripcounter.
2761 _igvn.rehash_node_delayed(use);
2762 for (uint j = 1; j < use->req(); j++) {
2763 if (use->in(j) == phi)
2764 use->set_req(j, post);