cfgloopmanip.c (create_loop_notes): Removed.

* cfgloopmanip.c (create_loop_notes): Removed.
	* final.c (final_scan_insn): Do not handle loop notes.
	* jump.c (squeeze_notes): Ditto.
	* cfglayout.c (skip_insns_after_block,
	duplicate_insn_chain): Ditto.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	create_loop_notes.
	* cfgloop.h (create_loop_notes): Declaration removed.

From-SVN: r112316
This commit is contained in:
Zdenek Dvorak 2006-03-23 11:33:38 +01:00 committed by Zdenek Dvorak
parent c16ba1d5fe
commit 054a09fb26
7 changed files with 19 additions and 115 deletions

View file

@ -1,3 +1,14 @@
2006-03-23 Zdenek Dvorak <dvorakz@suse.cz>
* cfgloopmanip.c (create_loop_notes): Removed.
* final.c (final_scan_insn): Do not handle loop notes.
* jump.c (squeeze_notes): Ditto.
* cfglayout.c (skip_insns_after_block,
duplicate_insn_chain): Ditto.
* cfgcleanup.c (rest_of_handle_jump2): Do not call
create_loop_notes.
* cfgloop.h (create_loop_notes): Declaration removed.
2006-03-23 Richard Sandiford <richard@codesourcery.com>
* varasm.c (output_constant_pool): Restore fnname and fndecl

View file

@ -2312,8 +2312,6 @@ rest_of_handle_jump2 (void)
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
| (flag_thread_jumps ? CLEANUP_THREADING : 0));
create_loop_notes ();
purge_line_number_notes ();
if (optimize)

View file

