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;
2643 new_limit.cost = best_cost.cost - op_cost;
2647 alg_in->cost.cost += op_cost;
2648 alg_in->cost.latency += op_cost;
2649 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2652 best_cost = alg_in->cost;
2663 new_limit.cost = best_cost.cost - op_cost;
2667 alg_in->cost.cost += op_cost;
2668 alg_in->cost.latency += op_cost;
2669 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2672 best_cost = alg_in->cost;
2704 equal to its cost, otherwise assume that on superscalar
2716 new_limit.cost = best_cost.cost - op_cost;
2720 alg_in->cost.cost += op_cost;
2721 alg_in->cost.latency += op_latency;
2722 if (alg_in->cost.latency < op_cost)
2723 alg_in->cost.latency = op_cost;
2724 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2727 best_cost = alg_in->cost;
2743 equal to it's cost, otherwise assume that on superscalar
2755 new_limit.cost = best_cost.cost - op_cost;
2759 alg_in->cost.cost += op_cost;
2760 alg_in->cost.latency += op_latency;
2761 if (alg_in->cost.latency < op_cost)
2762 alg_in->cost.latency = op_cost;
2763 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2766 best_cost = alg_in->cost;
2788 new_limit.cost = best_cost.cost - op_cost;
2792 alg_in->cost.cost += op_cost;
2793 alg_in->cost.latency += op_cost;
2794 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2797 best_cost = alg_in->cost;
2813 new_limit.cost = best_cost.cost - op_cost;
2817 alg_in->cost.cost += op_cost;
2818 alg_in->cost.latency += op_cost;
2819 if (CHEAPER_MULT_COST (&alg_in->cost, &best_cost))
2822 best_cost = alg_in->cost;
2844 alg_hash[hash_index].cost = *cost_limit;
2854 alg_hash[hash_index].cost.cost = best_cost.cost;
2855 alg_hash[hash_index].cost.latency = best_cost.latency;
2867 alg_out->cost = best_cost;
2882 Return true if the cheapest of these cost less than MULT_COST,
2906 limit.cost = mult_cost;
2915 if (MULT_COST_LESS (&alg->cost, mult_cost))
2917 limit.cost = alg->cost.cost - op_cost;
2918 limit.latency = alg->cost.latency - op_cost;
2922 limit.cost = mult_cost - op_cost;
2927 alg2.cost.cost += op_cost;
2928 alg2.cost.latency += op_cost;
2929 if (CHEAPER_MULT_COST (&alg2.cost, &alg->cost))
2935 if (MULT_COST_LESS (&alg->cost, mult_cost))
2937 limit.cost = alg->cost.cost - op_cost;
2938 limit.latency = alg->cost.latency - op_cost;
2942 limit.cost = mult_cost - op_cost;
2947 alg2.cost.cost += op_cost;
2948 alg2.cost.latency += op_cost;
2949 if (CHEAPER_MULT_COST (&alg2.cost, &alg->cost))
2952 return MULT_COST_LESS (&alg->cost, mult_cost);
3161 Exclude cost of op0 from max_cost to match the cost
3206 /* Exclude cost of op0 from max_cost to match the cost
3551 MAX_COST is the total allowed cost for the expanded RTL. */
3573 mode == word_mode, however all the cost calculations in
3595 alg.cost.cost + extra_cost);