Commit 6cd4575e by Richard Kenner

Add prototypes for static functions.

(struct cse_basic_block_data): Move to front of file since it constains
struct used in a prototype.
(refers_to_p, find_best_addr): Now static.

From-SVN: r3675
parent c19b0882
...@@ -513,6 +513,34 @@ struct write_data ...@@ -513,6 +513,34 @@ struct write_data
int all : 1; /* Invalidate all memory refs. */ int all : 1; /* Invalidate all memory refs. */
}; };
/* Define maximum length of a branch path. */
#define PATHLENGTH 10
/* This data describes a block that will be processed by cse_basic_block. */
struct cse_basic_block_data {
/* Lowest CUID value of insns in block. */
int low_cuid;
/* Highest CUID value of insns in block. */
int high_cuid;
/* Total number of SETs in block. */
int nsets;
/* Last insn in the block. */
rtx last;
/* Size of current branch path, if any. */
int path_size;
/* Current branch path, indicating which branches will be taken. */
struct branch_path {
/* The branch insn. */
rtx branch;
/* Whether it should be taken or not. AROUND is the same as taken
except that it is used when the destination label is not preceded
by a BARRIER. */
enum taken {TAKEN, NOT_TAKEN, AROUND} status;
} path[PATHLENGTH];
};
/* Nonzero if X has the form (PLUS frame-pointer integer). We check for /* Nonzero if X has the form (PLUS frame-pointer integer). We check for
virtual regs here because the simplify_*_operation routines are called virtual regs here because the simplify_*_operation routines are called
by integrate.c, which is called before virtual register instantiation. */ by integrate.c, which is called before virtual register instantiation. */
...@@ -550,26 +578,56 @@ struct write_data ...@@ -550,26 +578,56 @@ struct write_data
|| XEXP (X, 0) == virtual_stack_dynamic_rtx \ || XEXP (X, 0) == virtual_stack_dynamic_rtx \
|| XEXP (X, 0) == virtual_outgoing_args_rtx))) || XEXP (X, 0) == virtual_outgoing_args_rtx)))
static struct table_elt *lookup (); static void new_basic_block PROTO((void));
static void free_element (); static void make_new_qty PROTO((int));
static void make_regs_eqv PROTO((int, int));
static int insert_regs (); static void delete_reg_equiv PROTO((int));
static void rehash_using_reg (); static int mention_regs PROTO((rtx));
static void remove_invalid_refs (); static int insert_regs PROTO((rtx, struct table_elt *, int));
static int exp_equiv_p (); static void free_element PROTO((struct table_elt *));
int refers_to_p (); static void remove_from_table PROTO((struct table_elt *, int));
int refers_to_mem_p (); static struct table_elt *get_element PROTO((void));
static void invalidate_from_clobbers (); static struct table_elt *lookup PROTO((rtx, int, enum machine_mode)),
static int safe_hash (); *lookup_for_remove PROTO((rtx, int, enum machine_mode));
static int canon_hash (); static rtx lookup_as_function PROTO((rtx, enum rtx_code));
static rtx fold_rtx (); static struct table_elt *insert PROTO((rtx, struct table_elt *, int,
static rtx equiv_constant (); enum machine_mode));
static void record_jump_cond (); static void merge_equiv_classes PROTO((struct table_elt *,
static void note_mem_written (); struct table_elt *));
static int cse_rtx_addr_varies_p (); static void invalidate PROTO((rtx));
static enum rtx_code find_comparison_args (); static void remove_invalid_refs PROTO((int));
static void cse_insn (); static void rehash_using_reg PROTO((rtx));
static void cse_set_around_loop (); static void invalidate_memory PROTO((struct write_data *));
static void invalidate_for_call PROTO((void));
static rtx use_related_value PROTO((rtx, struct table_elt *));
static int canon_hash PROTO((rtx, enum machine_mode));
static int safe_hash PROTO((rtx, enum machine_mode));
static int exp_equiv_p PROTO((rtx, rtx, int, int));
static int refers_to_p PROTO((rtx, rtx));
int refers_to_mem_p PROTO((rtx, rtx, HOST_WIDE_INT,
HOST_WIDE_INT));
static int cse_rtx_addr_varies_p PROTO((rtx));
static rtx canon_reg PROTO((rtx, rtx));
static void find_best_addr PROTO((rtx, rtx *));
static enum rtx_code find_comparison_args PROTO((enum rtx_code, rtx *, rtx *,
enum machine_mode *,
enum machine_mode *));
static rtx fold_rtx PROTO((rtx, rtx));
static rtx equiv_constant PROTO((rtx));
static void record_jump_equiv PROTO((rtx, int));
static void record_jump_cond PROTO((enum rtx_code, enum machine_mode,
rtx, rtx, int));
static void cse_insn PROTO((rtx, int));
static void note_mem_written PROTO((rtx, struct write_data *));
static void invalidate_from_clobbers PROTO((struct write_data *, rtx));
static rtx cse_process_notes PROTO((rtx, rtx));
static void cse_around_loop PROTO((rtx));
static void invalidate_skipped_set PROTO((rtx, rtx));
static void invalidate_skipped_block PROTO((rtx));
static void cse_check_loop_start PROTO((rtx, rtx));
static void cse_set_around_loop PROTO((rtx, rtx, rtx));
static rtx cse_basic_block PROTO((rtx, rtx, struct branch_path *, int));
static void count_reg_usage PROTO((rtx, int *, int));
/* Return an estimate of the cost of computing rtx X. /* Return an estimate of the cost of computing rtx X.
One use is in cse, to decide which expression to keep in the hash table. One use is in cse, to decide which expression to keep in the hash table.
...@@ -2101,7 +2159,7 @@ exp_equiv_p (x, y, validate, equal_values) ...@@ -2101,7 +2159,7 @@ exp_equiv_p (x, y, validate, equal_values)
Here we do not require that X or Y be valid (for registers referred to) Here we do not require that X or Y be valid (for registers referred to)
for being in the hash table. */ for being in the hash table. */
int static int
refers_to_p (x, y) refers_to_p (x, y)
rtx x, y; rtx x, y;
{ {
...@@ -2425,7 +2483,7 @@ canon_reg (x, insn) ...@@ -2425,7 +2483,7 @@ canon_reg (x, insn)
than hard registers here because we would also prefer the pseudo registers. than hard registers here because we would also prefer the pseudo registers.
*/ */
void static void
find_best_addr (insn, loc) find_best_addr (insn, loc)
rtx insn; rtx insn;
rtx *loc; rtx *loc;
...@@ -7356,32 +7414,6 @@ cse_set_around_loop (x, insn, loop_start) ...@@ -7356,32 +7414,6 @@ cse_set_around_loop (x, insn, loop_start)
the current block. The incoming structure's branch path, if any, is used the current block. The incoming structure's branch path, if any, is used
to construct the output branch path. */ to construct the output branch path. */
/* Define maximum length of a branch path. */
#define PATHLENGTH 10
struct cse_basic_block_data {
/* Lowest CUID value of insns in block. */
int low_cuid;
/* Highest CUID value of insns in block. */
int high_cuid;
/* Total number of SETs in block. */
int nsets;
/* Last insn in the block. */
rtx last;
/* Size of current branch path, if any. */
int path_size;
/* Current branch path, indicating which branches will be taken. */
struct branch_path {
/* The branch insn. */
rtx branch;
/* Whether it should be taken or not. AROUND is the same as taken
except that it is used when the destination label is not preceded
by a BARRIER. */
enum taken {TAKEN, NOT_TAKEN, AROUND} status;
} path[PATHLENGTH];
};
void void
cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks) cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
rtx insn; rtx insn;
...@@ -7584,8 +7616,6 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks) ...@@ -7584,8 +7616,6 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
data->path[path_size].branch = 0; data->path[path_size].branch = 0;
} }
static rtx cse_basic_block ();
/* Perform cse on the instructions of a function. /* Perform cse on the instructions of a function.
F is the first instruction. F is the first instruction.
NREGS is one plus the highest pseudo-reg number used in the instruction. NREGS is one plus the highest pseudo-reg number used in the instruction.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment