Lines Matching defs:class

1 /* Compute register class preferences for pseudo-registers.
152 /* For each reg class, a HARD_REG_SET saying which registers are in it. */
167 /* For each reg class, number of regs it contains. */
171 /* For each reg class, table listing all the containing classes. */
175 /* For each reg class, table listing all the classes contained in it. */
180 a largest reg class contained in their union. */
185 the smallest reg class containing their union. */
193 /* Array containing all of the register class names. */
208 /* 1 if class does contain register of given mode. */
212 /* Maximum cost of moving from a register in one class to a register in
213 another class. Based on REGISTER_MOVE_COST. */
320 /* Compute number of hard regs in each class. */
329 reg_class_subunion[I][J] gets the largest-numbered reg-class
360 reg_class_superunion[I][J] gets the smallest-numbered reg-class
380 /* Initialize the tables of subclasses and superclasses of each reg class.
405 /* Reg class I is a subclass of J.
490 /* Initialize the move cost table. Find every subset of each class
607 memory_move_secondary_cost (enum machine_mode mode, enum reg_class class, int in)
616 altclass = secondary_reload_class (in ? 1 : 0, class, mode, mem);
622 partial_cost = REGISTER_MOVE_COST (mode, altclass, class);
624 partial_cost = REGISTER_MOVE_COST (mode, class, altclass);
626 if (class == altclass)
803 /* The `costs' struct records the cost of using a hard register of each class
805 register class preferences. */
816 /* (enum reg_class) prefclass is the preferred class. May be
817 NO_REGS if no class is better than memory. */
820 /* altclass is a register class that we should use for allocating
821 pseudo if no register in the preferred class is available.
822 If no register in this class is available, memory is preferred.
825 but since it is recommended that there be a class corresponding to the
830 /* Record the cost of each class for each pseudo. */
937 int /* enum reg_class */ class;
941 for (class = 0; class < (int) N_REG_CLASSES; class++)
942 if (contains_reg_of_mode [(enum reg_class) class][PSEUDO_REGNO_MODE (i)]
945 || !forbidden_inc_dec_class[(enum reg_class) class])
948 && ! invalid_mode_change_p (i, (enum reg_class) class,
952 fprintf (dump, " %s:%i", reg_class_names[class],
953 costs[i].cost[(enum reg_class) class]);
1030 time it would save code to put a certain register in a certain class.
1183 /* ??? There are two assumptions here; that the base class does not
1194 requires secondary reloads, disallow its class from
1208 and calculates the preferred class for each pseudo-register.
1229 /* Normally we scan the insns once and determine the best class to use for
1240 /* Zero out our accumulation of the cost of each class for each reg. */
1249 save code to put a certain register in a certain class. */
1273 /* Now for each register look at how desirable each class is
1274 and find which class is preferred. Store that in
1276 class any of whose registers is better than memory. */
1292 int class;
1300 for (class = (int) ALL_REGS - 1; class > 0; class--)
1304 if (!contains_reg_of_mode [class][PSEUDO_REGNO_MODE (i)]
1306 || (in_inc_dec[i] && forbidden_inc_dec_class[class])
1309 || invalid_mode_change_p (i, (enum reg_class) class,
1314 else if (p->cost[class] < best_cost)
1316 best_cost = p->cost[class];
1317 best = (enum reg_class) class;
1319 else if (p->cost[class] == best_cost)
1320 best = reg_class_subunion[(int) best][class];
1323 /* If no register class is better than memory, use memory. */
1327 /* Record the alternate register class; i.e., a class for which
1329 class would make a smaller class (i.e., no union of just those
1330 classes exists), skip that class. The major unions of classes
1331 should be provided as a register class. Don't do this if we
1335 for (class = 0; class < N_REG_CLASSES; class++)
1336 if (p->cost[class] < p->mem_cost
1337 && (reg_class_size[(int) reg_class_subunion[(int) alt][class]]
1340 && ! (in_inc_dec[i] && forbidden_inc_dec_class[class])
1343 && ! invalid_mode_change_p (i, (enum reg_class) class,
1347 alt = reg_class_subunion[(int) alt][class];
1397 register class and calculate the cost of using that alternative. Then
1399 having the pseudo allocated to each register class and using it in that
1402 The cost of each class for this insn is its lowest cost among all the
1425 int class;
1436 /* Initially show we know nothing about the register class. */
1461 /* Copy class and whether memory is allowed from the matching
1512 for (class = 0; class < N_REG_CLASSES; class++)
1513 pp->cost[class]
1515 ? may_move_in_cost[mode][class][(int) classes[i]]
1518 ? may_move_out_cost[mode][(int) classes[i]][class]
1533 /* If we have assigned a class to this register in our
1536 appropriate class. */
1719 register preferencing. If some register class is valid, compute
1720 the costs of moving the pseudo into that class. */
1727 we did not find a suitable class.
1738 for (class = 0; class < N_REG_CLASSES; class++)
1739 pp->cost[class]
1741 ? may_move_in_cost[mode][class][(int) classes[i]]
1744 ? may_move_out_cost[mode][(int) classes[i]][class]
1759 /* If we have assigned a class to this register in our
1762 appropriate class. */
1774 the proper class, there is no cost for this alternative. */
1818 for (class = 0; class < N_REG_CLASSES; class++)
1819 pp->cost[class] = MIN (pp->cost[class],
1820 (qq->cost[class] + alt_cost) * scale);
1826 that prefers a register that is in its own register class then
1827 we may want to adjust the cost of that register class to -1.
1831 class.
1833 Also avoid the adjustment if a copy between registers of the class
1835 arbitrarily expensive). This avoids losing when the preferred class
1847 int class;
1861 for (class = 0; class < N_REG_CLASSES; class++)
1862 if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
1863 && reg_class_size[class] == (unsigned) CLASS_MAX_NREGS (class, mode))
1865 if (reg_class_size[class] == 1)
1866 op_costs[i].cost[class] = -1;
1871 if (! TEST_HARD_REG_BIT (reg_class_contents[class],
1877 op_costs[i].cost[class] = -1;
1885 TO_P is zero) a register of class CLASS in mode MODE.
1890 copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
1902 /* Get the class we will actually use for a reload. */
1903 class = PREFERRED_RELOAD_CLASS (x, class);
1911 secondary_class = targetm.secondary_reload (to_p, x, class, mode, &sri);
1914 return (move_cost[mode][(int) secondary_class][(int) class]
1922 if (MEM_P (x) || class == NO_REGS)
1923 return sri.extra_cost + MEMORY_MOVE_COST (mode, class, to_p);
1927 + move_cost[mode][(int) REGNO_REG_CLASS (REGNO (x))][(int) class]);
1954 enum reg_class class;
1957 class = INDEX_REG_CLASS;
1959 class = base_reg_class (mode, outer_code, index_code);
2015 what class the first operand must be. */
2027 of index or reg-base class, give the other the class that the
2112 pp->mem_cost += (MEMORY_MOVE_COST (Pmode, class, 1) * scale) / 2;
2115 pp->cost[i] += (may_move_in_cost[Pmode][i][(int) class] * scale) / 2;
2276 /* If {pref,alt}class have already been allocated, update the pointers to
2665 invalid_mode_change_p (unsigned int regno, enum reg_class class,
2680 if (CANNOT_CHANGE_MODE_CLASS (from, to, class))