From a2be868fbade644577895e847ad2fc658cb6d7d5 Mon Sep 17 00:00:00 2001 From: Michael Hayes Date: Sat, 15 Jan 2000 03:01:49 +0000 Subject: loop.c (this_loop_info): Delete. * loop.c (this_loop_info): Delete. (uid_loop): Add in place of uid_loop_num. All uses updated. (loop_number_exit_count): Delete and replace with entry in loop structure. All uses updated. (loop_number_loop_starts, loop_number_loop_ends): Likewise. (loop_number_loop_cont, loop_number_cont_dominator): Likewise. (loop_outer_loop): Likewise. (loop_invalid, loop_number_exit_labels): Likewise. (loop_used_count_register): Delete and replace with entry in loop_info structure. (find_and_verify_loops): Add loops argument. (verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start, loop_end, etc. arguments with loop structure pointer. All callers changed. (loop_reg_used_before_p, scan_loop, strength_reduce): Likewise. (check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise. (load_mems_and_recount_loop_regs_set, load_mems): Likewise. (insert_bct): Likewise. (basic_induction_var): New argument level. * loop.h (struct loop_info): Delete fields num, loops_enclosed, vtop, and cont. Add used_count_register. (uid_loop): Delete declaration. (loop_number_exit_count): Likewise. (loop_number_loop_starts, loop_number_loop_ends): Likewise. (loop_number_loop_cont, loop_number_cont_dominator): Likewise. (loop_outer_loop, loop_used_count_register): Likewise. (loop_invalid, loop_number_exit_labels): Likewise. (unroll_loop): Replace loop_start and loop_end arguments with loop structure pointer. (loop_precondition_p, loop_iterations): Likewise. Include basic-block.h. * unroll.c: (unroll_loop): Replace loop_start and loop_end arguments with loop structure pointer. (loop_precondition_p, loop_iterations): Likewise. * basic-block.h (struct loop): New entries vtop, cont, cont_dominator, start, end, top, scan_start, exit_labels, exit_count. * Makefile.in (LOOP_H): Add basic-block.h to dependencies. From-SVN: r31434 --- gcc/loop.h | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'gcc/loop.h') diff --git a/gcc/loop.h b/gcc/loop.h index 1473581..49fb408 100644 --- a/gcc/loop.h +++ b/gcc/loop.h @@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "varray.h" +#include "basic-block.h" /* Get the luid of an insn. Catch the error of trying to reference the LUID of an insn added during loop, since these don't have LUIDs. */ @@ -159,10 +160,6 @@ struct iv_class { struct loop_info { - /* Loop number. */ - int num; - /* Loops enclosed by this loop including itself. */ - int loops_enclosed; /* Nonzero if there is a subroutine call in the current loop. */ int has_call; /* Nonzero if there is a volatile memory reference in the current @@ -200,11 +197,7 @@ struct loop_info unsigned HOST_WIDE_INT n_iterations; /* The number of times the loop body was unrolled. */ unsigned int unroll_number; - /* Non-zero if the loop has a NOTE_INSN_LOOP_VTOP. */ - rtx vtop; - /* Non-zero if the loop has a NOTE_INSN_LOOP_CONT. - A continue statement will generate a branch to NEXT_INSN (cont). */ - rtx cont; + int used_count_register; }; /* Definitions used by the basic induction variable discovery code. */ @@ -215,12 +208,8 @@ enum iv_mode { UNKNOWN_INDUCT, BASIC_INDUCT, NOT_BASIC_INDUCT, extern int *uid_luid; extern int max_uid_for_loop; -extern int *uid_loop_num; -extern int *loop_outer_loop; -extern rtx *loop_number_exit_labels; -extern int *loop_number_exit_count; extern int max_reg_before_loop; - +extern struct loop **uid_loop; extern FILE *loop_dump_stream; extern varray_type reg_iv_type; @@ -243,9 +232,9 @@ rtx get_condition_for_loop PROTO((rtx)); void emit_iv_add_mult PROTO((rtx, rtx, rtx, rtx, rtx)); rtx express_from PROTO((struct induction *, struct induction *)); -void unroll_loop PROTO((rtx, int, rtx, rtx, struct loop_info *, int)); +void unroll_loop PROTO((struct loop *, int, rtx, int)); rtx biv_total_increment PROTO((struct iv_class *, rtx, rtx)); -unsigned HOST_WIDE_INT loop_iterations PROTO((rtx, rtx, struct loop_info *)); +unsigned HOST_WIDE_INT loop_iterations PROTO((struct loop *)); int precondition_loop_p PROTO((rtx, struct loop_info *, rtx *, rtx *, rtx *, enum machine_mode *mode)); @@ -261,4 +250,3 @@ int loop_insn_first_p PROTO((rtx, rtx)); /* Forward declarations for non-static functions declared in stmt.c. */ void find_loop_tree_blocks PROTO((void)); void unroll_block_trees PROTO((void)); - -- cgit v1.1