diff options
author | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-05 03:25:58 +0000 |
---|---|---|
committer | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-05 03:25:58 +0000 |
commit | 05cb4e5423841f6155b09dfee5bb1a032c350ee8 (patch) | |
tree | 2894c78ef237e3fda3cd660020611673b41b3420 /gcc/loop.h | |
parent | d286d8a0134485d298e6bb8d0cadc7a5354e8ca2 (diff) | |
download | gcc-05cb4e5423841f6155b09dfee5bb1a032c350ee8.tar.gz |
* loop.h (struct loop_reg): New.
(struct loop_regs): Change to use array of `struct loop_reg'.
* loop.c: Replace assortment of varrays with single regs array.
(count_one_set): Delete may_not_move array argument
and use regs array instead. All caller's changed.
(count_loop_regs_set): Delete may_not_move and single_usage
arguments and use regs array instead. All caller's changed.
(find_single_use_in_loop): Replace usage array argument with pointer
to regs structure. All caller's changed.
(loop_optimize): Delete `moved_once' array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.h')
-rw-r--r-- | gcc/loop.h | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/gcc/loop.h b/gcc/loop.h index 5b576949fbc..1bdae73d9e7 100644 --- a/gcc/loop.h +++ b/gcc/loop.h @@ -18,7 +18,6 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "varray.h" #include "bitmap.h" /* Flags passed to loop_optimize. */ @@ -236,44 +235,50 @@ typedef struct loop_mem_info } loop_mem_info; -struct loop_regs -{ - int num; - /* Indexed by register number, contains the number of times the reg - is set during the loop being scanned. - During code motion, a negative value indicates a reg that has been - made a candidate; in particular -2 means that it is an candidate that - we know is equal to a constant and -1 means that it is an candidate - not known equal to a constant. - After code motion, regs moved have 0 (which is accurate now) - while the failed candidates have the original number of times set. +struct loop_reg +{ + /* Number of times the reg is set during the loop being scanned. + During code motion, a negative value indicates a reg that has + been made a candidate; in particular -2 means that it is an + candidate that we know is equal to a constant and -1 means that + it is an candidate not known equal to a constant. After code + motion, regs moved have 0 (which is accurate now) while the + failed candidates have the original number of times set. Therefore, at all times, == 0 indicates an invariant register; < 0 a conditionally invariant one. */ - varray_type set_in_loop; + int set_in_loop; /* Original value of set_in_loop; same except that this value is not set negative for a reg whose sets have been made candidates and not set to 0 for a reg that is moved. */ - varray_type n_times_set; - - /* Index by register number, 1 indicates that the register - cannot be moved or strength reduced. */ - varray_type may_not_optimize; + int n_times_set; /* Contains the insn in which a register was used if it was used exactly once; contains const0_rtx if it was used more than once. */ - varray_type single_usage; + rtx single_usage; + + /* Nonzero indicates that the register cannot be moved or strength + reduced. */ + char may_not_optimize; /* Nonzero means reg N has already been moved out of one loop. This reduces the desire to move it out of another. */ - char *moved_once; + char moved_once; +}; + - int multiple_uses; +struct loop_regs +{ + int num; /* Number of regs used in table. */ + int size; /* Size of table. */ + struct loop_reg *array; /* Register usage info. array. */ + int multiple_uses; /* Nonzero if a reg has multiple uses. */ }; + struct loop_movables { /* Head of movable chain. */ |