diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-07 08:52:03 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-07 08:52:03 -0400 |
commit | d546b10a8ec570dde00451c2412d65bd581751af (patch) | |
tree | c93e10fe7e50244190d4ab9d243f17b7c0deb7ac | |
parent | 0f64b8f696273bebcad25ed7294078c125811704 (diff) | |
download | gcc-d546b10a8ec570dde00451c2412d65bd581751af.zip gcc-d546b10a8ec570dde00451c2412d65bd581751af.tar.gz gcc-d546b10a8ec570dde00451c2412d65bd581751af.tar.bz2 |
(find_reg) If CLASS_CANNOT_CHANGE_SIZE, avoid its registers if
reg_changes_size.
From-SVN: r7866
-rw-r--r-- | gcc/global.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/global.c b/gcc/global.c index 3f15cbe..08a0f8a 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -923,6 +923,12 @@ find_reg (allocno, losers, alt_regs_p, accept_call_clobbered, retrying) 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. 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 @@ -1096,7 +1102,14 @@ find_reg (allocno, losers, alt_regs_p, accept_call_clobbered, retrying) if (local_reg_n_refs[regno] != 0 /* Don't use a reg no good for this pseudo. */ && ! 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 variables so as to avoid excess precision problems that occur |