@ -99,7 +99,6 @@ skip_insns_after_block (basic_block bb)
case NOTE:
switch (NOTE_LINE_NUMBER (insn))
{
case NOTE_INSN_LOOP_END:
case NOTE_INSN_BLOCK_END:
last_insn = insn;
continue;
@ -135,12 +134,12 @@ skip_insns_after_block (basic_block bb)
/* It is possible to hit contradictory sequence. For instance:
jump_insn
NOTE_INSN_LOOP_BEG
NOTE_INSN_BLOCK_BEG
barrier
Where barrier belongs to jump_insn, but the note does not. This can be
created by removing the basic block originally following
NOTE_INSN_LOOP_BEG. In such case reorder the notes. */
NOTE_INSN_BLOCK_BEG. In such case reorder the notes. */
for (insn = last_insn; insn != BB_END (bb); insn = prev)
{
@ -148,7 +147,6 @@ skip_insns_after_block (basic_block bb)
if (NOTE_P (insn))
switch (NOTE_LINE_NUMBER (insn))
{
case NOTE_INSN_LOOP_END:
case NOTE_INSN_BLOCK_END:
case NOTE_INSN_DELETED:
case NOTE_INSN_DELETED_LABEL:
@ -986,10 +984,6 @@ duplicate_insn_chain (rtx from, rtx to)
in first BB, we may want to copy the block. */
case NOTE_INSN_PROLOGUE_END:
case NOTE_INSN_LOOP_BEG:
case NOTE_INSN_LOOP_END:
/* Strip down the loop notes - we don't really want to keep
them consistent in loop copies. */
case NOTE_INSN_DELETED:
case NOTE_INSN_DELETED_LABEL:
/* No problem to strip these. */

View file

@ -198,7 +198,6 @@ int flow_loop_nodes_find (basic_block, struct loop *);
void fix_loop_structure (struct loops *, bitmap changed_bbs);
void mark_irreducible_loops (struct loops *);
void mark_single_exit_loops (struct loops *);
extern void create_loop_notes (void);
/* Loop data structure manipulation/querying. */
extern void flow_loop_tree_node_add (struct loop *, struct loop *);

View file

@ -1275,100 +1275,6 @@ loop_split_edge_with (edge e, rtx insns)
return new_bb;
}
/* Uses the natural loop discovery to recreate loop notes. */
void
create_loop_notes (void)
{
rtx insn, head, end;
struct loops loops;
struct loop *loop;
basic_block *first, *last, bb, pbb;
struct loop **stack, **top;
#ifdef ENABLE_CHECKING
/* Verify that there really are no loop notes. */
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
gcc_assert (!NOTE_P (insn) ||
NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_BEG);
#endif
flow_loops_find (&loops);
free_dominance_info (CDI_DOMINATORS);
if (loops.num > 1)
{
last = XCNEWVEC (basic_block, loops.num);
FOR_EACH_BB (bb)
{
for (loop = bb->loop_father; loop->outer; loop = loop->outer)
last[loop->num] = bb;
}
first = XCNEWVEC (basic_block, loops.num);
stack = XCNEWVEC (struct loop *, loops.num);
top = stack;
FOR_EACH_BB (bb)
{
for (loop = bb->loop_father; loop->outer; loop = loop->outer)
{
if (!first[loop->num])
{
*top++ = loop;
first[loop->num] = bb;
}
if (bb == last[loop->num])
{
/* Prevent loops from overlapping. */
while (*--top != loop)
last[(*top)->num] = EXIT_BLOCK_PTR;
/* If loop starts with jump into it, place the note in
front of the jump. */
insn = PREV_INSN (BB_HEAD (first[loop->num]));
if (insn
&& BARRIER_P (insn))
insn = PREV_INSN (insn);
if (insn
&& JUMP_P (insn)
&& any_uncondjump_p (insn)
&& onlyjump_p (insn))
{
pbb = BLOCK_FOR_INSN (insn);
gcc_assert (pbb && single_succ_p (pbb));
if (!flow_bb_inside_loop_p (loop, single_succ (pbb)))
insn = BB_HEAD (first[loop->num]);
}
else
insn = BB_HEAD (first[loop->num]);
head = BB_HEAD (first[loop->num]);
emit_note_before (NOTE_INSN_LOOP_BEG, insn);
BB_HEAD (first[loop->num]) = head;
/* Position the note correctly wrto barrier. */
insn = BB_END (last[loop->num]);
if (NEXT_INSN (insn)
&& BARRIER_P (NEXT_INSN (insn)))
insn = NEXT_INSN (insn);
end = BB_END (last[loop->num]);
emit_note_after (NOTE_INSN_LOOP_END, insn);
BB_END (last[loop->num]) = end;
}
}
}
free (first);
free (last);
free (stack);
}
flow_loops_free (&loops);
}
/* This function is called from loop_version. It splits the entry edge
of the loop we want to version, adds the versioning condition, and
adjust the edges to the two versions of the loop appropriately.

View file

@ -1697,8 +1697,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
switch (NOTE_LINE_NUMBER (insn))
{
case NOTE_INSN_DELETED:
case NOTE_INSN_LOOP_BEG:
case NOTE_INSN_LOOP_END:
case NOTE_INSN_FUNCTION_END:
case NOTE_INSN_REPEATED_LINE_NUMBER:
case NOTE_INSN_EXPECTED_VALUE:

View file

@ -260,11 +260,11 @@ mark_all_labels (rtx f)
}
}
/* Move all block-beg, block-end, loop-beg, loop-cont, loop-vtop, loop-end,
notes between START and END out before START. START and END may be such
notes. Returns the values of the new starting and ending insns, which
may be different if the original ones were such notes.
Return true if there were only such notes and no real instructions. */
/* Move all block-beg, block-end and loop-beg notes between START and END out
before START. START and END may be such notes. Returns the values of the
new starting and ending insns, which may be different if the original ones
were such notes. Return true if there were only such notes and no real
instructions. */
bool
squeeze_notes (rtx* startp, rtx* endp)
@ -282,9 +282,7 @@ squeeze_notes (rtx* startp, rtx* endp)
next = NEXT_INSN (insn);
if (NOTE_P (insn)
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END))
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG))
{
/* BLOCK_BEG or BLOCK_END notes only exist in the `final' pass. */
gcc_assert (NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_BEG