dwarf2out.c (dwarf2out_line): Constify `lastfile'.

* dwarf2out.c (dwarf2out_line): Constify `lastfile'.
        * except.c (expand_rethrow): Remove unused variable.
        * expr.c (do_jump_by_parts_greater_rtx): Likewise.
        * flow.c (replace_insns): Likewise.
        (create_edge_list, verify_edge_list): Likewise.
        * gcse.c (cprop_cc0_jump): Protect declaration with HAVE_cc0.

        * genemit.c (gen_expand): Only emit `operands[N]' decl if there
        is special code to run.
        (main): Don't define operands to emit_operand.
        * genrecog.c (main): Don't emit an empty peephole2_insn function.

        * rtl.h (NOTE_BASIC_BLOCK): Use X0BBDEF.

        * alpha/alpha.h (normal_memory_operand): Declare.
        (reg_no_subreg_operand): Declare.
        * alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use HOST_WIDE_INT_PRINT_DEC.

From-SVN: r29061
This commit is contained in:
Richard Henderson 1999-09-02 10:29:25 -07:00
parent ec4f972f6c
commit e2bef702d6
10 changed files with 63 additions and 53 deletions

View file

@ -2549,6 +2549,8 @@ extern int call_operand ();
extern int reg_or_cint_operand ();
extern int hard_fp_register_operand ();
extern int reg_not_elim_operand ();
extern int normal_memory_operand ();
extern int reg_no_subreg_operand ();
extern void alpha_set_memflags ();
extern int aligned_memory_operand ();
extern void get_aligned_mem ();

View file

@ -415,22 +415,27 @@ void FN () \
/* Write the extra assembler code needed to declare an object properly. */
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
putc ('\n', FILE); \
size_directive_output = 0; \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \
fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
} \
ASM_OUTPUT_LABEL(FILE, NAME); \
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
HOST_WIDE_INT size; \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
putc ('\n', FILE); \
size_directive_output = 0; \
if (!flag_inhibit_size_directive \
&& DECL_SIZE (DECL) \
&& (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \
fputc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size); \
fputc ('\n', FILE); \
} \
ASM_OUTPUT_LABEL(FILE, NAME); \
} while (0)
/* Output the size directive for a decl in rest_of_decl_compilation
@ -440,22 +445,24 @@ void FN () \
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \
char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, name); \
putc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \
int_size_in_bytes (TREE_TYPE (DECL))); \
putc ('\n', FILE); \
} \
} while (0)
do { \
char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
HOST_WIDE_INT size; \
if (!flag_inhibit_size_directive \
&& DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output \
&& (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, name); \
fputc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size); \
fputc ('\n', FILE); \
} \
} while (0)
/* A table of bytes codes used by the ASM_OUTPUT_ASCII and
ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table

View file

@ -9885,7 +9885,7 @@ dwarf2out_line (filename, line)
if (DWARF2_ASM_LINE_DEBUG_INFO)
{
static char *lastfile;
static const char *lastfile;
/* Emit the .file and .loc directives understood by GNU as. */
if (lastfile == 0 || strcmp (filename, lastfile))

View file

@ -1907,7 +1907,7 @@ expand_rethrow (label)
else
if (flag_new_exceptions)
{
rtx insn, val;
rtx insn;
int region;
if (label == NULL_RTX)
label = last_rethrow_symbol;

View file

@ -9012,7 +9012,6 @@ do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true
/* Compare a word at a time, high order first. */
for (i = 0; i < nwords; i++)
{
rtx comp;
rtx op0_word, op1_word;
if (WORDS_BIG_ENDIAN)

View file

@ -6080,9 +6080,8 @@ replace_insns (first, last, first_new, notes)
rtx first, last, first_new, notes;
{
rtx stop = NEXT_INSN (last);
rtx last_new;
rtx curr, next;
rtx prev = PREV_INSN (first);
rtx last_new, curr;
int i;
if (notes == NULL_RTX)
@ -6356,8 +6355,7 @@ create_edge_list ()
struct edge_list *elist;
edge e;
int num_edges;
int x,y;
int_list_ptr ptr;
int x;
int block_count;
block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */
@ -6451,8 +6449,6 @@ verify_edge_list (f, elist)
struct edge_list *elist;
{
int x, pred, succ, index;
int_list_ptr ptr;
int flawed = 0;
edge e;
for (x = 0; x < n_basic_blocks; x++)

View file

@ -577,7 +577,9 @@ static void find_used_regs PROTO ((rtx));
static int try_replace_reg PROTO ((rtx, rtx, rtx));
static struct expr *find_avail_set PROTO ((int, rtx));
static int cprop_jump PROTO((rtx, rtx, struct reg_use *, rtx));
#ifdef HAVE_cc0
static int cprop_cc0_jump PROTO((rtx, struct reg_use *, rtx));
#endif
static int cprop_insn PROTO ((rtx, int));
static int cprop PROTO ((int));
static int one_cprop_pass PROTO ((int, int));

View file

@ -459,9 +459,6 @@ gen_expand (expand)
printf (" rtx operand%d;\n", i);
for (; i <= max_scratch_opno; i++)
printf (" rtx operand%d;\n", i);
if (operands > 0 || max_dup_opno >= 0 || max_scratch_opno >= 0)
printf (" rtx operands[%d];\n",
MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
printf (" rtx _val = 0;\n");
printf (" start_sequence ();\n");
@ -473,9 +470,13 @@ gen_expand (expand)
So copy the operand values there before executing it. */
if (XSTR (expand, 3) && *XSTR (expand, 3))
{
printf (" {\n");
if (operands > 0 || max_dup_opno >= 0 || max_scratch_opno >= 0)
printf (" rtx operands[%d];\n",
MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
/* Output code to copy the arguments into `operands'. */
for (i = 0; i < operands; i++)
printf (" operands[%d] = operand%d;\n", i, i);
printf (" operands[%d] = operand%d;\n", i, i);
/* Output the special code to be executed before the sequence
is generated. */
@ -486,12 +487,13 @@ gen_expand (expand)
if (XVEC (expand, 1) != 0)
{
for (i = 0; i < operands; i++)
printf (" operand%d = operands[%d];\n", i, i);
printf (" operand%d = operands[%d];\n", i, i);
for (; i <= max_dup_opno; i++)
printf (" operand%d = operands[%d];\n", i, i);
printf (" operand%d = operands[%d];\n", i, i);
for (; i <= max_scratch_opno; i++)
printf (" operand%d = operands[%d];\n", i, i);
printf (" operand%d = operands[%d];\n", i, i);
}
printf (" }\n");
}
/* Output code to construct the rtl for the instruction bodies.
@ -815,7 +817,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"resource.h\"\n");
printf ("#include \"reload.h\"\n\n");
printf ("extern rtx recog_operand[];\n");
printf ("#define operands emit_operand\n\n");
printf ("#define FAIL return (end_sequence (), _val)\n");
printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n");

View file

@ -1979,9 +1979,12 @@ from the machine description file `md'. */\n\n");
break_out_subroutines (split_tree, SPLIT, 1);
write_subroutine (split_tree.first, SPLIT);
next_subroutine_number = 0;
break_out_subroutines (peephole2_tree, PEEPHOLE2, 1);
write_subroutine (peephole2_tree.first, PEEPHOLE2);
if (peephole2_tree.first)
{
next_subroutine_number = 0;
break_out_subroutines (peephole2_tree, PEEPHOLE2, 1);
write_subroutine (peephole2_tree.first, PEEPHOLE2);
}
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);

View file

@ -476,7 +476,7 @@ extern const char * const reg_note_name[];
#define NOTE_EH_HANDLER(INSN) X0INT(INSN, 3)
#define NOTE_RANGE_INFO(INSN) X0EXP(INSN, 3)
#define NOTE_LIVE_INFO(INSN) X0EXP(INSN, 3)
#define NOTE_BASIC_BLOCK(INSN) X0EXP(INSN, 3)
#define NOTE_BASIC_BLOCK(INSN) X0BBDEF(INSN, 3)
/* If the NOTE_BLOCK_NUMBER field gets a -1, it means create a new
block node for a live range block. */