diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-11-21 11:37:26 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-11-21 11:37:26 -0800 |
commit | d601d5da25d86c23d3dcb9359addcc8330e2f868 (patch) | |
tree | 0ccca13bc2282f4bc4bd12a15fc13a00ceb240bc /gcc | |
parent | e0bf6b33d8c20f0ecfa9e9e5040538170893a172 (diff) | |
download | gcc-d601d5da25d86c23d3dcb9359addcc8330e2f868.zip gcc-d601d5da25d86c23d3dcb9359addcc8330e2f868.tar.gz gcc-d601d5da25d86c23d3dcb9359addcc8330e2f868.tar.bz2 |
(reload): When decrement max_groups of superclass, can
only do so if the group_size is smaller than the current group.
From-SVN: r8539
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload1.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 2a5db92..13dd43b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1653,7 +1653,11 @@ reload (first, global, dumpfile) max_groups[class]--; p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) - max_groups[(int) *p++]--; + { + if (group_size [(int) *p] <= group_size [class]) + max_groups[(int) *p]--; + p++; + } /* Indicate both these regs are part of a group. */ SET_HARD_REG_BIT (counted_for_groups, j); @@ -1768,8 +1772,12 @@ reload (first, global, dumpfile) max_groups[class]--; p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) - max_groups[(int) *p++]--; - + { + if (group_size [(int) *p] + <= group_size [class]) + max_groups[(int) *p]--; + p++; + } break; } } @@ -2117,7 +2125,11 @@ count_possible_groups (group_size, group_mode, max_groups, class) max_groups[class]--; p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) - max_groups[(int) *p++]--; + { + if (group_size [(int) *p] <= group_size [class]) + max_groups[(int) *p]--; + p++; + } /* Don't count these registers again. */ for (j = 0; j < group_size[class]; j++) |