flow.c (commit_one_edge_insertion): Be prepared for a return insn to be inserted on the edge with a normal jump.
* flow.c (commit_one_edge_insertion): Be prepared for a return insn to be inserted on the edge with a normal jump. * jump.c (jump_optimize_1): Don't look to create return isns. * flow.c (flow_delete_insn): Don't adjust reference count of notes. * jump.c (jump_optimize_1): Likewise. (returnjump_p): Verify the argument is a JUMP_INSN. * rtl.def (NOTE): Add 5th element for NOTE_INSN_DELETED_LABEL. From-SVN: r33950
This commit is contained in:
parent
23568fa021
commit
f5540cd4aa
@ -1,3 +1,14 @@
|
||||
2000-05-16 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* flow.c (commit_one_edge_insertion): Be prepared for a return
|
||||
insn to be inserted on the edge with a normal jump.
|
||||
* jump.c (jump_optimize_1): Don't look to create return isns.
|
||||
|
||||
* flow.c (flow_delete_insn): Don't adjust reference count of notes.
|
||||
* jump.c (jump_optimize_1): Likewise.
|
||||
(returnjump_p): Verify the argument is a JUMP_INSN.
|
||||
* rtl.def (NOTE): Add 5th element for NOTE_INSN_DELETED_LABEL.
|
||||
|
||||
2000-05-16 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* config/m32r/m32r.c (small_insn_p): Use INSN_P() to replace
|
||||
@ -307,23 +318,23 @@ Fri May 12 19:03:58 2000 Philippe De Muyter <phdm@macqel.be>
|
||||
|
||||
2000-05-12 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* fixinc/fixfixes.c (IO_use_fix, IO_defn_fix, CTRL_use_fix,
|
||||
CTRL_defn_fix): Delete.
|
||||
(fix_char_macro_defines, fix_char_macro_uses): Rename to
|
||||
char_macro_def_fix and char_macro_use_fix, respectively. Put
|
||||
them into the FIXUP_TABLE. Get the string to search for from
|
||||
a c_fix_arg.
|
||||
* fixinc/fixfixes.c (IO_use_fix, IO_defn_fix, CTRL_use_fix,
|
||||
CTRL_defn_fix): Delete.
|
||||
(fix_char_macro_defines, fix_char_macro_uses): Rename to
|
||||
char_macro_def_fix and char_macro_use_fix, respectively. Put
|
||||
them into the FIXUP_TABLE. Get the string to search for from
|
||||
a c_fix_arg.
|
||||
|
||||
(format_write): New function.
|
||||
(format_fix): Use it.
|
||||
(format_write): New function.
|
||||
(format_fix): Use it.
|
||||
|
||||
(FIX_PROC_HEAD): Constify text parameter.
|
||||
(machine_name_fix): Constify all char *s.
|
||||
* fixtests.c (skip_quote): Remove double static.
|
||||
(FIX_PROC_HEAD): Constify text parameter.
|
||||
(machine_name_fix): Constify all char *s.
|
||||
* fixtests.c (skip_quote): Remove double static.
|
||||
|
||||
* inclhack.def (io_def_quotes, io_use_quotes, ctrl_def_quotes,
|
||||
ctrl_use_quotes): Update for new scheme.
|
||||
* fixincl.x: Regenerate.
|
||||
* inclhack.def (io_def_quotes, io_use_quotes, ctrl_def_quotes,
|
||||
ctrl_use_quotes): Update for new scheme.
|
||||
* fixincl.x: Regenerate.
|
||||
|
||||
2000-05-12 Alexandre Oliva <aoliva@cygnus.com>
|
||||
|
||||
@ -492,9 +503,9 @@ Wed 10 May 09:36:47 2000 Neil Booth <NeilB@earthling.net>
|
||||
|
||||
Wed 10 May 09:08:30 2000 Neil Booth <NeilB@earthling.net>
|
||||
|
||||
* cpplex.c (_cpp_lex_line): Maintain PREV_WHITESPACE flag
|
||||
when removing escaped newlines. Reverse sense of test for
|
||||
escaped newline.
|
||||
* cpplex.c (_cpp_lex_line): Maintain PREV_WHITESPACE flag
|
||||
when removing escaped newlines. Reverse sense of test for
|
||||
escaped newline.
|
||||
|
||||
2000-05-09 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
@ -1206,17 +1217,17 @@ Thu May 4 09:45:12 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
MEM_COPY_ATTRIBUTES.
|
||||
|
||||
2000-05-03 Robert Lipe <robertlipe@usa.net>
|
||||
|
||||
* configure.in (i[34567]86-*-isc*) [tmake_file]: Add t-i386bare
|
||||
to suppress libgcc1.
|
||||
(i[34567]86-*-sco3.2v5*) Likewise.
|
||||
(i[34567]86-*-sco3.2v4*) Likewise.
|
||||
(i[34567]86-*-sco) Likewise.
|
||||
(i[34567]86-*-solaris2) Likewise.
|
||||
(i[34567]86-*-sysv5*) Likewise.
|
||||
(i[34567]86-*-sysv4*) Likewise.
|
||||
(i[34567]86-*-udk*) Likewise.
|
||||
(i[34567]86-*-sysv*) Likewise.
|
||||
|
||||
* configure.in (i[34567]86-*-isc*) [tmake_file]: Add t-i386bare
|
||||
to suppress libgcc1.
|
||||
(i[34567]86-*-sco3.2v5*) Likewise.
|
||||
(i[34567]86-*-sco3.2v4*) Likewise.
|
||||
(i[34567]86-*-sco) Likewise.
|
||||
(i[34567]86-*-solaris2) Likewise.
|
||||
(i[34567]86-*-sysv5*) Likewise.
|
||||
(i[34567]86-*-sysv4*) Likewise.
|
||||
(i[34567]86-*-udk*) Likewise.
|
||||
(i[34567]86-*-sysv*) Likewise.
|
||||
|
||||
2000-05-03 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
@ -1242,14 +1253,14 @@ Thu May 4 09:45:12 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
Wed May 3 21:01:46 2000 Jason Eckhardt <jle@cygnus.com>
|
||||
|
||||
* bb-reorder.c (struct reorder_block_def): Member succ removed.
|
||||
(REORDER_BLOCK_SUCC): Removed.
|
||||
(enum reorder_skip_type): Removed.
|
||||
(skip_insns_between_block): Renamed to skip_insns_after_block.
|
||||
Removed second argument. Removed dead code and cleaned up.
|
||||
(make_reorder_chain): Removed use of REORDER_BLOCK_SUCC.
|
||||
(reorder_basic_blocks): Remove use of REORDER_SKIP_AFTER. Removed
|
||||
second parameter to skip_insns_after_block.
|
||||
* bb-reorder.c (struct reorder_block_def): Member succ removed.
|
||||
(REORDER_BLOCK_SUCC): Removed.
|
||||
(enum reorder_skip_type): Removed.
|
||||
(skip_insns_between_block): Renamed to skip_insns_after_block.
|
||||
Removed second argument. Removed dead code and cleaned up.
|
||||
(make_reorder_chain): Removed use of REORDER_BLOCK_SUCC.
|
||||
(reorder_basic_blocks): Remove use of REORDER_SKIP_AFTER. Removed
|
||||
second parameter to skip_insns_after_block.
|
||||
|
||||
Wed May 3 13:29:54 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
|
62
gcc/flow.c
62
gcc/flow.c
@ -1598,7 +1598,7 @@ static void
|
||||
commit_one_edge_insertion (e)
|
||||
edge e;
|
||||
{
|
||||
rtx before = NULL_RTX, after = NULL_RTX, insns, tmp;
|
||||
rtx before = NULL_RTX, after = NULL_RTX, insns, tmp, last;
|
||||
basic_block bb;
|
||||
|
||||
/* Pull the insns off the edge now since the edge might go away. */
|
||||
@ -1675,37 +1675,38 @@ commit_one_edge_insertion (e)
|
||||
emit_insns_before (insns, before);
|
||||
if (before == bb->head)
|
||||
bb->head = insns;
|
||||
|
||||
last = prev_nonnote_insn (before);
|
||||
}
|
||||
else
|
||||
{
|
||||
rtx last = emit_insns_after (insns, after);
|
||||
last = emit_insns_after (insns, after);
|
||||
if (after == bb->end)
|
||||
{
|
||||
bb->end = last;
|
||||
|
||||
if (GET_CODE (last) == JUMP_INSN)
|
||||
{
|
||||
if (returnjump_p (last))
|
||||
{
|
||||
/* ??? Remove all outgoing edges from BB and add one
|
||||
for EXIT. This is not currently a problem because
|
||||
this only happens for the (single) epilogue, which
|
||||
already has a fallthru edge to EXIT. */
|
||||
|
||||
e = bb->succ;
|
||||
if (e->dest != EXIT_BLOCK_PTR
|
||||
|| e->succ_next != NULL
|
||||
|| (e->flags & EDGE_FALLTHRU) == 0)
|
||||
abort ();
|
||||
e->flags &= ~EDGE_FALLTHRU;
|
||||
|
||||
emit_barrier_after (last);
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
bb->end = last;
|
||||
}
|
||||
|
||||
if (returnjump_p (last))
|
||||
{
|
||||
/* ??? Remove all outgoing edges from BB and add one for EXIT.
|
||||
This is not currently a problem because this only happens
|
||||
for the (single) epilogue, which already has a fallthru edge
|
||||
to EXIT. */
|
||||
|
||||
e = bb->succ;
|
||||
if (e->dest != EXIT_BLOCK_PTR
|
||||
|| e->succ_next != NULL
|
||||
|| (e->flags & EDGE_FALLTHRU) == 0)
|
||||
abort ();
|
||||
e->flags &= ~EDGE_FALLTHRU;
|
||||
|
||||
emit_barrier_after (last);
|
||||
bb->end = last;
|
||||
|
||||
if (before)
|
||||
flow_delete_insn (before);
|
||||
}
|
||||
else if (GET_CODE (last) == JUMP_INSN)
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* Update the CFG for all queued instructions. */
|
||||
@ -2027,11 +2028,14 @@ flow_delete_insn (insn)
|
||||
|
||||
/* If deleting a jump, decrement the use count of the label. Deleting
|
||||
the label itself should happen in the normal course of block merging. */
|
||||
if (GET_CODE (insn) == JUMP_INSN && JUMP_LABEL (insn))
|
||||
if (GET_CODE (insn) == JUMP_INSN
|
||||
&& JUMP_LABEL (insn)
|
||||
&& GET_CODE (JUMP_LABEL (insn)) == CODE_LABEL)
|
||||
LABEL_NUSES (JUMP_LABEL (insn))--;
|
||||
|
||||
/* Also if deleting an insn that references a label. */
|
||||
else if ((note = find_reg_note (insn, REG_LABEL, NULL_RTX)) != NULL_RTX)
|
||||
else if ((note = find_reg_note (insn, REG_LABEL, NULL_RTX)) != NULL_RTX
|
||||
&& GET_CODE (XEXP (note, 0)) == CODE_LABEL)
|
||||
LABEL_NUSES (XEXP (note, 0))--;
|
||||
|
||||
return next;
|
||||
|
18
gcc/jump.c
18
gcc/jump.c
@ -231,11 +231,13 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan,
|
||||
|
||||
mark_all_labels (f, cross_jump);
|
||||
|
||||
/* Keep track of labels used from static data;
|
||||
they cannot ever be deleted. */
|
||||
/* Keep track of labels used from static data; we don't track them
|
||||
closely enough to delete them here, so make sure their reference
|
||||
count doesn't drop to zero. */
|
||||
|
||||
for (insn = forced_labels; insn; insn = XEXP (insn, 1))
|
||||
LABEL_NUSES (XEXP (insn, 0))++;
|
||||
if (GET_CODE (XEXP (insn, 0)) == CODE_LABEL)
|
||||
LABEL_NUSES (XEXP (insn, 0))++;
|
||||
|
||||
check_exception_handler_labels ();
|
||||
|
||||
@ -381,14 +383,6 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan,
|
||||
}
|
||||
}
|
||||
|
||||
/* If a jump references the end of the function, try to turn
|
||||
it into a RETURN insn, possibly a conditional one. */
|
||||
if (JUMP_LABEL (insn) != 0
|
||||
&& (next_active_insn (JUMP_LABEL (insn)) == 0
|
||||
|| GET_CODE (PATTERN (next_active_insn (JUMP_LABEL (insn))))
|
||||
== RETURN))
|
||||
changed |= redirect_jump (insn, NULL_RTX);
|
||||
|
||||
reallabelprev = prev_active_insn (JUMP_LABEL (insn));
|
||||
|
||||
/* Detect jump to following insn. */
|
||||
@ -2261,6 +2255,8 @@ int
|
||||
returnjump_p (insn)
|
||||
rtx insn;
|
||||
{
|
||||
if (GET_CODE (insn) != JUMP_INSN)
|
||||
return 0;
|
||||
return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL);
|
||||
}
|
||||
|
||||
|
@ -421,9 +421,11 @@ DEF_RTL_EXPR(BARRIER, "barrier", "iuu", 'x')
|
||||
DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuu00iss", 'x')
|
||||
|
||||
/* Say where in the code a source line starts, for symbol table's sake.
|
||||
Contains a filename and a line number. Line numbers <= 0 are special;
|
||||
See enum note_insn in rtl.h. */
|
||||
DEF_RTL_EXPR(NOTE, "note", "iuu0n", 'x')
|
||||
Operand:
|
||||
3: filename, if line number > 0, note-specific data otherwise.
|
||||
4: line number if > 0, enum note_insn otherwise.
|
||||
5: unique number if line number == note_insn_deleted_label. */
|
||||
DEF_RTL_EXPR(NOTE, "note", "iuu0ni", 'x')
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Top level constituents of INSN, JUMP_INSN and CALL_INSN.
|
||||
|
Loading…
Reference in New Issue
Block a user