cse.c: Convert prototypes to ISO C90.

* cse.c: Convert prototypes to ISO C90.
	* cselib.c: Likewise.
	* cselib.h: Likewise.
	* dbxout.c: Likewise.
	* debug.c: Likewise.
	* df.c: Likewise.
	* df.h: Likewise.
	* dojump.c: Likewise.
	* doloop.c: Likewise.
	* dominance.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarf2out.h: Likewise.
	* dwarfout.c: Likewise.

From-SVN: r68673
This commit is contained in:
Andreas Jaeger 2003-06-29 17:19:13 +02:00 committed by Andreas Jaeger
parent f9da506452
commit 7080f73594
15 changed files with 1599 additions and 2845 deletions

View File

@ -1,3 +1,20 @@
2003-06-29 Andreas Jaeger <aj@suse.de>
* cse.c: Convert prototypes to ISO C90.
* cselib.c: Likewise.
* cselib.h: Likewise.
* dbxout.c: Likewise.
* debug.c: Likewise.
* df.c: Likewise.
* df.h: Likewise.
* dojump.c: Likewise.
* doloop.c: Likewise.
* dominance.c: Likewise.
* dwarf2asm.c: Likewise.
* dwarf2out.c: Likewise.
* dwarf2out.h: Likewise.
* dwarfout.c: Likewise.
2003-06-29 Kazu Hirata <kazu@cs.umass.edu>
* alloc-pool.c: Fix comment formatting.

392
gcc/cse.c
View File

