Commit d546b10a by Richard Kenner

(find_reg) If CLASS_CANNOT_CHANGE_SIZE, avoid its registers if

reg_changes_size.

From-SVN: r7866
parent 0f64b8f6
...@@ -923,6 +923,12 @@ find_reg (allocno, losers, alt_regs_p, accept_call_clobbered, retrying) ...@@ -923,6 +923,12 @@ find_reg (allocno, losers, alt_regs_p, accept_call_clobbered, retrying)
IOR_HARD_REG_SET (used1, hard_reg_conflicts[allocno]); IOR_HARD_REG_SET (used1, hard_reg_conflicts[allocno]);
#ifdef CLASS_CANNOT_CHANGE_SIZE
if (reg_changes_size[allocno_reg[allocno]])
IOR_HARD_REG_SET (used1,
reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE]);
#endif
/* Try each hard reg to see if it fits. Do this in two passes. /* Try each hard reg to see if it fits. Do this in two passes.
In the first pass, skip registers that are preferred by some other pseudo In the first pass, skip registers that are preferred by some other pseudo
to give it a better chance of getting one of those registers. Only if to give it a better chance of getting one of those registers. Only if
...@@ -1096,7 +1102,14 @@ find_reg (allocno, losers, alt_regs_p, accept_call_clobbered, retrying) ...@@ -1096,7 +1102,14 @@ find_reg (allocno, losers, alt_regs_p, accept_call_clobbered, retrying)
if (local_reg_n_refs[regno] != 0 if (local_reg_n_refs[regno] != 0
/* Don't use a reg no good for this pseudo. */ /* Don't use a reg no good for this pseudo. */
&& ! TEST_HARD_REG_BIT (used2, regno) && ! TEST_HARD_REG_BIT (used2, regno)
&& HARD_REGNO_MODE_OK (regno, mode)) && HARD_REGNO_MODE_OK (regno, mode)
#ifdef CLASS_CANNOT_CHANGE_SIZE
&& ! (reg_changes_size[allocno_reg[allocno]]
&& (TEST_HARD_REG_BIT
(reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
regno)))
#endif
)
{ {
/* We explicitly evaluate the divide results into temporary /* We explicitly evaluate the divide results into temporary
variables so as to avoid excess precision problems that occur variables so as to avoid excess precision problems that occur
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment