Lines Matching defs:basis
78 is called a "basis" for S1. In both cases, S1 may be replaced by
147 C1 + (C2 * C3) + C4 in the index (i) field. A basis for a CAND_REF
149 least two CAND_REFs are chained together using the basis relation,
185 has a "hidden basis" (2). The hidden basis is unlike a normal basis
186 in that the statement and the hidden basis have different base SSA
195 The hidden basis for statement (6) is the nearest dominating candidate
198 create the new "phi basis" (4a) and feeding adds along incoming arcs (3a),
206 stride of 1. A statement with a hidden basis can then be detected by
208 extracting the derived base name, and searching for a basis in the
246 A candidate can only be a basis for candidates of the same final type.
274 /* Index of the basis statement S0, if any, in the candidate vector. */
275 cand_idx basis;
277 /* First candidate for which this candidate is a basis, if one exists. */
280 /* Next candidate having the same basis as this one. */
295 /* We sometimes have to cache a phi basis with a phi candidate to
325 between the index of the candidate and the index of its basis,
336 /* The increment that relates a candidate to its basis. */
548 slsr_cand_t basis = NULL;
576 if (!basis || basis->cand_num < one_basis->cand_num)
577 basis = one_basis;
580 return basis;
584 that can serve as a basis for C. Each potential basis must also
586 the same stride and type. If more than one possible basis exists,
588 the most immediately dominating basis. */
593 slsr_cand_t basis = find_basis_for_base_expr (c, c->base_expr);
595 /* If a candidate doesn't have a basis using its base expression,
596 it may have a basis hidden by one or more intervening phis. */
597 if (!basis && c->def_phi)
601 basis = find_basis_for_base_expr (c, phi_cand->base_expr);
603 if (basis)
605 /* A hidden basis must dominate the phi-definition of the
608 basis_bb = gimple_bb (basis->cand_stmt);
613 basis = NULL;
614 c->basis = 0;
617 /* If we found a hidden basis, estimate additional dead-code
620 if (basis && uses_consumed_by_stmt (feeding_var, c->cand_stmt))
625 if (flag_expensive_optimizations && !basis && c->kind == CAND_REF)
629 basis = find_basis_for_base_expr (c, alt_base_expr);
632 if (basis)
634 c->sibling = basis->dependent;
635 basis->dependent = c->cand_num;
636 return basis->cand_num;
643 as a basis using that base expression. BASE may be the same as
672 Attempt to find a basis for the candidate.
675 to find a basis. This helps cases where the expression hidden
709 c->basis = 0;
711 c->basis = find_basis_for_candidate (c);
805 a candidate. Note that a CAND_PHI never has a basis itself, but
806 is used to help find a basis for subsequent candidates. */
879 misleadingly for this case, as no basis will be sought for a
1039 the candidate table and attempt to find a basis. */
1237 create two CAND_MULT interpretations and attempt to find a basis for
1239 find a basis. */
1249 finding a basis, so if this is removed that must be considered. */
1568 to use a similar previous candidate as a basis. If we have earlier seen
1896 fprintf (dump_file, "\n basis: %d dependent: %d sibling: %d\n",
1897 c->basis, c->dependent, c->sibling);
2036 if (c->basis == 0
2080 it has a phi definition for its base name. It may have a basis
2084 && c->basis
2085 && lookup_cand (c->basis)->def_phi != c->def_phi);
2089 its basis. */
2094 slsr_cand_t basis;
2096 /* If the candidate doesn't have a basis, just return its own
2098 an existing initializer. Also, if the candidate's basis is
2100 from the newly introduced phi basis. */
2101 if (!c->basis || phi_dependent_cand_p (c))
2104 basis = lookup_cand (c->basis);
2105 gcc_assert (operand_equal_p (c->base_expr, basis->base_expr, 0));
2106 return c->index - basis->index;
2110 its basis. If we aren't going to generate pointer arithmetic
2172 /* If the basis name and the candidate's LHS have incompatible types,
2251 slsr_cand_t basis;
2256 basis = lookup_cand (c->basis);
2259 replace_mult_candidate (c, gimple_assign_lhs (basis->cand_stmt), bump);
2295 index as C's hidden basis, the hidden basis represents this
2415 slsr_cand_t basis = lookup_cand (c->basis);
2434 this incoming arc should use the hidden basis. */
2436 if (basis->index == 0)
2437 feeding_def = gimple_assign_lhs (basis->cand_stmt);
2440 widest_int incr = -basis->index;
2449 process it in the same fashion to ensure that all basis
2457 widest_int diff = arg_cand->index - basis->index;
2469 /* Create the new phi basis. */
2484 fputs ("Introducing new phi basis: ", dump_file);
2492 /* Given a candidate C with BASIS_NAME being the LHS of C's basis which
2494 block as FROM_PHI. The new phi is suitable for use as a basis by C,
2496 hidden basis along conditional incoming paths. Those adjustments are
2513 /* Given a candidate C whose basis is hidden by at least one intervening
2514 phi, introduce a matching number of new phis to represent its basis
2517 basis. */
2523 slsr_cand_t basis;
2526 /* Look up the LHS SSA name from C's basis. This will be the
2528 basis = lookup_cand (c->basis);
2529 basis_name = gimple_assign_lhs (basis->cand_stmt);
2531 /* Create a new phi statement which will represent C's true basis
2537 /* Replace C with an add of the new basis phi and a constant. */
2560 basis, this isn't a candidate for replacement. Indicate this by
2562 these situations when determining the basis, so we defer the
2565 slsr_cand_t basis = lookup_cand (c->basis);
2566 basic_block basis_bb = gimple_bb (basis->cand_stmt);
2599 /* Compute the expected costs of inserting basis adjustments for
2615 phi that hides its basis. If not, replace the candidate unconditionally.
2731 If this is the root candidate which doesn't have a basis, set
2735 incr_vec[incr_vec_len].count = c->basis || is_phi_adjust ? 1 : 0;
2782 record_phi_increments_1 (slsr_cand_t basis, gimple *phi)
2797 record_phi_increments_1 (basis, arg_def);
2804 diff = -basis->index;
2810 diff = arg_cand->index - basis->index;
2817 /* Given phi statement PHI that hides a candidate from its BASIS, find
2821 index of the basis. */
2824 record_phi_increments (slsr_cand_t basis, gimple *phi)
2826 record_phi_increments_1 (basis, phi);
2846 /* A candidate with a basis hidden by a phi will have one
2850 has no basis), process just the initial index in case it has
2854 if (c->basis)
2855 record_phi_increments (lookup_cand (c->basis),
2875 slsr_cand_t basis = lookup_cand (c->basis);
2901 expression of the hidden basis, the difference is zero minus
2902 the index of the basis. There is no potential savings by
2907 diff = -basis->index;
2912 diff = arg_cand->index - basis->index;
2917 tree basis_lhs = gimple_assign_lhs (basis->cand_stmt);
3257 slsr_cand_t basis = lookup_cand (c->basis);
3272 diff = -basis->index;
3276 diff = arg_cand->index - basis->index;
3315 represents the required increment of C relative to its basis.
3404 && (!POINTER_TYPE_P (lookup_cand (c->basis)->cand_type)))
3480 gimple *basis_stmt = lookup_cand (c->basis)->cand_stmt;
3524 slsr_cand_t basis = lookup_cand (c->basis);
3533 /* If the basis doesn't dominate the PHI (including when the PHI is
3534 in the same block as the basis), we won't be able to create a PHI
3535 using the basis here. */
3536 basic_block basis_bb = gimple_bb (basis->cand_stmt);
3545 /* If the PHI arg resides in a block not dominated by the basis,
3546 we won't be able to create a PHI using the basis here. */
3567 increment = -basis->index;
3571 increment = arg_cand->index - basis->index;
3720 statement with an add of the basis name and the initializer. */
3744 with a subtract of the stride from the basis name, a copy
3745 from the basis name, or an add of the stride to the basis
3872 /* Look up the LHS SSA name from C's basis. This will be
3875 slsr_cand_t basis = lookup_cand (c->basis);
3876 tree basis_name = gimple_assign_lhs (basis->cand_stmt);
3879 basis after the transformation is complete. */
3884 /* Replace C with an add of the new basis phi and the
3891 slsr_cand_t basis = lookup_cand (c->basis);
3892 tree basis_name = gimple_assign_lhs (basis->cand_stmt);
3915 /* Each candidate that has a null basis and a non-null
3925 if (c->basis != 0 || c->dependent == 0)