Home | History | Annotate | Download | only in gcc

Lines Matching defs:costs

46 /* Number of elements in array `costs'.  */
49 /* The `costs' struct records the cost of using hard registers of each
52 struct costs
55 /* Costs for register classes start here. We process only some
71 /* Costs of each class for each allocno or pseudo. */
72 static struct costs *costs;
74 /* Accumulated costs of each class for each allocno. */
75 static struct costs *total_allocno_costs;
77 /* It is the current size of struct costs. */
80 /* Return pointer to structure containing costs of allocno or pseudo
82 #define COSTS(arr, num) \
83 ((struct costs *) ((char *) (arr) + (num) * struct_costs_size))
85 /* Return index in COSTS when processing reg with REGNO. */
111 /* Info about reg classes whose costs are calculated for a pseudo. */
640 /* The costs of this operand are not the same as the
641 other operand since move costs are not symmetric.
644 struct costs *pp = this_op_costs[i];
863 class is valid, compute the costs of moving the allocno
881 struct costs *pp = this_op_costs[i];
1054 /* Finally, update the costs with the information we've
1061 struct costs *pp = op_costs[i], *qq = this_op_costs[i];
1075 fprintf (ira_dump_file, " op %d(r=%u) new costs MEM:%d",
1087 fprintf (ira_dump_file, " op %d(r=%u) new costs",
1288 struct costs *pp;
1302 pp = COSTS (costs, COST_INDEX (regno));
1340 /* Calculate the costs of insn operands. */
1460 /* If we get here, we are set up to record the costs of all the
1461 operands for this insn. Start by initializing the costs. Then
1533 and initialize the register move costs of mode M.
1537 pseudo, then we may leave the register move costs uninitialized for
1585 COSTS (costs, num)->mem_cost
1599 fprintf (ira_dump_file, " Final costs after insn %u", INSN_UID (insn));
1608 /* Now add the cost for each operand to the total costs for its
1619 struct costs *p = COSTS (costs, COST_INDEX (regno));
1620 struct costs *q = op_costs[i];
1664 /* Print allocnos costs to file F. */
1688 fprintf (f, ") costs:");
1693 COSTS (costs, i)->cost[k]);
1696 fprintf (f, ",%d", COSTS (total_allocno_costs, i)->cost[k]);
1698 fprintf (f, " MEM:%i", COSTS (costs, i)->mem_cost);
1701 fprintf (f, ",%d", COSTS (total_allocno_costs, i)->mem_cost);
1706 /* Print pseudo costs to file F. */
1723 fprintf (f, " r%d costs:", regno);
1728 COSTS (costs, regno)->cost[k]);
1730 fprintf (f, " MEM:%i\n", COSTS (costs, regno)->mem_cost);
1735 costs. */
1749 costs. */
1760 /* Find costs of register classes and memory for allocnos or pseudos
1761 and their best costs. Set up preferred, alternative and allocno
1818 "\nPass %i for finding pseudo/allocno costs\n\n", pass);
1832 = sizeof (struct costs) + sizeof (int) * (max_cost_classes_num - 1);
1835 memset (costs, 0, cost_elements_num * struct_costs_size);
1844 memcpy (total_allocno_costs, costs,
1877 memcpy (temp_costs, COSTS (costs, i), struct_costs_size);
1905 /* Propagate costs to upper levels in the region
1908 a_costs = COSTS (total_allocno_costs, a_num)->cost;
1909 p_costs = COSTS (total_allocno_costs, parent_a_num)->cost;
1918 add_cost = COSTS (total_allocno_costs, a_num)->mem_cost;
1921 < COSTS (total_allocno_costs,
1923 COSTS (total_allocno_costs, parent_a_num)->mem_cost
1926 COSTS (total_allocno_costs, parent_a_num)->mem_cost
1930 COSTS (total_allocno_costs, parent_a_num)->mem_cost = 0;
1932 a_costs = COSTS (costs, a_num)->cost;
1941 add_cost = COSTS (costs, a_num)->mem_cost;
1976 stage if their costs are the same. We will make
1979 costs which might be affected by assigning hard
2062 int *total_a_costs = COSTS (total_allocno_costs, a_num)->cost;
2063 int *a_costs = COSTS (costs, a_num)->cost;
2143 costs. We can do this only after determining allocno class. If a
2145 register are already taken into account in class costs for the
2235 /* After we find hard register and memory costs for allocnos, define
2256 ALLOCNO_MEMORY_COST (a) = COSTS (costs, i)->mem_cost;
2279 reg_costs[j] = COSTS (costs, i)->cost[num];
2334 = sizeof (struct costs) + sizeof (int) * (ira_important_classes_num - 1);
2337 init_cost = (struct costs *) xmalloc (max_struct_costs_size);
2343 op_costs[i] = (struct costs *) xmalloc (max_struct_costs_size);
2344 this_op_costs[i] = (struct costs *) xmalloc (max_struct_costs_size);
2346 temp_costs = (struct costs *) xmalloc (max_struct_costs_size);
2358 costs = (struct costs *) ira_allocate (max_struct_costs_size
2377 ira_free (costs);
2381 register costs for each allocno. */
2388 total_allocno_costs = (struct costs *) ira_allocate (max_struct_costs_size
2420 /* Change hard register costs for allocnos which lives through