Lines Matching refs:cost

1087    If a TARGET is specified and we can store in it at no extra cost,
2349 /* This structure holds the "cost" of a multiply sequence. The
2350 "cost" field holds the total rtx_cost of every operator in the
2351 synthetic multiplication sequence, hence cost(a op b) is defined
2352 as rtx_cost(op) + cost(a) + cost(b), where cost(leaf) is zero.
2361 short cost; /* Total rtx_cost of the multiplication sequence. */
2368 #define MULT_COST_LESS(X,Y) ((X)->cost < (Y) \
2369 || ((X)->cost == (Y) && (X)->latency < (Y)))
2374 lower "cost". If "cost"s are tied, the lower latency is cheaper. */
2375 #define CHEAPER_MULT_COST(X,Y) ((X)->cost < (Y)->cost \
2376 || ((X)->cost == (Y)->cost \
2381 `cost' is their total cost.
2400 struct mult_cost cost;
2422 /* The cost of multiplication if ALG_CODE is not alg_impossible.
2423 Otherwise, the cost within which multiplication by T is
2425 struct mult_cost cost;
2460 The algorithm must cost less than cost_limit
2461 If retval.cost >= COST_LIMIT, no algorithm was found and all
2482 alg_out->cost.cost = cost_limit->cost + 1;
2483 alg_out->cost.latency = cost_limit->latency + 1;
2485 if (cost_limit->cost < 0
2486 || (cost_limit->cost == 0 && cost_limit->latency <= 0))
2492 /* t == 1 can be done in zero cost. */
2496 alg_out->cost.cost = 0;
2497 alg_out->cost.latency = 0;
2502 /* t == 0 sometimes has a cost. If it does and it exceeds our limit,
2511 alg_out->cost.cost = zero_cost;
2512 alg_out->cost.latency = zero_cost;
2537 multiplication by T within alg_hash[hash_index].cost. */
2538 if (!CHEAPER_MULT_COST (&alg_hash[hash_index].cost, cost_limit))
2552 if (CHEAPER_MULT_COST (cost_limit, &alg_hash[hash_index].cost))
2554 requires more cost than COST_LIMIT. Just return. This
2597 a sequence of additions, so the observed cost is given as
2602 new_limit.cost = best_cost.cost - op_cost;
2606 alg_in->cost.cost += op_cost;
2607 alg_in->cost.latency += op_cost;
2608 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2611 best_cost = alg_in->cost;
2639 new_limit.cost = best_cost.cost - op_cost;
2643 alg_in->cost.cost += op_cost;
2644 alg_in->cost.latency += op_cost;
2645 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2648 best_cost = alg_in->cost;
2659 new_limit.cost = best_cost.cost - op_cost;
2663 alg_in->cost.cost += op_cost;
2664 alg_in->cost.latency += op_cost;
2665 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2668 best_cost = alg_in->cost;
2700 equal to its cost, otherwise assume that on superscalar
2712 new_limit.cost = best_cost.cost - op_cost;
2716 alg_in->cost.cost += op_cost;
2717 alg_in->cost.latency += op_latency;
2718 if (alg_in->cost.latency < op_cost)
2719 alg_in->cost.latency = op_cost;
2720 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2723 best_cost = alg_in->cost;
2739 equal to it's cost, otherwise assume that on superscalar
2751 new_limit.cost = best_cost.cost - op_cost;
2755 alg_in->cost.cost += op_cost;
2756 alg_in->cost.latency += op_latency;
2757 if (alg_in->cost.latency < op_cost)
2758 alg_in->cost.latency = op_cost;
2759 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2762 best_cost = alg_in->cost;
2784 new_limit.cost = best_cost.cost - op_cost;
2788 alg_in->cost.cost += op_cost;
2789 alg_in->cost.latency += op_cost;
2790 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2793 best_cost = alg_in->cost;
2809 new_limit.cost = best_cost.cost - op_cost;
2813 alg_in->cost.cost += op_cost;
2814 alg_in->cost.latency += op_cost;
2815 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2818 best_cost = alg_in->cost;
2840 alg_hash[hash_index].cost = *cost_limit;
2850 alg_hash[hash_index].cost.cost = best_cost.cost;
2851 alg_hash[hash_index].cost.latency = best_cost.latency;
2863 alg_out->cost = best_cost;
2878 Return true if the cheapest of these cost less than MULT_COST,
2902 limit.cost = mult_cost;
2911 if (MULT_COST_LESS (&alg->cost, mult_cost))
2913 limit.cost = alg->cost.cost - op_cost;
2914 limit.latency = alg->cost.latency - op_cost;
2918 limit.cost = mult_cost - op_cost;
2923 alg2.cost.cost += op_cost;
2924 alg2.cost.latency += op_cost;
2925 if (CHEAPER_MULT_COST (&alg2.cost, &alg->cost))
2931 if (MULT_COST_LESS (&alg->cost, mult_cost))
2933 limit.cost = alg->cost.cost - op_cost;
2934 limit.latency = alg->cost.latency - op_cost;
2938 limit.cost = mult_cost - op_cost;
2943 alg2.cost.cost += op_cost;
2944 alg2.cost.latency += op_cost;
2945 if (CHEAPER_MULT_COST (&alg2.cost, &alg->cost))
2948 return MULT_COST_LESS (&alg->cost, mult_cost);
3157 Exclude cost of op0 from max_cost to match the cost
3202 /* Exclude cost of op0 from max_cost to match the cost
3547 MAX_COST is the total allowed cost for the expanded RTL. */
3569 mode == word_mode, however all the cost calculations in
3591 alg.cost.cost + extra_cost);