aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-02-19 01:27:00 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-02-18 20:27:00 -0500
commitc8d8ed65a5366c075cce9ee64e871d815fd1f33d (patch)
tree4e76f0295c3501797dbd329a63105f6a7c70f1e9 /gcc/flow.c
parent1f51a99218e6eb4214e6a40e9937a7cc419f1e95 (diff)
downloadgcc-c8d8ed65a5366c075cce9ee64e871d815fd1f33d.zip
gcc-c8d8ed65a5366c075cce9ee64e871d815fd1f33d.tar.gz
gcc-c8d8ed65a5366c075cce9ee64e871d815fd1f33d.tar.bz2
bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.
* bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned. * cppinit.c (new_pending_define): Add cast to avoid warning. * expmed.c (extract_bit_field): Likewise. * flow.c (enum reorder_skip_type): New type. (skip_insns_between_blcok): New it. Rework to avoid warning about possibly undefined variable. * function.c (assign_parms): Make thisparm_boundary unsigned. * genrecog.c (write_switch): Cast XWINT result to int. * lcm.c: Many static fcns and vars now #ifdef OPTIMIZE_MODE_SWITCHING. * mips-tfile.c (init_file): Make two versions of FDR intializer: one for MIPS and one for Alpha. (get_tag, copy_object): Add casts to avoid warnings. * optabs.c (init_one_libfunc): Cast NAME to (char *). * reload.c (find_reloads): Make TYPE enum reload_type. * sbitmap.c (dump_sbitmap): J is unsigned; don't use "1L". * unroll.c (unroll_loop): Initialize UNROLL_NUMBER. * varasm.c (compare_constant_1): Add cast to avoid warning. * config/alpha/alpha.c (alpha_emit_xfloating_libcall): Cast FUNC to (char *). (alpha_expand_unaligned_load, alpha_expand_unaligned_store): Cast switch operand of size to int. (alpha_expand_epilogue): Always initialize fp_offset and sa_reg. * config/alpha/alpha.h (INITIAL_ELIMINATION_OFFSET): Add abort in unhandled case. From-SVN: r32060
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c62
1 files changed, 35 insertions, 27 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index b56fd98..c1ec515 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -7072,9 +7072,8 @@ typedef struct reorder_block_def {
static int reorder_index;
static basic_block reorder_last_visited;
-#define REORDER_SKIP_BEFORE 0x1
-#define REORDER_SKIP_AFTER 0x2
-#define REORDER_SKIP_BLOCK_END 0x3
+enum reorder_skip_type {REORDER_SKIP_BEFORE, REORDER_SKIP_AFTER,
+ REORDER_SKIP_BLOCK_END};
/* Skip over insns BEFORE or AFTER BB which are typically associated with
basic block BB. */
@@ -7082,7 +7081,7 @@ static basic_block reorder_last_visited;
static rtx
skip_insns_between_block (bb, skip_type)
basic_block bb;
- int skip_type;
+ enum reorder_skip_type skip_type;
{
rtx insn, last_insn;
@@ -7090,6 +7089,7 @@ skip_insns_between_block (bb, skip_type)
{
if (bb == ENTRY_BLOCK_PTR)
return 0;
+
last_insn = bb->head;
for (insn = PREV_INSN (bb->head);
insn && insn != BASIC_BLOCK (bb->index - 1)->end;
@@ -7097,6 +7097,7 @@ skip_insns_between_block (bb, skip_type)
{
if (NEXT_INSN (insn) != last_insn)
break;
+
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_END
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK
@@ -7106,8 +7107,8 @@ skip_insns_between_block (bb, skip_type)
break;
}
}
- else if (skip_type == REORDER_SKIP_AFTER
- || skip_type == REORDER_SKIP_BLOCK_END)
+
+ else
{
last_insn = bb->end;
@@ -7128,6 +7129,7 @@ skip_insns_between_block (bb, skip_type)
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)))
continue;
+
if (GET_CODE (insn) == CODE_LABEL
&& GET_CODE (NEXT_INSN (insn)) == JUMP_INSN
&& (GET_CODE (PATTERN (NEXT_INSN (insn))) == ADDR_VEC
@@ -7139,34 +7141,40 @@ skip_insns_between_block (bb, skip_type)
}
break;
}
- }
- if (skip_type == REORDER_SKIP_BLOCK_END)
- {
- int found_block_end = 0;
- for (; insn; last_insn = insn, insn = NEXT_INSN (insn))
+ if (skip_type == REORDER_SKIP_BLOCK_END)
{
- if (bb->index + 1 != n_basic_blocks
- && insn == BASIC_BLOCK (bb->index + 1)->head)
- break;
+ int found_block_end = 0;
- if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
+ for (; insn; last_insn = insn, insn = NEXT_INSN (insn))
{
- found_block_end = 1;
- continue;
+ if (bb->index + 1 != n_basic_blocks
+ && insn == BASIC_BLOCK (bb->index + 1)->head)
+ break;
+
+ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
+ {
+ found_block_end = 1;
+ continue;
+ }
+
+ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
+ continue;
+
+ if (GET_CODE (insn) == NOTE
+ && NOTE_LINE_NUMBER (insn) >= 0
+ && NEXT_INSN (insn)
+ && (NOTE_LINE_NUMBER (NEXT_INSN (insn))
+ == NOTE_INSN_BLOCK_END))
+ continue;
+ break;
}
- if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
- continue;
- if (GET_CODE (insn) == NOTE
- && NOTE_LINE_NUMBER (insn) >= 0
- && NEXT_INSN (insn)
- && NOTE_LINE_NUMBER (NEXT_INSN (insn)) == NOTE_INSN_BLOCK_END)
- continue;
- break;
+
+ if (! found_block_end)
+ last_insn = 0;
}
- if (! found_block_end)
- last_insn = 0;
}
+
return last_insn;
}