diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-01-23 22:13:03 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-01-23 22:13:03 +0000 |
commit | 6c65d38976d67a439d5d9662b8e7b4e3237698c5 (patch) | |
tree | 234eee63b1984f8cbbab459b6e805c9f783111fc /gcc/reload1.c | |
parent | 247fb7f401e6d95aa831068cabe184f37c65cd89 (diff) | |
download | ppe42-gcc-6c65d38976d67a439d5d9662b8e7b4e3237698c5.tar.gz ppe42-gcc-6c65d38976d67a439d5d9662b8e7b4e3237698c5.zip |
(reload): After calling count_possible_groups, see if we have to proceed
with allocating a group.
(count_possible_groups): Use HARD_REG_SET, not a char array, for consistency.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 7afe7efba79..cb3db797921 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1579,6 +1579,9 @@ reload (first, global, dumpfile) to spill another group. */ count_possible_groups (group_size, group_mode, max_groups); + if (max_groups[class] <= 0) + break; + /* Groups of size 2 (the only groups used on most machines) are treated specially. */ if (group_size[class] == 2) @@ -1976,27 +1979,30 @@ count_possible_groups (group_size, group_mode, max_groups) for (i = 0; i < N_REG_CLASSES; i++) if (group_size[i] > 1) { - char regmask[FIRST_PSEUDO_REGISTER]; + HARD_REG_SET new; int j; - bzero (regmask, sizeof regmask); + CLEAR_HARD_REG_SET (new); + /* Make a mask of all the regs that are spill regs in class I. */ for (j = 0; j < n_spills; j++) if (TEST_HARD_REG_BIT (reg_class_contents[i], spill_regs[j]) && ! TEST_HARD_REG_BIT (counted_for_groups, spill_regs[j]) && ! TEST_HARD_REG_BIT (counted_for_nongroups, spill_regs[j])) - regmask[spill_regs[j]] = 1; + SET_HARD_REG_BIT (new, spill_regs[j]); + /* Find each consecutive group of them. */ for (j = 0; j < FIRST_PSEUDO_REGISTER && max_groups[i] > 0; j++) - if (regmask[j] && j + group_size[i] <= FIRST_PSEUDO_REGISTER + if (TEST_HARD_REG_BIT (new, j) + && j + group_size[i] <= FIRST_PSEUDO_REGISTER /* Next line in case group-mode for this class demands an even-odd pair. */ && HARD_REGNO_MODE_OK (j, group_mode[i])) { int k; for (k = 1; k < group_size[i]; k++) - if (! regmask[j + k]) + if (! TEST_HARD_REG_BIT (new, j + k)) break; if (k == group_size[i]) { |