@ -503,9 +503,9 @@ struct table_elt
a cost of 2. Aside from these special cases, call `rtx_cost'. */
#define CHEAP_REGNO(N) \
((N) == FRAME_POINTER_REGNUM || (N) == HARD_FRAME_POINTER_REGNUM \
|| (N) == STACK_POINTER_REGNUM || (N) == ARG_POINTER_REGNUM \
|| ((N) >= FIRST_VIRTUAL_REGISTER && (N) <= LAST_VIRTUAL_REGISTER) \
((N) == FRAME_POINTER_REGNUM || (N) == HARD_FRAME_POINTER_REGNUM \
|| (N) == STACK_POINTER_REGNUM || (N) == ARG_POINTER_REGNUM \
|| ((N) >= FIRST_VIRTUAL_REGISTER && (N) <= LAST_VIRTUAL_REGISTER) \
|| ((N) < FIRST_PSEUDO_REGISTER \
&& FIXED_REGNO_P (N) && REGNO_REG_CLASS (N) != NO_REGS))
@ -514,7 +514,7 @@ struct table_elt
/* Get the info associated with register N. */
#define GET_CSE_REG_INFO(N) \
#define GET_CSE_REG_INFO(N) \
(((N) == cached_regno && cached_cse_reg_info) \
? cached_cse_reg_info : get_cse_reg_info ((N)))
@ -596,76 +596,74 @@ struct cse_basic_block_data
} *path;
};
static bool fixed_base_plus_p PARAMS ((rtx x));
static int notreg_cost PARAMS ((rtx, enum rtx_code));
static int approx_reg_cost_1 PARAMS ((rtx *, void *));
static int approx_reg_cost PARAMS ((rtx));
static int preferrable PARAMS ((int, int, int, int));
static void new_basic_block PARAMS ((void));
static void make_new_qty PARAMS ((unsigned int, enum machine_mode));
static void make_regs_eqv PARAMS ((unsigned int, unsigned int));
static void delete_reg_equiv PARAMS ((unsigned int));
static int mention_regs PARAMS ((rtx));
static int insert_regs PARAMS ((rtx, struct table_elt *, int));
static void remove_from_table PARAMS ((struct table_elt *, unsigned));
static struct table_elt *lookup PARAMS ((rtx, unsigned, enum machine_mode)),
*lookup_for_remove PARAMS ((rtx, unsigned, enum machine_mode));
static rtx lookup_as_function PARAMS ((rtx, enum rtx_code));
static struct table_elt *insert PARAMS ((rtx, struct table_elt *, unsigned,
enum machine_mode));
static void merge_equiv_classes PARAMS ((struct table_elt *,
struct table_elt *));
static void invalidate PARAMS ((rtx, enum machine_mode));
static int cse_rtx_varies_p PARAMS ((rtx, int));
static void remove_invalid_refs PARAMS ((unsigned int));
static void remove_invalid_subreg_refs PARAMS ((unsigned int, unsigned int,
enum machine_mode));
static void rehash_using_reg PARAMS ((rtx));
static void invalidate_memory PARAMS ((void));
static void invalidate_for_call PARAMS ((void));
static rtx use_related_value PARAMS ((rtx, struct table_elt *));
static unsigned canon_hash PARAMS ((rtx, enum machine_mode));
static unsigned canon_hash_string PARAMS ((const char *));
static unsigned safe_hash PARAMS ((rtx, enum machine_mode));
static int exp_equiv_p PARAMS ((rtx, rtx, int, int));
static rtx canon_reg PARAMS ((rtx, rtx));
static void find_best_addr PARAMS ((rtx, rtx *, enum machine_mode));
static enum rtx_code find_comparison_args PARAMS ((enum rtx_code, rtx *, rtx *,
enum machine_mode *,
enum machine_mode *));
static rtx fold_rtx PARAMS ((rtx, rtx));
static rtx equiv_constant PARAMS ((rtx));
static void record_jump_equiv PARAMS ((rtx, int));
static void record_jump_cond PARAMS ((enum rtx_code, enum machine_mode,
rtx, rtx, int));
static void cse_insn PARAMS ((rtx, rtx));
static int addr_affects_sp_p PARAMS ((rtx));
static void invalidate_from_clobbers PARAMS ((rtx));
static rtx cse_process_notes PARAMS ((rtx, rtx));
static void cse_around_loop PARAMS ((rtx));
static void invalidate_skipped_set PARAMS ((rtx, rtx, void *));
static void invalidate_skipped_block PARAMS ((rtx));
static void cse_check_loop_start PARAMS ((rtx, rtx, void *));
static void cse_set_around_loop PARAMS ((rtx, rtx, rtx));
static rtx cse_basic_block PARAMS ((rtx, rtx, struct branch_path *, int));
static void count_reg_usage PARAMS ((rtx, int *, rtx, int));
static int check_for_label_ref PARAMS ((rtx *, void *));
extern void dump_class PARAMS ((struct table_elt*));
static struct cse_reg_info * get_cse_reg_info PARAMS ((unsigned int));
static int check_dependence PARAMS ((rtx *, void *));
static bool fixed_base_plus_p (rtx x);
static int notreg_cost (rtx, enum rtx_code);
static int approx_reg_cost_1 (rtx *, void *);
static int approx_reg_cost (rtx);
static int preferrable (int, int, int, int);
static void new_basic_block (void);
static void make_new_qty (unsigned int, enum machine_mode);
static void make_regs_eqv (unsigned int, unsigned int);
static void delete_reg_equiv (unsigned int);
static int mention_regs (rtx);
static int insert_regs (rtx, struct table_elt *, int);
static void remove_from_table (struct table_elt *, unsigned);
static struct table_elt *lookup (rtx, unsigned, enum machine_mode);
static struct table_elt *lookup_for_remove (rtx, unsigned, enum machine_mode);
static rtx lookup_as_function (rtx, enum rtx_code);
static struct table_elt *insert (rtx, struct table_elt *, unsigned,
enum machine_mode);
static void merge_equiv_classes (struct table_elt *, struct table_elt *);
static void invalidate (rtx, enum machine_mode);
static int cse_rtx_varies_p (rtx, int);
static void remove_invalid_refs (unsigned int);
static void remove_invalid_subreg_refs (unsigned int, unsigned int,
enum machine_mode);
static void rehash_using_reg (rtx);
static void invalidate_memory (void);
static void invalidate_for_call (void);
static rtx use_related_value (rtx, struct table_elt *);
static unsigned canon_hash (rtx, enum machine_mode);
static unsigned canon_hash_string (const char *);
static unsigned safe_hash (rtx, enum machine_mode);
static int exp_equiv_p (rtx, rtx, int, int);
static rtx canon_reg (rtx, rtx);
static void find_best_addr (rtx, rtx *, enum machine_mode);
static enum rtx_code find_comparison_args (enum rtx_code, rtx *, rtx *,
enum machine_mode *,
enum machine_mode *);
static rtx fold_rtx (rtx, rtx);
static rtx equiv_constant (rtx);
static void record_jump_equiv (rtx, int);
static void record_jump_cond (enum rtx_code, enum machine_mode, rtx, rtx,
int);
static void cse_insn (rtx, rtx);
static int addr_affects_sp_p (rtx);
static void invalidate_from_clobbers (rtx);
static rtx cse_process_notes (rtx, rtx);
static void cse_around_loop (rtx);
static void invalidate_skipped_set (rtx, rtx, void *);
static void invalidate_skipped_block (rtx);
static void cse_check_loop_start (rtx, rtx, void *);
static void cse_set_around_loop (rtx, rtx, rtx);
static rtx cse_basic_block (rtx, rtx, struct branch_path *, int);
static void count_reg_usage (rtx, int *, rtx, int);
static int check_for_label_ref (rtx *, void *);
extern void dump_class (struct table_elt*);
static struct cse_reg_info * get_cse_reg_info (unsigned int);
static int check_dependence (rtx *, void *);
static void flush_hash_table PARAMS ((void));
static bool insn_live_p PARAMS ((rtx, int *));
static bool set_live_p PARAMS ((rtx, rtx, int *));
static bool dead_libcall_p PARAMS ((rtx, int *));
static void flush_hash_table (void);
static bool insn_live_p (rtx, int *);
static bool set_live_p (rtx, rtx, int *);
static bool dead_libcall_p (rtx, int *);
/* Nonzero if X has the form (PLUS frame-pointer integer). We check for
virtual regs here because the simplify_*_operation routines are called
by integrate.c, which is called before virtual register instantiation. */
static bool
fixed_base_plus_p (x)
rtx x;
fixed_base_plus_p (rtx x)
{
switch (GET_CODE (x))
{
@ -695,8 +693,7 @@ fixed_base_plus_p (x)
/* Dump the expressions in the equivalence class indicated by CLASSP.
This function is used only for debugging. */
void
dump_class (classp)
struct table_elt *classp;
dump_class (struct table_elt *classp)
{
struct table_elt *elt;
@ -714,9 +711,7 @@ dump_class (classp)
/* Subroutine of approx_reg_cost; called through for_each_rtx. */
static int
approx_reg_cost_1 (xp, data)
rtx *xp;
void *data;
approx_reg_cost_1 (rtx *xp, void *data)
{
rtx x = *xp;
int *cost_p = data;
@ -747,8 +742,7 @@ approx_reg_cost_1 (xp, data)
0. If any other hard register reference occurs, return MAX_COST. */
static int
approx_reg_cost (x)
rtx x;
approx_reg_cost (rtx x)
{
int cost = 0;
@ -763,8 +757,7 @@ approx_reg_cost (x)
Return a positive value if A is less desirable, or 0 if the two are
equally good. */
static int
preferrable (cost_a, regcost_a, cost_b, regcost_b)
int cost_a, regcost_a, cost_b, regcost_b;
preferrable (int cost_a, int regcost_a, int cost_b, int regcost_b)
{
/* First, get rid of cases involving expressions that are entirely
unwanted. */
@ -798,9 +791,7 @@ preferrable (cost_a, regcost_a, cost_b, regcost_b)
from COST macro to keep it simple. */
static int
notreg_cost (x, outer)
rtx x;
enum rtx_code outer;
notreg_cost (rtx x, enum rtx_code outer)
{
return ((GET_CODE (x) == SUBREG
&& GET_CODE (SUBREG_REG (x)) == REG
@ -821,9 +812,7 @@ notreg_cost (x, outer)
Other uses like the latter are expected in the future. */
int
rtx_cost (x, outer_code)
rtx x;
enum rtx_code outer_code ATTRIBUTE_UNUSED;
rtx_cost (rtx x, enum rtx_code outer_code ATTRIBUTE_UNUSED)
{
int i, j;
enum rtx_code code;
@ -893,9 +882,7 @@ rtx_cost (x, outer_code)
Expect that X is properly formed address reference. */
int
address_cost (x, mode)
rtx x;
enum machine_mode mode;
address_cost (rtx x, enum machine_mode mode)
{
/* The address_cost target hook does not deal with ADDRESSOF nodes. But,
during CSE, such nodes are present. Using an ADDRESSOF node which
@ -918,15 +905,13 @@ address_cost (x, mode)
/* If the target doesn't override, compute the cost as with arithmetic. */
int
default_address_cost (x)
rtx x;
default_address_cost (rtx x)
{
return rtx_cost (x, MEM);
}
static struct cse_reg_info *
get_cse_reg_info (regno)
unsigned int regno;
get_cse_reg_info (unsigned int regno)
{
struct cse_reg_info **hash_head = &reg_hash[REGHASH_FN (regno)];
struct cse_reg_info *p;
@ -974,7 +959,7 @@ get_cse_reg_info (regno)
for a new basic block. */
static void
new_basic_block ()
new_basic_block (void)
{
int i;
@ -1029,9 +1014,7 @@ new_basic_block ()
register before and initialize that quantity. */
static void
make_new_qty (reg, mode)
unsigned int reg;
enum machine_mode mode;
make_new_qty (unsigned int reg, enum machine_mode mode)
{
int q;
struct qty_table_elem *ent;
@ -1056,8 +1039,7 @@ make_new_qty (reg, mode)
OLD is not changing; NEW is. */
static void
make_regs_eqv (new, old)
unsigned int new, old;
make_regs_eqv (unsigned int new, unsigned int old)
{
unsigned int lastr, firstr;
int q = REG_QTY (old);
@ -1120,8 +1102,7 @@ make_regs_eqv (new, old)
/* Remove REG from its equivalence class. */
static void
delete_reg_equiv (reg)
unsigned int reg;
delete_reg_equiv (unsigned int reg)
{
struct qty_table_elem *ent;
int q = REG_QTY (reg);
@ -1161,8 +1142,7 @@ delete_reg_equiv (reg)
of X. */
static int
mention_regs (x)
rtx x;
mention_regs (rtx x)
{
enum rtx_code code;
int i, j;
@ -1271,10 +1251,7 @@ mention_regs (x)
so X's hash code may be different. */
static int
insert_regs (x, classp, modified)
rtx x;
struct table_elt *classp;
int modified;
insert_regs (rtx x, struct table_elt *classp, int modified)
{
if (GET_CODE (x) == REG)
{
@ -1351,9 +1328,7 @@ insert_regs (x, classp, modified)
and we save much time not recomputing it. */
static void
remove_from_table (elt, hash)
struct table_elt *elt;
unsigned hash;
remove_from_table (struct table_elt *elt, unsigned int hash)
{
if (elt == 0)
return;
@ -1436,10 +1411,7 @@ remove_from_table (elt, hash)
looks like X. */
static struct table_elt *
lookup (x, hash, mode)
rtx x;
unsigned hash;
enum machine_mode mode;
lookup (rtx x, unsigned int hash, enum machine_mode mode)
{
struct table_elt *p;
@ -1455,10 +1427,7 @@ lookup (x, hash, mode)
Also ignore discrepancies in the machine mode of a register. */
static struct table_elt *
lookup_for_remove (x, hash, mode)
rtx x;
unsigned hash;
enum machine_mode mode;
lookup_for_remove (rtx x, unsigned int hash, enum machine_mode mode)
{
struct table_elt *p;
@ -1487,9 +1456,7 @@ lookup_for_remove (x, hash, mode)
If one is found, return that expression. */
static rtx
lookup_as_function (x, code)
rtx x;
enum rtx_code code;
lookup_as_function (rtx x, enum rtx_code code)
{
struct table_elt *p
= lookup (x, safe_hash (x, VOIDmode) & HASH_MASK, GET_MODE (x));
@ -1545,11 +1512,7 @@ lookup_as_function (x, code)
(preferrable ((X)->cost, (X)->regcost, (Y)->cost, (Y)->regcost) < 0)
static struct table_elt *
insert (x, classp, hash, mode)
rtx x;
struct table_elt *classp;
unsigned hash;
enum machine_mode mode;
insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mode)
{
struct table_elt *elt;
@ -1735,8 +1698,7 @@ insert (x, classp, hash, mode)
Any invalid entries in CLASS2 will not be copied. */
static void
merge_equiv_classes (class1, class2)
struct table_elt *class1, *class2;
merge_equiv_classes (struct table_elt *class1, struct table_elt *class2)
{
struct table_elt *elt, *next, *new;
@ -1783,7 +1745,7 @@ merge_equiv_classes (class1, class2)
/* Flush the entire hash table. */
static void
flush_hash_table ()
flush_hash_table (void)
{
int i;
struct table_elt *p;
@ -1808,9 +1770,7 @@ struct check_dependence_data
};
static int
check_dependence (x, data)
rtx *x;
void *data;
check_dependence (rtx *x, void *data)
{
struct check_dependence_data *d = (struct check_dependence_data *) data;
if (*x && GET_CODE (*x) == MEM)
@ -1832,9 +1792,7 @@ check_dependence (x, data)
or it may be either of those plus a numeric offset. */
static void
invalidate (x, full_mode)
rtx x;
enum machine_mode full_mode;
invalidate (rtx x, enum machine_mode full_mode)
{
int i;
struct table_elt *p;
@ -1974,8 +1932,7 @@ invalidate (x, full_mode)
expressions to reappear as valid. */
static void
remove_invalid_refs (regno)
unsigned int regno;
remove_invalid_refs (unsigned int regno)
{
unsigned int i;
struct table_elt *p, *next;
@ -1993,10 +1950,8 @@ remove_invalid_refs (regno)
/* Likewise for a subreg with subreg_reg REGNO, subreg_byte OFFSET,
and mode MODE. */
static void
remove_invalid_subreg_refs (regno, offset, mode)
unsigned int regno;
unsigned int offset;
enum machine_mode mode;
remove_invalid_subreg_refs (unsigned int regno, unsigned int offset,
enum machine_mode mode)
{
unsigned int i;
struct table_elt *p, *next;
@ -2026,8 +1981,7 @@ remove_invalid_subreg_refs (regno, offset, mode)
This is called when we make a jump equivalence. */
static void
rehash_using_reg (x)
rtx x;
rehash_using_reg (rtx x)
{
unsigned int i;
struct table_elt *p, *next;
@ -2077,7 +2031,7 @@ rehash_using_reg (x)
register. Also update their TICK values. */
static void
invalidate_for_call ()
invalidate_for_call (void)
{
unsigned int regno, endregno;
unsigned int i;
@ -2136,9 +2090,7 @@ invalidate_for_call ()
If none can be found, return 0. */
static rtx
use_related_value (x, elt)
rtx x;
struct table_elt *elt;
use_related_value (rtx x, struct table_elt *elt)
{
struct table_elt *relt = 0;
struct table_elt *p, *q;
@ -2206,8 +2158,7 @@ use_related_value (x, elt)
/* Hash a string. Just add its bytes up. */
static inline unsigned
canon_hash_string (ps)
const char *ps;
canon_hash_string (const char *ps)
{
unsigned hash = 0;
const unsigned char *p = (const unsigned char *) ps;
@ -2233,9 +2184,7 @@ canon_hash_string (ps)
is just (int) MEM plus the hash code of the address. */
static unsigned
canon_hash (x, mode)
rtx x;
enum machine_mode mode;
canon_hash (rtx x, enum machine_mode mode)
{
int i, j;
unsigned hash = 0;
@ -2287,7 +2236,7 @@ canon_hash (x, mode)
record = false;
else
record = true;
if (!record)
{
do_not_record = 1;
@ -2487,9 +2436,7 @@ canon_hash (x, mode)
/* Like canon_hash but with no side effects. */
static unsigned
safe_hash (x, mode)
rtx x;
enum machine_mode mode;
safe_hash (rtx x, enum machine_mode mode)
{
int save_do_not_record = do_not_record;
int save_hash_arg_in_memory = hash_arg_in_memory;
@ -2515,10 +2462,7 @@ safe_hash (x, mode)
is the same as that of the given value is pure luck. */
static int
exp_equiv_p (x, y, validate, equal_values)
rtx x, y;
int validate;
int equal_values;
exp_equiv_p (rtx x, rtx y, int validate, int equal_values)
{
int i, j;
enum rtx_code code;
@ -2710,9 +2654,7 @@ exp_equiv_p (x, y, validate, equal_values)
against certain constants or near-constants. */
static int
cse_rtx_varies_p (x, from_alias)
rtx x;
int from_alias;
cse_rtx_varies_p (rtx x, int from_alias)
{
/* We need not check for X and the equivalence class being of the same
mode because if X is equivalent to a constant in some mode, it
@ -2780,9 +2722,7 @@ cse_rtx_varies_p (x, from_alias)
generally be discarded since the changes we are making are optional. */
static rtx
canon_reg (x, insn)
rtx x;
rtx insn;
canon_reg (rtx x, rtx insn)
{
int i;
enum rtx_code code;
@ -2879,10 +2819,7 @@ canon_reg (x, insn)
hard registers here because we would also prefer the pseudo registers. */
static void
find_best_addr (insn, loc, mode)
rtx insn;
rtx *loc;
enum machine_mode mode;
find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
{
struct table_elt *elt;
rtx addr = *loc;
@ -3095,10 +3032,8 @@ find_best_addr (insn, loc, mode)
A or the code corresponding to the inverse of the comparison. */
static enum rtx_code
find_comparison_args (code, parg1, parg2, pmode1, pmode2)
enum rtx_code code;
rtx *parg1, *parg2;
enum machine_mode *pmode1, *pmode2;
find_comparison_args (enum rtx_code code, rtx *parg1, rtx *parg2,
enum machine_mode *pmode1, enum machine_mode *pmode2)
{
rtx arg1, arg2;
@ -3293,9 +3228,7 @@ find_comparison_args (code, parg1, parg2, pmode1, pmode2)
of X before modifying it. */
static rtx
fold_rtx (x, insn)
rtx x;
rtx insn;
fold_rtx (rtx x, rtx insn)
{
enum rtx_code code;
enum machine_mode mode;
@ -3851,8 +3784,8 @@ fold_rtx (x, insn)
|| code == UNORDERED)
{
if (must_swap || (const_arg0
&& (const_arg1 == 0
|| (GET_CODE (const_arg0) == CONST_INT
&& (const_arg1 == 0
|| (GET_CODE (const_arg0) == CONST_INT
&& GET_CODE (const_arg1) != CONST_INT))))
{
rtx tem = XEXP (x, 0);
@ -4323,8 +4256,7 @@ fold_rtx (x, insn)
Return 0 if we don't know one. */
static rtx
equiv_constant (x)
rtx x;
equiv_constant (rtx x)
{
if (GET_CODE (x) == REG
&& REGNO_QTY_VALID_P (REGNO (x)))
@ -4374,9 +4306,7 @@ equiv_constant (x)
This is similar to gen_lowpart in emit-rtl.c. */
rtx
gen_lowpart_if_possible (mode, x)
enum machine_mode mode;
rtx x;
gen_lowpart_if_possible (enum machine_mode mode, rtx x)
{
rtx result = gen_lowpart_common (mode, x);
@ -4412,16 +4342,14 @@ gen_lowpart_if_possible (mode, x)
In certain cases, this can cause us to add an equivalence. For example,
if we are following the taken case of
if (i == 2)
if (i == 2)
we can add the fact that `i' and '2' are now equivalent.
In any case, we can record that this comparison was passed. If the same
comparison is seen later, we will know its value. */
static void
record_jump_equiv (insn, taken)
rtx insn;
int taken;
record_jump_equiv (rtx insn, int taken)
{
int cond_known_true;
rtx op0, op1;
@ -4472,11 +4400,8 @@ record_jump_equiv (insn, taken)
above function and called recursively. */
static void
record_jump_cond (code, mode, op0, op1, reversed_nonequality)
enum rtx_code code;
enum machine_mode mode;
rtx op0, op1;
int reversed_nonequality;
record_jump_cond (enum rtx_code code, enum machine_mode mode, rtx op0,
rtx op1, int reversed_nonequality)
{
unsigned op0_hash, op1_hash;
int op0_in_memory, op1_in_memory;
@ -4727,9 +4652,7 @@ struct set
};
static void
cse_insn (insn, libcall_insn)
rtx insn;
rtx libcall_insn;
cse_insn (rtx insn, rtx libcall_insn)
{
rtx x = PATTERN (insn);
int i;
@ -6288,7 +6211,7 @@ cse_insn (insn, libcall_insn)
}
while (prev && GET_CODE (prev) == NOTE
&& NOTE_LINE_NUMBER (prev) != NOTE_INSN_BASIC_BLOCK);
/* Do not swap the registers around if the previous instruction
attaches a REG_EQUIV note to REG1.
@ -6370,7 +6293,7 @@ cse_insn (insn, libcall_insn)
/* Remove from the hash table all expressions that reference memory. */
static void
invalidate_memory ()
invalidate_memory (void)
{
int i;
struct table_elt *p, *next;
@ -6388,8 +6311,7 @@ invalidate_memory ()
1 and update the register tables to show the effect. Else, return 0. */
static int
addr_affects_sp_p (addr)
rtx addr;
addr_affects_sp_p (rtx addr)
{
if (GET_RTX_CLASS (GET_CODE (addr)) == 'a'
&& GET_CODE (XEXP (addr, 0)) == REG
@ -6420,8 +6342,7 @@ addr_affects_sp_p (addr)
X is the pattern of the insn. */
static void
invalidate_from_clobbers (x)
rtx x;
invalidate_from_clobbers (rtx x)
{
if (GET_CODE (x) == CLOBBER)
{
@ -6466,9 +6387,7 @@ invalidate_from_clobbers (x)
Return the replacement for X. */
static rtx
cse_process_notes (x, object)
rtx x;
rtx object;
cse_process_notes (rtx x, rtx object)
{
enum rtx_code code = GET_CODE (x);
const char *fmt = GET_RTX_FORMAT (code);
@ -6560,8 +6479,7 @@ cse_process_notes (x, object)
jumps to a label used only once. */
static void
cse_around_loop (loop_start)
rtx loop_start;
cse_around_loop (rtx loop_start)
{
rtx insn;
int i;
@ -6632,10 +6550,7 @@ cse_around_loop (loop_start)
since they are done elsewhere. This function is called via note_stores. */
static void
invalidate_skipped_set (dest, set, data)
rtx set;
rtx dest;
void *data ATTRIBUTE_UNUSED;
invalidate_skipped_set (rtx dest, rtx set, void *data ATTRIBUTE_UNUSED)
{
enum rtx_code code = GET_CODE (dest);
@ -6669,8 +6584,7 @@ invalidate_skipped_set (dest, set, data)
conditionally executed. */
static void
invalidate_skipped_block (start)
rtx start;
invalidate_skipped_block (rtx start)
{
rtx insn;
@ -6697,10 +6611,7 @@ invalidate_skipped_block (start)
NULL_RTX. */
static void
cse_check_loop_start (x, set, data)
rtx x;
rtx set ATTRIBUTE_UNUSED;
void *data;
cse_check_loop_start (rtx x, rtx set ATTRIBUTE_UNUSED, void *data)
{
rtx *cse_check_loop_start_value = (rtx *) data;
@ -6731,10 +6642,7 @@ cse_check_loop_start (x, set, data)
In any event, we invalidate whatever this SET or CLOBBER modifies. */
static void
cse_set_around_loop (x, insn, loop_start)
rtx x;
rtx insn;
rtx loop_start;
cse_set_around_loop (rtx x, rtx insn, rtx loop_start)
{
struct table_elt *src_elt;
@ -6841,12 +6749,8 @@ cse_set_around_loop (x, insn, loop_start)
to construct the output branch path. */
void
cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
rtx insn;
struct cse_basic_block_data *data;
int follow_jumps;
int after_loop;
int skip_blocks;
cse_end_of_basic_block (rtx insn, struct cse_basic_block_data *data,
int follow_jumps, int after_loop, int skip_blocks)
{
rtx p = insn, q;
int nsets = 0;
@ -7063,11 +6967,7 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
in conditional jump instructions. */
int
cse_main (f, nregs, after_loop, file)
rtx f;
int nregs;
int after_loop;
FILE *file;
cse_main (rtx f, int nregs, int after_loop, FILE *file)
{
struct cse_basic_block_data val;
rtx insn = f;
@ -7213,10 +7113,8 @@ cse_main (f, nregs, after_loop, file)
block and this CSE pass is before loop.c. */
static rtx
cse_basic_block (from, to, next_branch, around_loop)
rtx from, to;
struct branch_path *next_branch;
int around_loop;
cse_basic_block (rtx from, rtx to, struct branch_path *next_branch,
int around_loop)
{
rtx insn;
int to_usage = 0;
@ -7429,9 +7327,7 @@ cse_basic_block (from, to, next_branch, around_loop)
there isn't a REG_LABEL note. Return one if so. DATA is the insn. */
static int
check_for_label_ref (rtl, data)
rtx *rtl;
void *data;
check_for_label_ref (rtx *rtl, void *data)
{
rtx insn = (rtx) data;
@ -7455,11 +7351,7 @@ check_for_label_ref (rtl, data)
modify the liveness of DEST. */
static void
count_reg_usage (x, counts, dest, incr)
rtx x;
int *counts;
rtx dest;
int incr;
count_reg_usage (rtx x, int *counts, rtx dest, int incr)
{
enum rtx_code code;
rtx note;
@ -7563,10 +7455,8 @@ count_reg_usage (x, counts, dest, incr)
/* Return true if set is live. */
static bool
set_live_p (set, insn, counts)
rtx set;
rtx insn ATTRIBUTE_UNUSED; /* Only used with HAVE_cc0. */
int *counts;
set_live_p (rtx set, rtx insn ATTRIBUTE_UNUSED, /* Only used with HAVE_cc0. */
int *counts)
{
#ifdef HAVE_cc0
rtx tem;
@ -7599,9 +7489,7 @@ set_live_p (set, insn, counts)
/* Return true if insn is live. */
static bool
insn_live_p (insn, counts)
rtx insn;
int *counts;
insn_live_p (rtx insn, int *counts)
{
int i;
if (flag_non_call_exceptions && may_trap_p (PATTERN (insn)))
@ -7631,9 +7519,7 @@ insn_live_p (insn, counts)
/* Return true if libcall is dead as a whole. */
static bool
dead_libcall_p (insn, counts)
rtx insn;
int *counts;
dead_libcall_p (rtx insn, int *counts)
{
rtx note, set, new;
@ -7676,7 +7562,7 @@ dead_libcall_p (insn, counts)
return true;
}
}
count_reg_usage (insn, counts, NULL_RTX, 1);
return false;
}
@ -7690,9 +7576,7 @@ dead_libcall_p (insn, counts)
remaining passes of the compilation are also sped up. */
int
delete_trivially_dead_insns (insns, nreg)
rtx insns;
int nreg;
delete_trivially_dead_insns (rtx insns, int nreg)
{
int *counts;
rtx insn, prev;

View File

@ -40,34 +40,28 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "hashtab.h"
#include "cselib.h"
static int entry_and_rtx_equal_p PARAMS ((const void *, const void *));
static hashval_t get_value_hash PARAMS ((const void *));
static struct elt_list *new_elt_list PARAMS ((struct elt_list *,
cselib_val *));
static struct elt_loc_list *new_elt_loc_list PARAMS ((struct elt_loc_list *,
rtx));
static void unchain_one_value PARAMS ((cselib_val *));
static void unchain_one_elt_list PARAMS ((struct elt_list **));
static void unchain_one_elt_loc_list PARAMS ((struct elt_loc_list **));
static void clear_table PARAMS ((void));
static int discard_useless_locs PARAMS ((void **, void *));
static int discard_useless_values PARAMS ((void **, void *));
static void remove_useless_values PARAMS ((void));
static rtx wrap_constant PARAMS ((enum machine_mode, rtx));
static unsigned int hash_rtx PARAMS ((rtx, enum machine_mode, int));
static cselib_val *new_cselib_val PARAMS ((unsigned int,
enum machine_mode));
static void add_mem_for_addr PARAMS ((cselib_val *, cselib_val *,
rtx));
static cselib_val *cselib_lookup_mem PARAMS ((rtx, int));
static void cselib_invalidate_regno PARAMS ((unsigned int,
enum machine_mode));
static int cselib_mem_conflict_p PARAMS ((rtx, rtx));
static void cselib_invalidate_mem PARAMS ((rtx));
static void cselib_invalidate_rtx PARAMS ((rtx, rtx, void *));
static void cselib_record_set PARAMS ((rtx, cselib_val *,
cselib_val *));
static void cselib_record_sets PARAMS ((rtx));
static int entry_and_rtx_equal_p (const void *, const void *);
static hashval_t get_value_hash (const void *);
static struct elt_list *new_elt_list (struct elt_list *, cselib_val *);
static struct elt_loc_list *new_elt_loc_list (struct elt_loc_list *, rtx);
static void unchain_one_value (cselib_val *);
static void unchain_one_elt_list (struct elt_list **);
static void unchain_one_elt_loc_list (struct elt_loc_list **);
static void clear_table (void);
static int discard_useless_locs (void **, void *);
static int discard_useless_values (void **, void *);
static void remove_useless_values (void);
static rtx wrap_constant (enum machine_mode, rtx);
static unsigned int hash_rtx (rtx, enum machine_mode, int);
static cselib_val *new_cselib_val (unsigned int, enum machine_mode);
static void add_mem_for_addr (cselib_val *, cselib_val *, rtx);
static cselib_val *cselib_lookup_mem (rtx, int);
static void cselib_invalidate_regno (unsigned int, enum machine_mode);
static int cselib_mem_conflict_p (rtx, rtx);
static void cselib_invalidate_mem (rtx);
static void cselib_invalidate_rtx (rtx, rtx, void *);
static void cselib_record_set (rtx, cselib_val *, cselib_val *);
static void cselib_record_sets (rtx);
/* There are three ways in which cselib can look up an rtx:
- for a REG, the reg_values table (which is indexed by regno) is used
@ -136,7 +130,7 @@ static int values_became_useless;
presence in the list by checking the next pointer. */
static cselib_val dummy_val;
/* Used to list all values that contain memory reference.
/* Used to list all values that contain memory reference.
May or may not contain the useless values - the list is compacted
each time memory is invalidated. */
static cselib_val *first_containing_mem = &dummy_val;
@ -146,9 +140,7 @@ static cselib_val *first_containing_mem = &dummy_val;
arguments. */
static struct elt_list *
new_elt_list (next, elt)
struct elt_list *next;
cselib_val *elt;
new_elt_list (struct elt_list *next, cselib_val *elt)
{
struct elt_list *el = empty_elt_lists;
@ -165,9 +157,7 @@ new_elt_list (next, elt)
arguments. */
static struct elt_loc_list *
new_elt_loc_list (next, loc)
struct elt_loc_list *next;
rtx loc;
new_elt_loc_list (struct elt_loc_list *next, rtx loc)
{
struct elt_loc_list *el = empty_elt_loc_lists;
@ -186,8 +176,7 @@ new_elt_loc_list (next, loc)
storage. */
static void
unchain_one_elt_list (pl)
struct elt_list **pl;
unchain_one_elt_list (struct elt_list **pl)
{
struct elt_list *l = *pl;
@ -199,8 +188,7 @@ unchain_one_elt_list (pl)
/* Likewise for elt_loc_lists. */
static void
unchain_one_elt_loc_list (pl)
struct elt_loc_list **pl;
unchain_one_elt_loc_list (struct elt_loc_list **pl)
{
struct elt_loc_list *l = *pl;
@ -213,8 +201,7 @@ unchain_one_elt_loc_list (pl)
V. */
static void
unchain_one_value (v)
cselib_val *v;
unchain_one_value (cselib_val *v)
{
while (v->addr_list)
unchain_one_elt_list (&v->addr_list);
@ -228,7 +215,7 @@ unchain_one_value (v)
which are known to have been used. */
static void
clear_table ()
clear_table (void)
{
unsigned int i;
@ -254,8 +241,7 @@ clear_table ()
CONST of an appropriate mode. */
static int
entry_and_rtx_equal_p (entry, x_arg)
const void *entry, *x_arg;
entry_and_rtx_equal_p (const void *entry, const void *x_arg)
{
struct elt_loc_list *l;
const cselib_val *v = (const cselib_val *) entry;
@ -273,7 +259,7 @@ entry_and_rtx_equal_p (entry, x_arg)
&& (GET_CODE (XEXP (x, 0)) == CONST_INT
|| GET_CODE (XEXP (x, 0)) == CONST_DOUBLE))
x = XEXP (x, 0);
/* We don't guarantee that distinct rtx's have different hash values,
so we need to do a comparison. */
for (l = v->locs; l; l = l->next)
@ -288,8 +274,7 @@ entry_and_rtx_equal_p (entry, x_arg)
value from a cselib_val structure. */
static hashval_t
get_value_hash (entry)
const void *entry;
get_value_hash (const void *entry)
{
const cselib_val *v = (const cselib_val *) entry;
return v->value;
@ -301,9 +286,7 @@ get_value_hash (entry)
removed. */
int
references_value_p (x, only_useless)
rtx x;
int only_useless;
references_value_p (rtx x, int only_useless)
{
enum rtx_code code = GET_CODE (x);
const char *fmt = GET_RTX_FORMAT (code);
@ -331,9 +314,7 @@ references_value_p (x, only_useless)
htab_traverse. */
static int
discard_useless_locs (x, info)
void **x;
void *info ATTRIBUTE_UNUSED;
discard_useless_locs (void **x, void *info ATTRIBUTE_UNUSED)
{
cselib_val *v = (cselib_val *)*x;
struct elt_loc_list **p = &v->locs;
@ -358,9 +339,7 @@ discard_useless_locs (x, info)
/* If X is a value with no locations, remove it from the hashtable. */
static int
discard_useless_values (x, info)
void **x;
void *info ATTRIBUTE_UNUSED;
discard_useless_values (void **x, void *info ATTRIBUTE_UNUSED)
{
cselib_val *v = (cselib_val *)*x;
@ -378,7 +357,7 @@ discard_useless_values (x, info)
associated with them) from the hash table. */
static void
remove_useless_values ()
remove_useless_values (void)
{
cselib_val **p, *v;
/* First pass: eliminate locations that reference the value. That in
@ -412,8 +391,7 @@ remove_useless_values ()
VOIDmode. */
enum machine_mode
cselib_reg_set_mode (x)
rtx x;
cselib_reg_set_mode (rtx x)
{
if (GET_CODE (x) != REG)
return GET_MODE (x);
@ -429,13 +407,12 @@ cselib_reg_set_mode (x)
our gathered information into account. */
int
rtx_equal_for_cselib_p (x, y)
rtx x, y;
rtx_equal_for_cselib_p (rtx x, rtx y)
{
enum rtx_code code;
const char *fmt;
int i;
if (GET_CODE (x) == REG || GET_CODE (x) == MEM)
{
cselib_val *e = cselib_lookup (x, GET_MODE (x), 0);
@ -473,7 +450,7 @@ rtx_equal_for_cselib_p (x, y)
else if (rtx_equal_for_cselib_p (t, y))
return 1;
}
return 0;
}
@ -491,7 +468,7 @@ rtx_equal_for_cselib_p (x, y)
else if (rtx_equal_for_cselib_p (x, t))
return 1;
}
return 0;
}
@ -501,7 +478,7 @@ rtx_equal_for_cselib_p (x, y)
/* This won't be handled correctly by the code below. */
if (GET_CODE (x) == LABEL_REF)
return XEXP (x, 0) == XEXP (y, 0);
code = GET_CODE (x);
fmt = GET_RTX_FORMAT (code);
@ -568,9 +545,7 @@ rtx_equal_for_cselib_p (x, y)
functions. For that purpose, wrap them in a CONST of the appropriate
mode. */
static rtx
wrap_constant (mode, x)
enum machine_mode mode;
rtx x;
wrap_constant (enum machine_mode mode, rtx x)
{
if (GET_CODE (x) != CONST_INT
&& (GET_CODE (x) != CONST_DOUBLE || GET_MODE (x) != VOIDmode))
@ -590,10 +565,7 @@ wrap_constant (mode, x)
otherwise the mode of X is used. */
static unsigned int
hash_rtx (x, mode, create)
rtx x;
enum machine_mode mode;
int create;
hash_rtx (rtx x, enum machine_mode mode, int create)
{
cselib_val *e;
int i, j;
@ -673,7 +645,7 @@ hash_rtx (x, mode, create)
return 0;
break;
default:
break;
}
@ -725,9 +697,7 @@ hash_rtx (x, mode, create)
value is MODE. */
static cselib_val *
new_cselib_val (value, mode)
unsigned int value;
enum machine_mode mode;
new_cselib_val (unsigned int value, enum machine_mode mode)
{
cselib_val *e = empty_vals;
@ -753,9 +723,7 @@ new_cselib_val (value, mode)
value. Update the two value structures to represent this situation. */
static void
add_mem_for_addr (addr_elt, mem_elt, x)
cselib_val *addr_elt, *mem_elt;
rtx x;
add_mem_for_addr (cselib_val *addr_elt, cselib_val *mem_elt, rtx x)
{
struct elt_loc_list *l;
@ -780,9 +748,7 @@ add_mem_for_addr (addr_elt, mem_elt, x)
If CREATE, make a new one if we haven't seen it before. */
static cselib_val *
cselib_lookup_mem (x, create)
rtx x;
int create;
cselib_lookup_mem (rtx x, int create)
{
enum machine_mode mode = GET_MODE (x);
void **slot;
@ -822,8 +788,7 @@ cselib_lookup_mem (x, create)
allocated. However, the return value can share rtl with X. */
rtx
cselib_subst_to_values (x)
rtx x;
cselib_subst_to_values (rtx x)
{
enum rtx_code code = GET_CODE (x);
const char *fmt = GET_RTX_FORMAT (code);
@ -867,7 +832,7 @@ cselib_subst_to_values (x)
case PRE_MODIFY:
e = new_cselib_val (++next_unknown_value, GET_MODE (x));
return e->u.val_rtx;
default:
break;
}
@ -915,10 +880,7 @@ cselib_subst_to_values (x)
(i.e. because it's a constant). */
cselib_val *
cselib_lookup (x, mode, create)
rtx x;
enum machine_mode mode;
int create;
cselib_lookup (rtx x, enum machine_mode mode, int create)
{
void **slot;
cselib_val *e;
@ -1003,9 +965,7 @@ cselib_lookup (x, mode, create)
invalidating call clobbered registers across a call. */
static void
cselib_invalidate_regno (regno, mode)
unsigned int regno;
enum machine_mode mode;
cselib_invalidate_regno (unsigned int regno, enum machine_mode mode)
{
unsigned int endregno;
unsigned int i;
@ -1023,7 +983,7 @@ cselib_invalidate_regno (regno, mode)
{
if (mode == VOIDmode)
abort ();
if (regno < max_value_regs)
i = 0;
else
@ -1094,9 +1054,7 @@ cselib_invalidate_regno (regno, mode)
Return whether this change will invalidate VAL. */
static int
cselib_mem_conflict_p (mem_base, val)
rtx mem_base;
rtx val;
cselib_mem_conflict_p (rtx mem_base, rtx val)
{
enum rtx_code code;
const char *fmt;
@ -1153,8 +1111,7 @@ cselib_mem_conflict_p (mem_base, val)
instruction, MEM_RTX is (mem:BLK const0_rtx). */
static void
cselib_invalidate_mem (mem_rtx)
rtx mem_rtx;
cselib_invalidate_mem (rtx mem_rtx)
{
cselib_val **vp, *v, *next;
@ -1224,10 +1181,8 @@ cselib_invalidate_mem (mem_rtx)
note_stores; they are ignored. */
static void
cselib_invalidate_rtx (dest, ignore, data)
rtx dest;
rtx ignore ATTRIBUTE_UNUSED;
void *data ATTRIBUTE_UNUSED;
cselib_invalidate_rtx (rtx dest, rtx ignore ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SIGN_EXTRACT
|| GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SUBREG)
@ -1251,9 +1206,7 @@ cselib_invalidate_rtx (dest, ignore, data)
describes its address. */
static void
cselib_record_set (dest, src_elt, dest_addr_elt)
rtx dest;
cselib_val *src_elt, *dest_addr_elt;
cselib_record_set (rtx dest, cselib_val *src_elt, cselib_val *dest_addr_elt)
{
int dreg = GET_CODE (dest) == REG ? (int) REGNO (dest) : -1;
@ -1311,8 +1264,7 @@ struct set
/* Record the effects of any sets in INSN. */
static void
cselib_record_sets (insn)
rtx insn;
cselib_record_sets (rtx insn)
{
int n_sets = 0;
int i;
@ -1393,8 +1345,7 @@ cselib_record_sets (insn)
/* Record the effects of INSN. */
void
cselib_process_insn (insn)
rtx insn;
cselib_process_insn (rtx insn)
{
int i;
rtx x;
@ -1464,7 +1415,7 @@ cselib_process_insn (insn)
it must be called by the user if it allocated new registers. */
void
cselib_update_varray_sizes ()
cselib_update_varray_sizes (void)
{
unsigned int nregs = max_reg_num ();
@ -1480,7 +1431,7 @@ cselib_update_varray_sizes ()
init_alias_analysis. */
void
cselib_init ()
cselib_init (void)
{
/* This is only created once. */
if (! callmem)
@ -1497,7 +1448,7 @@ cselib_init ()
VARRAY_ELT_LIST_INIT (reg_values, cselib_nregs, "reg_values");
VARRAY_UINT_INIT (used_regs, cselib_nregs, "used_regs");
}
hash_table = htab_create_ggc (31, get_value_hash, entry_and_rtx_equal_p,
hash_table = htab_create_ggc (31, get_value_hash, entry_and_rtx_equal_p,
NULL);
cselib_current_insn_in_libcall = false;
}
@ -1505,7 +1456,7 @@ cselib_init ()
/* Called when the current user is done with cselib. */
void
cselib_finish ()
cselib_finish (void)
{
clear_table ();
reg_values_old = reg_values;

View File

@ -62,12 +62,12 @@ struct elt_list GTY(())
cselib_val *elt;
};
extern cselib_val *cselib_lookup PARAMS ((rtx, enum machine_mode, int));
extern void cselib_update_varray_sizes PARAMS ((void));
extern void cselib_init PARAMS ((void));
extern void cselib_finish PARAMS ((void));
extern void cselib_process_insn PARAMS ((rtx));
extern enum machine_mode cselib_reg_set_mode PARAMS ((rtx));
extern int rtx_equal_for_cselib_p PARAMS ((rtx, rtx));
extern int references_value_p PARAMS ((rtx, int));
extern rtx cselib_subst_to_values PARAMS ((rtx));
extern cselib_val *cselib_lookup (rtx, enum machine_mode, int);
extern void cselib_update_varray_sizes (void);
extern void cselib_init (void);
extern void cselib_finish (void);
extern void cselib_process_insn (rtx);
extern enum machine_mode cselib_reg_set_mode (rtx);
extern int rtx_equal_for_cselib_p (rtx, rtx);
extern int references_value_p (rtx, int);
extern rtx cselib_subst_to_values (rtx);

View File

@ -307,46 +307,46 @@ static int current_sym_nchars;
#define CONTIN do { } while (0)
#endif
static void dbxout_init PARAMS ((const char *));
static void dbxout_finish PARAMS ((const char *));
static void dbxout_start_source_file PARAMS ((unsigned, const char *));
static void dbxout_end_source_file PARAMS ((unsigned));
static void dbxout_typedefs PARAMS ((tree));
static void dbxout_fptype_value PARAMS ((tree));
static void dbxout_type_index PARAMS ((tree));
static void dbxout_init (const char *);
static void dbxout_finish (const char *);
static void dbxout_start_source_file (unsigned, const char *);
static void dbxout_end_source_file (unsigned);
static void dbxout_typedefs (tree);
static void dbxout_fptype_value (tree);
static void dbxout_type_index (tree);
#if DBX_CONTIN_LENGTH > 0
static void dbxout_continue PARAMS ((void));
static void dbxout_continue (void);
#endif
static void dbxout_args PARAMS ((tree));
static void dbxout_type_fields PARAMS ((tree));
static void dbxout_type_method_1 PARAMS ((tree, const char *));
static void dbxout_type_methods PARAMS ((tree));
static void dbxout_range_type PARAMS ((tree));
static void dbxout_type PARAMS ((tree, int));
static bool print_int_cst_bounds_in_octal_p PARAMS ((tree));
static void print_int_cst_octal PARAMS ((tree));
static void print_octal PARAMS ((unsigned HOST_WIDE_INT, int));
static void print_wide_int PARAMS ((HOST_WIDE_INT));
static void dbxout_type_name PARAMS ((tree));
static void dbxout_class_name_qualifiers PARAMS ((tree));
static int dbxout_symbol_location PARAMS ((tree, tree, const char *, rtx));
static void dbxout_symbol_name PARAMS ((tree, const char *, int));
static void dbxout_prepare_symbol PARAMS ((tree));
static void dbxout_finish_symbol PARAMS ((tree));
static void dbxout_block PARAMS ((tree, int, tree));
static void dbxout_global_decl PARAMS ((tree));
static void dbxout_handle_pch PARAMS ((unsigned));
static void dbxout_args (tree);
static void dbxout_type_fields (tree);
static void dbxout_type_method_1 (tree, const char *);
static void dbxout_type_methods (tree);
static void dbxout_range_type (tree);
static void dbxout_type (tree, int);
static bool print_int_cst_bounds_in_octal_p (tree);
static void print_int_cst_octal (tree);
static void print_octal (unsigned HOST_WIDE_INT, int);
static void print_wide_int (HOST_WIDE_INT);
static void dbxout_type_name (tree);
static void dbxout_class_name_qualifiers (tree);
static int dbxout_symbol_location (tree, tree, const char *, rtx);
static void dbxout_symbol_name (tree, const char *, int);
static void dbxout_prepare_symbol (tree);
static void dbxout_finish_symbol (tree);
static void dbxout_block (tree, int, tree);
static void dbxout_global_decl (tree);
static void dbxout_handle_pch (unsigned);
/* The debug hooks structure. */
#if defined (DBX_DEBUGGING_INFO)
static void dbxout_source_line PARAMS ((unsigned int, const char *));
static void dbxout_source_file PARAMS ((FILE *, const char *));
static void dbxout_function_end PARAMS ((void));
static void dbxout_begin_function PARAMS ((tree));
static void dbxout_begin_block PARAMS ((unsigned, unsigned));
static void dbxout_end_block PARAMS ((unsigned, unsigned));
static void dbxout_function_decl PARAMS ((tree));
static void dbxout_source_line (unsigned int, const char *);
static void dbxout_source_file (FILE *, const char *);
static void dbxout_function_end (void);
static void dbxout_begin_function (tree);
static void dbxout_begin_block (unsigned, unsigned);
static void dbxout_end_block (unsigned, unsigned);
static void dbxout_function_decl (tree);
const struct gcc_debug_hooks dbx_debug_hooks =
{
@ -407,7 +407,7 @@ const struct gcc_debug_hooks xcoff_debug_hooks =
#if defined (DBX_DEBUGGING_INFO)
static void
dbxout_function_end ()
dbxout_function_end (void)
{
char lscope_label_name[100];
/* Convert Ltext into the appropriate format for local labels in case
@ -435,8 +435,7 @@ dbxout_function_end ()
Initialize `typevec' and output the standard data types of C. */
static void
dbxout_init (input_file_name)
const char *input_file_name;
dbxout_init (const char *input_file_name)
{
char ltext_label_name[100];
tree syms = (*lang_hooks.decls.getdecls) ();
@ -526,8 +525,7 @@ dbxout_init (input_file_name)
in the reverse order from that which is found in SYMS. */
static void
dbxout_typedefs (syms)
tree syms;
dbxout_typedefs (tree syms)
{
if (syms)
{
@ -547,9 +545,8 @@ dbxout_typedefs (syms)
/* Change to reading from a new source file. Generate a N_BINCL stab. */
static void
dbxout_start_source_file (line, filename)
unsigned int line ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED;
dbxout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
const char *filename ATTRIBUTE_UNUSED)
{
#ifdef DBX_USE_BINCL
struct dbx_file *n = (struct dbx_file *) ggc_alloc (sizeof *n);
@ -567,8 +564,7 @@ dbxout_start_source_file (line, filename)
/* Revert to reading a previous source file. Generate a N_EINCL stab. */
static void
dbxout_end_source_file (line)
unsigned int line ATTRIBUTE_UNUSED;
dbxout_end_source_file (unsigned int line ATTRIBUTE_UNUSED)
{
#ifdef DBX_USE_BINCL
fprintf (asmfile, "%s%d,0,0,0\n", ASM_STABN_OP, N_EINCL);
@ -605,9 +601,7 @@ dbxout_handle_pch (unsigned at_end)
/* Output debugging info to FILE to switch to sourcefile FILENAME. */
static void
dbxout_source_file (file, filename)
FILE *file;
const char *filename;
dbxout_source_file (FILE *file, const char *filename)
{
if (lastfile == 0 && lastfile_is_base)
{
@ -641,9 +635,7 @@ dbxout_source_file (file, filename)
number LINENO. */
static void
dbxout_source_line (lineno, filename)
unsigned int lineno;
const char *filename;
dbxout_source_line (unsigned int lineno, const char *filename)
{
dbxout_source_file (asmfile, filename);
@ -658,9 +650,7 @@ dbxout_source_line (lineno, filename)
/* Describe the beginning of an internal block within a function. */
static void
dbxout_begin_block (line, n)
unsigned int line ATTRIBUTE_UNUSED;
unsigned int n;
dbxout_begin_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n)
{
(*targetm.asm_out.internal_label) (asmfile, "LBB", n);
}
@ -668,9 +658,7 @@ dbxout_begin_block (line, n)
/* Describe the end line-number of an internal block within a function. */
static void
dbxout_end_block (line, n)
unsigned int line ATTRIBUTE_UNUSED;
unsigned int n;
dbxout_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n)
{
(*targetm.asm_out.internal_label) (asmfile, "LBE", n);
}
@ -682,8 +670,7 @@ dbxout_end_block (line, n)
(including all the auto variables of the function). */
static void
dbxout_function_decl (decl)
tree decl;
dbxout_function_decl (tree decl)
{
#ifndef DBX_FUNCTION_FIRST
dbxout_begin_function (decl);
@ -705,8 +692,7 @@ dbxout_function_decl (decl)
/* Debug information for a global DECL. Called from toplev.c after
compilation proper has finished. */
static void
dbxout_global_decl (decl)
tree decl;
dbxout_global_decl (tree decl)
{
if (TREE_CODE (decl) == VAR_DECL
&& ! DECL_EXTERNAL (decl)
@ -724,8 +710,7 @@ dbxout_global_decl (decl)
to do nothing. */
static void
dbxout_finish (filename)
const char *filename ATTRIBUTE_UNUSED;
dbxout_finish (const char *filename ATTRIBUTE_UNUSED)
{
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END
DBX_OUTPUT_MAIN_SOURCE_FILE_END (asmfile, filename);
@ -752,8 +737,7 @@ dbxout_finish (filename)
them. */
static void
dbxout_fptype_value (type)
tree type;
dbxout_fptype_value (tree type)
{
char value = '0';
enum machine_mode mode = TYPE_MODE (type);
@ -792,8 +776,7 @@ dbxout_fptype_value (type)
/* Output the index of a type. */
static void
dbxout_type_index (type)
tree type;
dbxout_type_index (tree type)
{
#ifndef DBX_USE_BINCL
fprintf (asmfile, "%d", TYPE_SYMTAB_ADDRESS (type));
@ -813,7 +796,7 @@ dbxout_type_index (type)
.stabs "...rest",code,0,value */
static void
dbxout_continue ()
dbxout_continue (void)
{
#ifdef DBX_CONTIN_CHAR
fprintf (asmfile, "%c", DBX_CONTIN_CHAR);
@ -831,8 +814,7 @@ dbxout_continue ()
recursive calls. */
static void
dbxout_type_fields (type)
tree type;
dbxout_type_fields (tree type)
{
tree tem;
@ -922,9 +904,7 @@ dbxout_type_fields (type)
now. */
static void
dbxout_type_method_1 (decl, debug_name)
tree decl;
const char *debug_name;
dbxout_type_method_1 (tree decl, const char *debug_name)
{
char c1 = 'A', c2;
@ -969,8 +949,7 @@ dbxout_type_method_1 (decl, debug_name)
in TYPE. */
static void
dbxout_type_methods (type)
tree type;
dbxout_type_methods (tree type)
{
/* C++: put out the method names and their parameter lists */
tree methods = TYPE_METHODS (type);
@ -1075,8 +1054,7 @@ dbxout_type_methods (type)
TYPE is an INTEGER_TYPE. */
static void
dbxout_range_type (type)
tree type;
dbxout_range_type (tree type)
{
fprintf (asmfile, "r");
if (TREE_TYPE (type))
@ -1150,9 +1128,7 @@ dbxout_range_type (type)
using the number previously allocated. */
static void
dbxout_type (type, full)
tree type;
int full;
dbxout_type (tree type, int full)
{
tree tem;
tree main_variant;
@ -1199,7 +1175,7 @@ dbxout_type (type, full)
{
typevec
= (struct typeinfo *) ggc_realloc (typevec,
(typevec_len * 2
(typevec_len * 2
* sizeof typevec[0]));
memset ((char *) (typevec + typevec_len), 0,
typevec_len * sizeof typevec[0]);
@ -1228,7 +1204,7 @@ dbxout_type (type, full)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
debug_queue_symbol (TYPE_NAME (type));
}
/* Output the number of this type, to refer to it. */
dbxout_type_index (type);
@ -1316,7 +1292,7 @@ dbxout_type (type, full)
{
tree orig_type = DECL_ORIGINAL_TYPE (TYPE_NAME (type));
if ((TREE_CODE (orig_type) == RECORD_TYPE
if ((TREE_CODE (orig_type) == RECORD_TYPE
|| TREE_CODE (orig_type) == UNION_TYPE
|| TREE_CODE (orig_type) == QUAL_UNION_TYPE
|| TREE_CODE (orig_type) == ENUMERAL_TYPE)
@ -1389,7 +1365,7 @@ dbxout_type (type, full)
CHARS (5);
}
if (print_int_cst_bounds_in_octal_p (type))
if (print_int_cst_bounds_in_octal_p (type))
{
fprintf (asmfile, "r");
CHARS (1);
@ -1654,7 +1630,7 @@ dbxout_type (type, full)
tree child = BINFO_BASETYPE (binfo, i);
tree access = (BINFO_BASEACCESSES (binfo)
? BINFO_BASEACCESS (binfo, i) : access_public_node);
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
@ -1854,8 +1830,7 @@ dbxout_type (type, full)
should be printed in octal format. */
static bool
print_int_cst_bounds_in_octal_p (type)
tree type;
print_int_cst_bounds_in_octal_p (tree type)
{
/* If we can use GDB extensions and the size is wider than a long
(the size used by GDB to read them) or we may have trouble writing
@ -1863,7 +1838,7 @@ print_int_cst_bounds_in_octal_p (type)
the *target's* size of "long", not that of the host. The host test
is just to make sure we can write it out in case the host wide int
is narrower than the target "long".
For unsigned types, we use octal if they are the same size or larger.
This is because we print the bounds as signed decimal, and hence they
can't span same size unsigned types. */
@ -1888,8 +1863,7 @@ print_int_cst_bounds_in_octal_p (type)
handling double precision. */
static void
print_int_cst_octal (c)
tree c;
print_int_cst_octal (tree c)
{
unsigned HOST_WIDE_INT high = TREE_INT_CST_HIGH (c);
unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (c);
@ -1934,9 +1908,7 @@ print_int_cst_octal (c)
}
static void
print_octal (value, digits)
unsigned HOST_WIDE_INT value;
int digits;
print_octal (unsigned HOST_WIDE_INT value, int digits)
{
int i;
@ -1949,8 +1921,7 @@ print_octal (value, digits)
/* Output C in decimal while adjusting the number of digits written. */
static void
print_wide_int (c)
HOST_WIDE_INT c;
print_wide_int (HOST_WIDE_INT c)
{
int digs = 0;
@ -1970,8 +1941,7 @@ print_wide_int (c)
or by struct, enum and union tags. */
static void
dbxout_type_name (type)
tree type;
dbxout_type_name (tree type)
{
tree t;
if (TYPE_NAME (type) == 0)
@ -1995,14 +1965,13 @@ dbxout_type_name (type)
type whose scope is limited to a struct or class. */
static void
dbxout_class_name_qualifiers (decl)
tree decl;
dbxout_class_name_qualifiers (tree decl)
{
tree context = decl_type_context (decl);
if (context != NULL_TREE
if (context != NULL_TREE
&& TREE_CODE(context) == RECORD_TYPE
&& TYPE_NAME (context) != 0
&& TYPE_NAME (context) != 0
&& (TREE_CODE (TYPE_NAME (context)) == IDENTIFIER_NODE
|| (DECL_NAME (TYPE_NAME (context)) != 0)))
{
@ -2025,9 +1994,7 @@ dbxout_class_name_qualifiers (decl)
Return 1 if a stabs might have been emitted. */
int
dbxout_symbol (decl, local)
tree decl;
int local ATTRIBUTE_UNUSED;
dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
{
tree type = TREE_TYPE (decl);
tree context = NULL_TREE;
@ -2050,7 +2017,7 @@ dbxout_symbol (decl, local)
/* If we are to generate only the symbols actualy used then such
symbol nodees are flagged with TREE_USED. Ignore any that
aren't flaged as TREE_USED. */
if (flag_debug_only_used_symbols)
{
tree t;
@ -2069,7 +2036,7 @@ dbxout_symbol (decl, local)
pointer to a named type we need to look for the first name
we see following the TREE_TYPE chain. */
t = type;
t = type;
while (POINTER_TYPE_P (t))
t = TREE_TYPE (t);
@ -2369,10 +2336,7 @@ dbxout_symbol (decl, local)
Returns 1 if the stab was really emitted. */
static int
dbxout_symbol_location (decl, type, suffix, home)
tree decl, type;
const char *suffix;
rtx home;
dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
{
int letter = 0;
int regno = -1;
@ -2605,10 +2569,7 @@ dbxout_symbol_location (decl, type, suffix, home)
Then output LETTER to indicate the kind of location the symbol has. */
static void
dbxout_symbol_name (decl, suffix, letter)
tree decl;
const char *suffix;
int letter;
dbxout_symbol_name (tree decl, const char *suffix, int letter)
{
const char *name;
@ -2633,8 +2594,7 @@ dbxout_symbol_name (decl, suffix, letter)
}
static void
dbxout_prepare_symbol (decl)
tree decl ATTRIBUTE_UNUSED;
dbxout_prepare_symbol (tree decl ATTRIBUTE_UNUSED)
{
#ifdef WINNING_GDB
const char *filename = DECL_SOURCE_FILE (decl);
@ -2644,8 +2604,7 @@ dbxout_prepare_symbol (decl)
}
static void
dbxout_finish_symbol (sym)
tree sym;
dbxout_finish_symbol (tree sym)
{
#ifdef DBX_FINISH_SYMBOL
DBX_FINISH_SYMBOL (sym);
@ -2667,8 +2626,7 @@ dbxout_finish_symbol (sym)
anything was output */
int
dbxout_syms (syms)
tree syms;
dbxout_syms (tree syms)
{
int result = 0;
while (syms)
@ -2692,8 +2650,7 @@ dbxout_syms (syms)
of all the parms in PARMS, which is a chain of PARM_DECL nodes. */
void
dbxout_parms (parms)
tree parms;
dbxout_parms (tree parms)
{
++debug_nesting;
@ -2969,8 +2926,7 @@ dbxout_parms (parms)
PARMS is a chain of PARM_DECL nodes. */
void
dbxout_reg_parms (parms)
tree parms;
dbxout_reg_parms (tree parms)
{
++debug_nesting;
@ -3001,8 +2957,7 @@ dbxout_reg_parms (parms)
output definitions of those names, in raw form */
static void
dbxout_args (args)
tree args;
dbxout_args (tree args)
{
while (args)
{
@ -3031,10 +2986,7 @@ dbxout_args (args)
We handle them all in sequence. */
static void
dbxout_block (block, depth, args)
tree block;
int depth;
tree args;
dbxout_block (tree block, int depth, tree args)
{
int blocknum = -1;
@ -3129,14 +3081,13 @@ dbxout_block (block, depth, args)
#if defined (DBX_DEBUGGING_INFO)
static void
dbxout_begin_function (decl)
tree decl;
dbxout_begin_function (tree decl)
{
int saved_tree_used1 = TREE_USED (decl);
TREE_USED (decl) = 1;
if (DECL_NAME (DECL_RESULT (decl)) != 0)
{
int saved_tree_used2 = TREE_USED (DECL_RESULT (decl));
int saved_tree_used2 = TREE_USED (DECL_RESULT (decl));
TREE_USED (DECL_RESULT (decl)) = 1;
dbxout_symbol (decl, 0);
TREE_USED (DECL_RESULT (decl)) = saved_tree_used2;

View File

@ -1,5 +1,5 @@
/* Do-nothing debug hooks for GCC.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@ -51,51 +51,44 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
nothing. */
void
debug_nothing_void ()
debug_nothing_void (void)
{
}
void
debug_nothing_tree (decl)
tree decl ATTRIBUTE_UNUSED;
debug_nothing_tree (tree decl ATTRIBUTE_UNUSED)
{
}
bool
debug_true_tree (block)
tree block ATTRIBUTE_UNUSED;
debug_true_tree (tree block ATTRIBUTE_UNUSED)
{
return true;
}
void
debug_nothing_rtx (insn)
rtx insn ATTRIBUTE_UNUSED;
debug_nothing_rtx (rtx insn ATTRIBUTE_UNUSED)
{
}
void
debug_nothing_charstar (main_filename)
const char *main_filename ATTRIBUTE_UNUSED;
debug_nothing_charstar (const char *main_filename ATTRIBUTE_UNUSED)
{
}
void
debug_nothing_int_charstar (line, text)
unsigned int line ATTRIBUTE_UNUSED;
const char *text ATTRIBUTE_UNUSED;
debug_nothing_int_charstar (unsigned int line ATTRIBUTE_UNUSED,
const char *text ATTRIBUTE_UNUSED)
{
}
void
debug_nothing_int (line)
unsigned int line ATTRIBUTE_UNUSED;
debug_nothing_int (unsigned int line ATTRIBUTE_UNUSED)
{
}
void
debug_nothing_int_int (line, n)
unsigned int line ATTRIBUTE_UNUSED;
unsigned int n ATTRIBUTE_UNUSED;
debug_nothing_int_int (unsigned int line ATTRIBUTE_UNUSED,
unsigned int n ATTRIBUTE_UNUSED)
{
}

759
gcc/df.c

File diff suppressed because it is too large Load Diff

124
gcc/df.h
View File

@ -1,5 +1,5 @@
/* Form lists of pseudo register references for autoinc optimization
for GNU compiler. This is part of flow optimization.
for GNU compiler. This is part of flow optimization.
Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
@ -51,7 +51,7 @@ enum df_ref_flags
these are marked with this flag to show that they are not
independent. */
DF_REF_READ_WRITE = 1,
/* This flag is set on register references inside a subreg on
machines which have CANNOT_CHANGE_MODE_CLASS.
Note, that this flag can also be set on df_refs representing
@ -157,7 +157,7 @@ struct df
bitmap insns_modified; /* Insns that (may) have changed. */
bitmap bbs_modified; /* Blocks that (may) have changed. */
bitmap all_blocks; /* All blocks in CFG. */
/* The sbitmap vector of dominators or NULL if not computed.
/* The sbitmap vector of dominators or NULL if not computed.
Ideally, this should be a pointer to a CFG object. */
sbitmap *dom;
int *dfs_order; /* DFS order -> block number. */
@ -231,96 +231,87 @@ struct df_map
/* Functions to build and analyse dataflow information. */
extern struct df *df_init PARAMS ((void));
extern struct df *df_init (void);
extern int df_analyse PARAMS ((struct df *, bitmap, int));
extern int df_analyse (struct df *, bitmap, int);
extern void df_finish PARAMS ((struct df *));
extern void df_finish (struct df *);
extern void df_dump PARAMS ((struct df *, int, FILE *));
extern void df_dump (struct df *, int, FILE *);
/* Functions to modify insns. */
extern void df_insn_modify PARAMS ((struct df *, basic_block, rtx));
extern void df_insn_modify (struct df *, basic_block, rtx);
extern rtx df_insn_delete PARAMS ((struct df *, basic_block, rtx));
extern rtx df_insn_delete (struct df *, basic_block, rtx);
extern rtx df_pattern_emit_before PARAMS ((struct df *, rtx,
basic_block, rtx));
extern rtx df_pattern_emit_before (struct df *, rtx, basic_block, rtx);
extern rtx df_jump_pattern_emit_after PARAMS ((struct df *, rtx,
basic_block, rtx));
extern rtx df_jump_pattern_emit_after (struct df *, rtx, basic_block, rtx);
extern rtx df_pattern_emit_after PARAMS ((struct df *, rtx,
basic_block, rtx));
extern rtx df_pattern_emit_after (struct df *, rtx, basic_block, rtx);
extern rtx df_insn_move_before PARAMS ((struct df *, basic_block, rtx,
basic_block, rtx));
extern rtx df_insn_move_before (struct df *, basic_block, rtx, basic_block,
rtx);
extern int df_reg_replace PARAMS ((struct df *, bitmap, rtx, rtx));
extern int df_reg_replace (struct df *, bitmap, rtx, rtx);
extern int df_ref_reg_replace PARAMS ((struct df *, struct ref *, rtx, rtx));
extern int df_ref_reg_replace (struct df *, struct ref *, rtx, rtx);
extern int df_ref_remove PARAMS ((struct df *, struct ref *));
extern int df_ref_remove (struct df *, struct ref *);
extern int df_insn_reg_replace PARAMS ((struct df *, basic_block,
rtx, rtx, rtx));
extern int df_insn_reg_replace (struct df *, basic_block, rtx, rtx, rtx);
extern int df_insn_mem_replace PARAMS ((struct df *, basic_block,
rtx, rtx, rtx));
extern int df_insn_mem_replace (struct df *, basic_block, rtx, rtx, rtx);
extern struct ref *df_bb_def_use_swap PARAMS ((struct df *, basic_block,
rtx, rtx, unsigned int));
extern struct ref *df_bb_def_use_swap (struct df *, basic_block, rtx, rtx,
unsigned int);
/* Functions to query dataflow information. */
extern basic_block df_regno_bb PARAMS((struct df *, unsigned int));
extern basic_block df_regno_bb (struct df *, unsigned int);
extern int df_reg_lifetime PARAMS ((struct df *, rtx));
extern int df_reg_lifetime (struct df *, rtx);
extern int df_reg_global_p PARAMS ((struct df *, rtx));
extern int df_reg_global_p (struct df *, rtx);
extern int df_insn_regno_def_p PARAMS ((struct df *,
basic_block, rtx, unsigned int));
extern int df_insn_regno_def_p (struct df *, basic_block, rtx, unsigned int);
extern int df_insn_dominates_all_uses_p PARAMS ((struct df *,
basic_block, rtx));
extern int df_insn_dominates_all_uses_p (struct df *, basic_block, rtx);
extern int df_insn_dominates_uses_p PARAMS ((struct df *, basic_block,
rtx, bitmap));
extern int df_insn_dominates_uses_p (struct df *, basic_block, rtx, bitmap);
extern int df_bb_reg_live_start_p PARAMS ((struct df *, basic_block, rtx));
extern int df_bb_reg_live_start_p (struct df *, basic_block, rtx);
extern int df_bb_reg_live_end_p PARAMS ((struct df *, basic_block, rtx));
extern int df_bb_reg_live_end_p (struct df *, basic_block, rtx);
extern int df_bb_regs_lives_compare PARAMS ((struct df *, basic_block,
rtx, rtx));
extern int df_bb_regs_lives_compare (struct df *, basic_block, rtx, rtx);
extern rtx df_bb_single_def_use_insn_find PARAMS((struct df *, basic_block,
rtx, rtx));
extern rtx df_bb_single_def_use_insn_find (struct df *, basic_block, rtx,
rtx);
/* Functions for debugging from GDB. */
extern void debug_df_insn PARAMS ((rtx));
extern void debug_df_insn (rtx);
extern void debug_df_regno PARAMS ((unsigned int));
extern void debug_df_regno (unsigned int);
extern void debug_df_reg PARAMS ((rtx));
extern void debug_df_reg (rtx);
extern void debug_df_defno PARAMS ((unsigned int));
extern void debug_df_defno (unsigned int);
extern void debug_df_useno PARAMS ((unsigned int));
extern void debug_df_useno (unsigned int);
extern void debug_df_ref PARAMS ((struct ref *));
extern void debug_df_ref (struct ref *);
extern void debug_df_chain PARAMS ((struct df_link *));
extern void debug_df_chain (struct df_link *);
extern void df_insn_debug PARAMS ((struct df *, rtx, FILE *));
extern void df_insn_debug (struct df *, rtx, FILE *);
extern void df_insn_debug_regno PARAMS ((struct df *, rtx, FILE *));
extern void df_insn_debug_regno (struct df *, rtx, FILE *);
/* Meet over any path (UNION) or meet over all paths (INTERSECTION). */
@ -339,23 +330,22 @@ enum df_flow_dir
};
typedef void (*transfer_function_sbitmap) PARAMS ((int, int *, sbitmap, sbitmap,
sbitmap, sbitmap, void *));
typedef void (*transfer_function_sbitmap) (int, int *, sbitmap, sbitmap,
sbitmap, sbitmap, void *);
typedef void (*transfer_function_bitmap) PARAMS ((int, int *, bitmap, bitmap,
bitmap, bitmap, void *));
typedef void (*transfer_function_bitmap) (int, int *, bitmap, bitmap,
bitmap, bitmap, void *);
extern void iterative_dataflow_sbitmap PARAMS ((sbitmap *, sbitmap *,
sbitmap *, sbitmap *,
bitmap, enum df_flow_dir,
enum df_confluence_op,
transfer_function_sbitmap,
int *, void *));
extern void iterative_dataflow_sbitmap (sbitmap *, sbitmap *, sbitmap *,
sbitmap *, bitmap, enum df_flow_dir,
enum df_confluence_op,
transfer_function_sbitmap,
int *, void *);
extern void iterative_dataflow_bitmap PARAMS ((bitmap *, bitmap *, bitmap *,
bitmap *, bitmap,
enum df_flow_dir,
enum df_confluence_op,
transfer_function_bitmap,
int *, void *));
extern bool read_modify_subreg_p PARAMS ((rtx));
extern void iterative_dataflow_bitmap (bitmap *, bitmap *, bitmap *,
bitmap *, bitmap,
enum df_flow_dir,
enum df_confluence_op,
transfer_function_bitmap,
int *, void *);
extern bool read_modify_subreg_p (rtx);

View File

@ -34,16 +34,16 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "optabs.h"
#include "langhooks.h"
static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
static void do_jump_by_parts_equality PARAMS ((tree, rtx, rtx));
static void do_compare_and_jump PARAMS ((tree, enum rtx_code, enum rtx_code,
rtx, rtx));
static void do_jump_by_parts_greater (tree, int, rtx, rtx);
static void do_jump_by_parts_equality (tree, rtx, rtx);
static void do_compare_and_jump (tree, enum rtx_code, enum rtx_code, rtx,
rtx);
/* At the start of a function, record that we have no previously-pushed
arguments waiting to be popped. */
void
init_pending_stack_adjust ()
init_pending_stack_adjust (void)
{
pending_stack_adjust = 0;
}
@ -55,7 +55,7 @@ init_pending_stack_adjust ()
frame pointer regardless of the value of flag_omit_frame_pointer. */
void
clear_pending_stack_adjust ()
clear_pending_stack_adjust (void)
{
#ifdef EXIT_IGNORE_STACK
if (optimize > 0
@ -73,7 +73,7 @@ clear_pending_stack_adjust ()
/* Pop any previously-pushed arguments that have not been popped yet. */
void
do_pending_stack_adjust ()
do_pending_stack_adjust (void)
{
if (inhibit_defer_pop == 0)
{
@ -90,9 +90,7 @@ do_pending_stack_adjust ()
functions here. */
void
jumpifnot (exp, label)
tree exp;
rtx label;
jumpifnot (tree exp, rtx label)
{
do_jump (exp, label, NULL_RTX);
}
@ -100,9 +98,7 @@ jumpifnot (exp, label)
/* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
void
jumpif (exp, label)
tree exp;
rtx label;
jumpif (tree exp, rtx label)
{
do_jump (exp, NULL_RTX, label);
}
@ -120,9 +116,7 @@ jumpif (exp, label)
&&, || and comparison operators in EXP. */
void
do_jump (exp, if_false_label, if_true_label)
tree exp;
rtx if_false_label, if_true_label;
do_jump (tree exp, rtx if_false_label, rtx if_true_label)
{
enum tree_code code = TREE_CODE (exp);
/* Some cases need to create a label to jump to
@ -617,10 +611,8 @@ do_jump (exp, if_false_label, if_true_label)
and LT if SWAP is 1. */
static void
do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label)
tree exp;
int swap;
rtx if_false_label, if_true_label;
do_jump_by_parts_greater (tree exp, int swap, rtx if_false_label,
rtx if_true_label)
{
rtx op0 = expand_expr (TREE_OPERAND (exp, swap), NULL_RTX, VOIDmode, 0);
rtx op1 = expand_expr (TREE_OPERAND (exp, !swap), NULL_RTX, VOIDmode, 0);
@ -635,11 +627,8 @@ do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label)
Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise. */
void
do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true_label)
enum machine_mode mode;
int unsignedp;
rtx op0, op1;
rtx if_false_label, if_true_label;
do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0,
rtx op1, rtx if_false_label, rtx if_true_label)
{
int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD);
rtx drop_through_label = 0;
@ -688,9 +677,7 @@ do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true
with one insn, test the comparison and jump to the appropriate label. */
static void
do_jump_by_parts_equality (exp, if_false_label, if_true_label)
tree exp;
rtx if_false_label, if_true_label;
do_jump_by_parts_equality (tree exp, rtx if_false_label, rtx if_true_label)
{
rtx op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
rtx op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
@ -719,9 +706,7 @@ do_jump_by_parts_equality (exp, if_false_label, if_true_label)
for the available compare insns. */
void
do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
rtx op0;
rtx if_false_label, if_true_label;
do_jump_by_parts_equality_rtx (rtx op0, rtx if_false_label, rtx if_true_label)
{
int nwords = GET_MODE_SIZE (GET_MODE (op0)) / UNITS_PER_WORD;
rtx part;
@ -776,12 +761,8 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
compared. */
rtx
compare_from_rtx (op0, op1, code, unsignedp, mode, size)
rtx op0, op1;
enum rtx_code code;
int unsignedp;
enum machine_mode mode;
rtx size;
compare_from_rtx (rtx op0, rtx op1, enum rtx_code code, int unsignedp,
enum machine_mode mode, rtx size)
{
enum rtx_code ucode;
rtx tem;
@ -847,14 +828,9 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size)
compared. */
void
do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
if_false_label, if_true_label)
rtx op0, op1;
enum rtx_code code;
int unsignedp;
enum machine_mode mode;
rtx size;
rtx if_false_label, if_true_label;
do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp,
enum machine_mode mode, rtx size, rtx if_false_label,
rtx if_true_label)
{
enum rtx_code ucode;
rtx tem;
@ -952,11 +928,9 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
things pushed on the stack that aren't yet used. */
static void
do_compare_and_jump (exp, signed_code, unsigned_code, if_false_label,
if_true_label)
tree exp;
enum rtx_code signed_code, unsigned_code;
rtx if_false_label, if_true_label;
do_compare_and_jump (tree exp, enum rtx_code signed_code,
enum rtx_code unsigned_code, rtx if_false_label,
rtx if_true_label)
{
rtx op0, op1;
tree type;

View File

@ -1,5 +1,6 @@
/* Perform doloop optimizations
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
This file is part of GCC.
@ -59,23 +60,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifdef HAVE_doloop_end
static rtx doloop_condition_get
PARAMS ((rtx));
static unsigned HOST_WIDE_INT doloop_iterations_max
PARAMS ((const struct loop_info *, enum machine_mode, int));
static int doloop_valid_p
PARAMS ((const struct loop *, rtx));
static int doloop_modify
PARAMS ((const struct loop *, rtx, rtx, rtx, rtx, rtx));
static int doloop_modify_runtime
PARAMS ((const struct loop *, rtx, rtx, rtx, enum machine_mode, rtx));
static rtx doloop_condition_get (rtx);
static unsigned HOST_WIDE_INT doloop_iterations_max (const struct loop_info *,
enum machine_mode, int);
static int doloop_valid_p (const struct loop *, rtx);
static int doloop_modify (const struct loop *, rtx, rtx, rtx, rtx, rtx);
static int doloop_modify_runtime (const struct loop *, rtx, rtx, rtx,
enum machine_mode, rtx);
/* Return the loop termination condition for PATTERN or zero
if it is not a decrement and branch jump insn. */
static rtx
doloop_condition_get (pattern)
rtx pattern;
doloop_condition_get (rtx pattern)
{
rtx cmp;
rtx inc;
@ -146,10 +143,8 @@ doloop_condition_get (pattern)
MODE is the mode of the iteration count and NONNEG is nonzero if
the iteration count has been proved to be non-negative. */
static unsigned HOST_WIDE_INT
doloop_iterations_max (loop_info, mode, nonneg)
const struct loop_info *loop_info;
enum machine_mode mode;
int nonneg;
doloop_iterations_max (const struct loop_info *loop_info,
enum machine_mode mode, int nonneg)
{
unsigned HOST_WIDE_INT n_iterations_max;
enum rtx_code code;
@ -255,9 +250,7 @@ doloop_iterations_max (loop_info, mode, nonneg)
/* Return nonzero if the loop specified by LOOP is suitable for
the use of special low-overhead looping instructions. */
static int
doloop_valid_p (loop, jump_insn)
const struct loop *loop;
rtx jump_insn;
doloop_valid_p (const struct loop *loop, rtx jump_insn)
{
const struct loop_info *loop_info = LOOP_INFO (loop);
@ -405,14 +398,8 @@ doloop_valid_p (loop, jump_insn)
low-overhead looping insn to emit at the end of the loop. This
returns nonzero if it was successful. */
static int
doloop_modify (loop, iterations, iterations_max,
doloop_seq, start_label, condition)
const struct loop *loop;
rtx iterations;
rtx iterations_max;
rtx doloop_seq;
rtx start_label;
rtx condition;
doloop_modify (const struct loop *loop, rtx iterations, rtx iterations_max,
rtx doloop_seq, rtx start_label, rtx condition)
{
rtx counter_reg;
rtx count;
@ -545,14 +532,9 @@ doloop_modify (loop, iterations, iterations_max,
number of loop iterations. DOLOOP_INSN is the low-overhead looping
insn to insert. Returns nonzero if loop successfully modified. */
static int
doloop_modify_runtime (loop, iterations_max,
doloop_seq, start_label, mode, condition)
const struct loop *loop;
rtx iterations_max;
rtx doloop_seq;
rtx start_label;
enum machine_mode mode;
rtx condition;
doloop_modify_runtime (const struct loop *loop, rtx iterations_max,
rtx doloop_seq, rtx start_label,
enum machine_mode mode, rtx condition)
{
const struct loop_info *loop_info = LOOP_INFO (loop);
HOST_WIDE_INT abs_inc;
@ -759,8 +741,7 @@ doloop_modify_runtime (loop, iterations_max,
is a candidate for this optimization. Returns nonzero if loop
successfully modified. */
int
doloop_optimize (loop)
const struct loop *loop;
doloop_optimize (const struct loop *loop)
{
struct loop_info *loop_info = LOOP_INFO (loop);
rtx initial_value;

View File

@ -1,5 +1,5 @@
/* Calculate (post)dominators in slightly super-linear time.
Copyright (C) 2000 Free Software Foundation, Inc.
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by Michael Matz (matz@ifh.de).
This file is part of GCC.
@ -115,19 +115,16 @@ struct dom_info
unsigned int nodes;
};
static void init_dom_info PARAMS ((struct dom_info *));
static void free_dom_info PARAMS ((struct dom_info *));
static void calc_dfs_tree_nonrec PARAMS ((struct dom_info *,
basic_block,
enum cdi_direction));
static void calc_dfs_tree PARAMS ((struct dom_info *,
enum cdi_direction));
static void compress PARAMS ((struct dom_info *, TBB));
static TBB eval PARAMS ((struct dom_info *, TBB));
static void link_roots PARAMS ((struct dom_info *, TBB, TBB));
static void calc_idoms PARAMS ((struct dom_info *,
enum cdi_direction));
void debug_dominance_info PARAMS ((dominance_info));
static void init_dom_info (struct dom_info *);
static void free_dom_info (struct dom_info *);
static void calc_dfs_tree_nonrec (struct dom_info *, basic_block,
enum cdi_direction);
static void calc_dfs_tree (struct dom_info *, enum cdi_direction);
static void compress (struct dom_info *, TBB);
static TBB eval (struct dom_info *, TBB);
static void link_roots (struct dom_info *, TBB, TBB);
static void calc_idoms (struct dom_info *, enum cdi_direction);
void debug_dominance_info (dominance_info);
/* Helper macro for allocating and initializing an array,
for aesthetic reasons. */
@ -150,8 +147,7 @@ void debug_dominance_info PARAMS ((dominance_info));
This initializes the contents of DI, which already must be allocated. */
static void
init_dom_info (di)
struct dom_info *di;
init_dom_info (struct dom_info *di)
{
/* We need memory for n_basic_blocks nodes and the ENTRY_BLOCK or
EXIT_BLOCK. */
@ -180,8 +176,7 @@ init_dom_info (di)
/* Free all allocated memory in DI, but not DI itself. */
static void
free_dom_info (di)
struct dom_info *di;
free_dom_info (struct dom_info *di)
{
free (di->dfs_parent);
free (di->path_min);
@ -203,10 +198,7 @@ free_dom_info (di)
assigned their dfs number and are linked together to form a tree. */
static void
calc_dfs_tree_nonrec (di, bb, reverse)
struct dom_info *di;
basic_block bb;
enum cdi_direction reverse;
calc_dfs_tree_nonrec (struct dom_info *di, basic_block bb, enum cdi_direction reverse)
{
/* We never call this with bb==EXIT_BLOCK_PTR (ENTRY_BLOCK_PTR if REVERSE). */
/* We call this _only_ if bb is not already visited. */
@ -321,9 +313,7 @@ calc_dfs_tree_nonrec (di, bb, reverse)
because there may be nodes from which the EXIT_BLOCK is unreachable. */
static void
calc_dfs_tree (di, reverse)
struct dom_info *di;
enum cdi_direction reverse;
calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse)
{
/* The first block is the ENTRY_BLOCK (or EXIT_BLOCK if REVERSE). */
basic_block begin = reverse ? EXIT_BLOCK_PTR : ENTRY_BLOCK_PTR;
@ -364,9 +354,7 @@ calc_dfs_tree (di, reverse)
from V to that root. */
static void
compress (di, v)
struct dom_info *di;
TBB v;
compress (struct dom_info *di, TBB v)
{
/* Btw. It's not worth to unrecurse compress() as the depth is usually not
greater than 5 even for huge graphs (I've not seen call depth > 4).
@ -386,9 +374,7 @@ compress (di, v)
value on the path from V to the root. */
static inline TBB
eval (di, v)
struct dom_info *di;
TBB v;
eval (struct dom_info *di, TBB v)
{
/* The representant of the set V is in, also called root (as the set
representation is a tree). */
@ -417,9 +403,7 @@ eval (di, v)
of W. */
static void
link_roots (di, v, w)
struct dom_info *di;
TBB v, w;
link_roots (struct dom_info *di, TBB v, TBB w)
{
TBB s = w;
@ -461,9 +445,7 @@ link_roots (di, v, w)
On return the immediate dominator to node V is in di->dom[V]. */
static void
calc_idoms (di, reverse)
struct dom_info *di;
enum cdi_direction reverse;
calc_idoms (struct dom_info *di, enum cdi_direction reverse)
{
TBB v, w, k, par;
basic_block en_block;
@ -557,8 +539,7 @@ calc_idoms (di, reverse)
immediate resp. all dominators). */
dominance_info
calculate_dominance_info (reverse)
enum cdi_direction reverse;
calculate_dominance_info (enum cdi_direction reverse)
{
struct dom_info di;
dominance_info info;
@ -596,8 +577,7 @@ calculate_dominance_info (reverse)
/* Free dominance information. */
void
free_dominance_info (info)
dominance_info info;
free_dominance_info (dominance_info info)
{
basic_block bb;
@ -616,9 +596,7 @@ free_dominance_info (info)
/* Return the immediate dominator of basic block BB. */
basic_block
get_immediate_dominator (dom, bb)
dominance_info dom;
basic_block bb;
get_immediate_dominator (dominance_info dom, basic_block bb)
{
return et_forest_node_value (dom->forest,
et_forest_parent (dom->forest,
@ -628,9 +606,7 @@ get_immediate_dominator (dom, bb)
/* Set the immediate dominator of the block possibly removing
existing edge. NULL can be used to remove any edge. */
inline void
set_immediate_dominator (dom, bb, dominated_by)
dominance_info dom;
basic_block bb, dominated_by;
set_immediate_dominator (dominance_info dom, basic_block bb, basic_block dominated_by)
{
void *aux_bb_node;
et_forest_node_t bb_node = BB_NODE (dom, bb);
@ -649,10 +625,7 @@ set_immediate_dominator (dom, bb, dominated_by)
/* Store all basic blocks dominated by BB into BBS and return their number. */
int
get_dominated_by (dom, bb, bbs)
dominance_info dom;
basic_block bb;
basic_block **bbs;
get_dominated_by (dominance_info dom, basic_block bb, basic_block **bbs)
{
int n, i;
@ -665,10 +638,7 @@ get_dominated_by (dom, bb, bbs)
/* Redirect all edges pointing to BB to TO. */
void
redirect_immediate_dominators (dom, bb, to)
dominance_info dom;
basic_block bb;
basic_block to;
redirect_immediate_dominators (dominance_info dom, basic_block bb, basic_block to)
{
et_forest_node_t *bbs = xmalloc (n_basic_blocks * sizeof (basic_block));
et_forest_node_t node = BB_NODE (dom, bb);
@ -686,10 +656,7 @@ redirect_immediate_dominators (dom, bb, to)
/* Find first basic block in the tree dominating both BB1 and BB2. */
basic_block
nearest_common_dominator (dom, bb1, bb2)
dominance_info dom;
basic_block bb1;
basic_block bb2;
nearest_common_dominator (dominance_info dom, basic_block bb1, basic_block bb2)
{
if (!bb1)
return bb2;
@ -704,18 +671,14 @@ nearest_common_dominator (dom, bb1, bb2)
/* Return TRUE in case BB1 is dominated by BB2. */
bool
dominated_by_p (dom, bb1, bb2)
dominance_info dom;
basic_block bb1;
basic_block bb2;
dominated_by_p (dominance_info dom, basic_block bb1, basic_block bb2)
{
return nearest_common_dominator (dom, bb1, bb2) == bb2;
}
/* Verify invariants of dominator structure. */
void
verify_dominators (dom)
dominance_info dom;
verify_dominators (dominance_info dom)
{
int err = 0;
basic_block bb;
@ -738,9 +701,7 @@ verify_dominators (dom)
/* Recount dominator of BB. */
basic_block
recount_dominator (dom, bb)
dominance_info dom;
basic_block bb;
recount_dominator (dominance_info dom, basic_block bb)
{
basic_block dom_bb = NULL;
edge e;
@ -757,10 +718,7 @@ recount_dominator (dom, bb)
/* Iteratively recount dominators of BBS. The change is supposed to be local
and not to grow further. */
void
iterate_fix_dominators (dom, bbs, n)
dominance_info dom;
basic_block *bbs;
int n;
iterate_fix_dominators (dominance_info dom, basic_block *bbs, int n)
{
int i, changed = 1;
basic_block old_dom, new_dom;
@ -782,9 +740,7 @@ iterate_fix_dominators (dom, bbs, n)
}
void
add_to_dominance_info (dom, bb)
dominance_info dom;
basic_block bb;
add_to_dominance_info (dominance_info dom, basic_block bb)
{
VARRAY_GROW (dom->varray, last_basic_block + 3);
#ifdef ENABLE_CHECKING
@ -795,17 +751,14 @@ add_to_dominance_info (dom, bb)
}
void
delete_from_dominance_info (dom, bb)
dominance_info dom;
basic_block bb;
delete_from_dominance_info (dominance_info dom, basic_block bb)
{
et_forest_remove_node (dom->forest, BB_NODE (dom, bb));
SET_BB_NODE (dom, bb, NULL);
}
void
debug_dominance_info (dom)
dominance_info dom;
debug_dominance_info (dominance_info dom)
{
basic_block bb, bb2;
FOR_EACH_BB (bb)

View File

@ -1,5 +1,5 @@
/* Dwarf2 assembler output helper routines.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@ -45,9 +45,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
to print a newline, since the caller may want to add a comment. */
void
dw2_assemble_integer (size, x)
int size;
rtx x;
dw2_assemble_integer (int size, rtx x)
{
const char *op = integer_asm_op (size, FALSE);
@ -71,7 +69,7 @@ dw2_asm_output_data (int size, unsigned HOST_WIDE_INT value,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
if (size * 8 < HOST_BITS_PER_WIDE_INT)
@ -100,7 +98,7 @@ dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifdef ASM_OUTPUT_DWARF_DELTA
@ -132,7 +130,7 @@ dw2_asm_output_offset (int size, const char *label,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifdef ASM_OUTPUT_DWARF_OFFSET
@ -160,7 +158,7 @@ dw2_asm_output_pcrel (int size ATTRIBUTE_UNUSED,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifdef ASM_OUTPUT_DWARF_PCREL
@ -189,7 +187,7 @@ dw2_asm_output_addr (int size, const char *label,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label));
@ -211,7 +209,7 @@ dw2_asm_output_addr_rtx (int size, rtx addr,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
dw2_assemble_integer (size, addr);
@ -275,8 +273,7 @@ dw2_asm_output_nstring (const char *str, size_t orig_len,
/* Return the size of an unsigned LEB128 quantity. */
int
size_of_uleb128 (value)
unsigned HOST_WIDE_INT value;
size_of_uleb128 (unsigned HOST_WIDE_INT value)
{
int size = 0;
@ -293,8 +290,7 @@ size_of_uleb128 (value)
/* Return the size of a signed LEB128 quantity. */
int
size_of_sleb128 (value)
HOST_WIDE_INT value;
size_of_sleb128 (HOST_WIDE_INT value)
{
int size = 0, byte;
@ -315,8 +311,7 @@ size_of_sleb128 (value)
include leb128. */
int
size_of_encoded_value (encoding)
int encoding;
size_of_encoded_value (int encoding)
{
if (encoding == DW_EH_PE_omit)
return 0;
@ -338,8 +333,7 @@ size_of_encoded_value (encoding)
/* Yield a name for a given pointer encoding. */
const char *
eh_data_format_name (format)
int format;
eh_data_format_name (int format)
{
#if HAVE_DESIGNATED_INITIALIZERS
#define S(p, v) [p] = v,
@ -501,7 +495,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifdef HAVE_AS_LEB128
@ -562,7 +556,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifdef HAVE_AS_LEB128
@ -653,7 +647,7 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifdef HAVE_AS_LEB128
@ -675,8 +669,8 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
va_end (ap);
}
static rtx dw2_force_const_mem PARAMS ((rtx));
static int dw2_output_indirect_constant_1 PARAMS ((splay_tree_node, void *));
static rtx dw2_force_const_mem (rtx);
static int dw2_output_indirect_constant_1 (splay_tree_node, void *);
static GTY((param1_is (char *), param2_is (tree))) splay_tree indirect_pool;
@ -694,8 +688,7 @@ static GTY(()) int dw2_const_labelno;
"near" the function in any interesting sense. */
static rtx
dw2_force_const_mem (x)
rtx x;
dw2_force_const_mem (rtx x)
{
splay_tree_node node;
const char *str;
@ -755,9 +748,8 @@ dw2_force_const_mem (x)
splay_tree_foreach. Emit one queued constant to memory. */
static int
dw2_output_indirect_constant_1 (node, data)
splay_tree_node node;
void* data ATTRIBUTE_UNUSED;
dw2_output_indirect_constant_1 (splay_tree_node node,
void *data ATTRIBUTE_UNUSED)
{
const char *sym;
rtx sym_ref;
@ -775,7 +767,7 @@ dw2_output_indirect_constant_1 (node, data)
/* Emit the constants queued through dw2_force_const_mem. */
void
dw2_output_indirect_constants ()
dw2_output_indirect_constants (void)
{
if (indirect_pool)
splay_tree_foreach (indirect_pool, dw2_output_indirect_constant_1, NULL);
@ -789,7 +781,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr,
{
int size;
va_list ap;
va_start (ap, comment);
size = size_of_encoded_value (encoding);

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
/* dwarf2out.h - Various declarations for functions found in dwarf2out.c
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
This file is part of GCC.
@ -18,11 +19,11 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
extern void dwarf2out_decl PARAMS ((tree));
extern void dwarf2out_frame_debug PARAMS ((rtx));
extern void dwarf2out_decl (tree);
extern void dwarf2out_frame_debug (rtx);
extern void debug_dwarf PARAMS ((void));
extern void debug_dwarf (void);
struct die_struct;
extern void debug_dwarf_die PARAMS ((struct die_struct *));
extern void dwarf2out_set_demangle_name_func PARAMS ((const char *(*) (const char *)));
extern void dwarf2out_add_library_unit_info PARAMS ((const char *, const char *));
extern void debug_dwarf_die (struct die_struct *);
extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
extern void dwarf2out_add_library_unit_info (const char *, const char *);

File diff suppressed because it is too large Load Diff