From: Kaveh R. Ghazi Date: Mon, 21 Feb 2000 23:27:01 +0000 (+0000) Subject: defaults.h (ASM_OUTPUT_ASCII): Constify a char*. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47ee9bcb614d58ea60d228bb11563d7df4d279ec;p=gcc.git defaults.h (ASM_OUTPUT_ASCII): Constify a char*. * defaults.h (ASM_OUTPUT_ASCII): Constify a char*. * flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain, fixup_reorder_chain, skip_insns_between_block): Add static prototypes. (life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS. * haifa-sched.c (rank_for_schedule): Don't cast away const-ness. * integrate.c (compare_blocks, find_block): Likewise. * rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2. * rtl.h (set_file_and_line_for_stmt): Constify a char*. * stmt.c (stmt_status, set_file_and_line_for_stmt, expand_asm_operands): Likewise. From-SVN: r32094 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6e58978787..8ad693acac6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2000-02-21 Kaveh R. Ghazi + + * defaults.h (ASM_OUTPUT_ASCII): Constify a char*. + + * flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain, + fixup_reorder_chain, skip_insns_between_block): Add static prototypes. + (life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS. + + * haifa-sched.c (rank_for_schedule): Don't cast away const-ness. + + * integrate.c (compare_blocks, find_block): Likewise. + + * rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2. + + * rtl.h (set_file_and_line_for_stmt): Constify a char*. + + * stmt.c (stmt_status, set_file_and_line_for_stmt, + expand_asm_operands): Likewise. + Mon Feb 21 17:06:27 2000 Jason Eckhardt * predict.c (estimate_probability): Added the pointer heuristic to diff --git a/gcc/defaults.h b/gcc/defaults.h index 0018bc15917..e421e1295a2 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -66,11 +66,11 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ do { \ FILE *_hide_asm_out_file = (MYFILE); \ - unsigned char *_hide_p = (unsigned char *) (MYSTRING); \ + const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ int _hide_thissize = (MYLENGTH); \ { \ FILE *asm_out_file = _hide_asm_out_file; \ - unsigned char *p = _hide_p; \ + const unsigned char *p = _hide_p; \ int thissize = _hide_thissize; \ int i; \ fprintf (asm_out_file, "\t.ascii \""); \ diff --git a/gcc/flow.c b/gcc/flow.c index c1ec515d8ba..a7217dbf486 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -351,6 +351,10 @@ static void flow_loop_tree_node_add PARAMS ((struct loop *, struct loop *)); static void flow_loops_tree_build PARAMS ((struct loops *)); static int flow_loop_level_compute PARAMS ((struct loop *, int)); static int flow_loops_level_compute PARAMS ((struct loops *)); +static basic_block get_common_dest PARAMS ((basic_block, basic_block)); +static basic_block chain_reorder_blocks PARAMS ((edge, basic_block)); +static void make_reorder_chain PARAMS ((basic_block)); +static void fixup_reorder_chain PARAMS ((void)); /* This function is always defined so it can be called from the debugger, and it is declared extern so we don't get warnings about @@ -2454,8 +2458,8 @@ life_analysis (f, nregs, file, remove_dead_code) FILE *file; int remove_dead_code; { - register int i; #ifdef ELIMINABLE_REGS + register int i; static struct {int from, to; } eliminables[] = ELIMINABLE_REGS; #endif int flags; @@ -7075,6 +7079,9 @@ static basic_block reorder_last_visited; enum reorder_skip_type {REORDER_SKIP_BEFORE, REORDER_SKIP_AFTER, REORDER_SKIP_BLOCK_END}; +static rtx skip_insns_between_block PARAMS ((basic_block, + enum reorder_skip_type)); + /* Skip over insns BEFORE or AFTER BB which are typically associated with basic block BB. */ diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index be7dc48f3a0..939ddab2715 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -3978,8 +3978,8 @@ rank_for_schedule (x, y) const PTR x; const PTR y; { - rtx tmp = *(rtx *)y; - rtx tmp2 = *(rtx *)x; + rtx tmp = *(const rtx *)y; + rtx tmp2 = *(const rtx *)x; rtx link; int tmp_class, tmp2_class, depend_count1, depend_count2; int val, priority_val, spec_val, prob_val, weight_val; diff --git a/gcc/integrate.c b/gcc/integrate.c index cea4bda7874..b3a22a90a16 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -521,8 +521,8 @@ compare_blocks (v1, v2) const PTR v1; const PTR v2; { - tree b1 = *((tree *) v1); - tree b2 = *((tree *) v2); + tree b1 = *((const tree *) v1); + tree b2 = *((const tree *) v2); return ((char *) BLOCK_ABSTRACT_ORIGIN (b1) - (char *) BLOCK_ABSTRACT_ORIGIN (b2)); @@ -536,10 +536,10 @@ find_block (v1, v2) const PTR v1; const PTR v2; { - tree b1 = (tree) v1; - tree b2 = *((tree *) v2); + const union tree_node *b1 = (const union tree_node *) v1; + tree b2 = *((const tree *) v2); - return ((char *) b1 - (char *) BLOCK_ABSTRACT_ORIGIN (b2)); + return ((const char *) b1 - (char *) BLOCK_ABSTRACT_ORIGIN (b2)); } /* Integrate the procedure defined by FNDECL. Note that this function diff --git a/gcc/rtl.c b/gcc/rtl.c index 16e9a9e276b..242db5bb83b 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -258,7 +258,7 @@ const char * const reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", " "REG_EH_RETHROW", "REG_SAVE_NOTE" }; static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...)) - ATTRIBUTE_NORETURN; + ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN; static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN; static void read_name PARAMS ((char *, FILE *)); static const char *trim_filename PARAMS ((const char *)); diff --git a/gcc/rtl.h b/gcc/rtl.h index f95b04bf61d..d3ca9b06fc9 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1517,7 +1517,7 @@ extern int operands_match_p PARAMS ((rtx, rtx)); extern int safe_from_earlyclobber PARAMS ((rtx, rtx)); /* In stmt.c */ -extern void set_file_and_line_for_stmt PARAMS ((char *, int)); +extern void set_file_and_line_for_stmt PARAMS ((const char *, int)); extern void expand_null_return PARAMS ((void)); extern void emit_jump PARAMS ((rtx)); extern int preserve_subexpressions_p PARAMS ((void)); diff --git a/gcc/stmt.c b/gcc/stmt.c index 95ee9809fde..7c4c563127d 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -373,7 +373,7 @@ struct stmt_status /* Filename and line number of last line-number note, whether we actually emitted it or not. */ - char *x_emit_filename; + const char *x_emit_filename; int x_emit_lineno; struct goto_fixup *x_goto_fixup_chain; @@ -639,7 +639,7 @@ in_control_zone_p () /* Record the current file and line. Called from emit_line_note. */ void set_file_and_line_for_stmt (file, line) - char *file; + const char *file; int line; { /* If we're outputting an inline function, and we add a line note, @@ -1351,7 +1351,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) nclobbers = 0; for (tail = clobbers; tail; tail = TREE_CHAIN (tail)) { - char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); + const char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); i = decode_reg_name (regname); if (i >= 0 || i == -4) @@ -1379,7 +1379,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) tmp = outputs; while (tmp) { - char *constraint = TREE_STRING_POINTER (TREE_PURPOSE (tmp)); + const char *constraint = TREE_STRING_POINTER (TREE_PURPOSE (tmp)); if (n_occurrences (',', constraint) != nalternatives) { @@ -1797,7 +1797,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) for (tail = clobbers; tail; tail = TREE_CHAIN (tail)) { - char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); + const char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); int j = decode_reg_name (regname); if (j < 0)