Commit 054a09fb by Zdenek Dvorak Committed by Zdenek Dvorak

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
parent c16ba1d5
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> 2006-03-23 Richard Sandiford <richard@codesourcery.com>
* varasm.c (output_constant_pool): Restore fnname and fndecl * varasm.c (output_constant_pool): Restore fnname and fndecl
......
...@@ -2312,8 +2312,6 @@ rest_of_handle_jump2 (void) ...@@ -2312,8 +2312,6 @@ rest_of_handle_jump2 (void)
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
| (flag_thread_jumps ? CLEANUP_THREADING : 0)); | (flag_thread_jumps ? CLEANUP_THREADING : 0));
create_loop_notes ();
purge_line_number_notes (); purge_line_number_notes ();
if (optimize) if (optimize)
......
...@@ -99,7 +99,6 @@ skip_insns_after_block (basic_block bb) ...@@ -99,7 +99,6 @@ skip_insns_after_block (basic_block bb)
case NOTE: case NOTE:
switch (NOTE_LINE_NUMBER (insn)) switch (NOTE_LINE_NUMBER (insn))
{ {
case NOTE_INSN_LOOP_END:
case NOTE_INSN_BLOCK_END: case NOTE_INSN_BLOCK_END:
last_insn = insn; last_insn = insn;
continue; continue;
...@@ -135,12 +134,12 @@ skip_insns_after_block (basic_block bb) ...@@ -135,12 +134,12 @@ skip_insns_after_block (basic_block bb)
/* It is possible to hit contradictory sequence. For instance: /* It is possible to hit contradictory sequence. For instance:
jump_insn jump_insn
NOTE_INSN_LOOP_BEG NOTE_INSN_BLOCK_BEG
barrier barrier
Where barrier belongs to jump_insn, but the note does not. This can be Where barrier belongs to jump_insn, but the note does not. This can be
created by removing the basic block originally following 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) for (insn = last_insn; insn != BB_END (bb); insn = prev)
{ {
...@@ -148,7 +147,6 @@ skip_insns_after_block (basic_block bb) ...@@ -148,7 +147,6 @@ skip_insns_after_block (basic_block bb)
if (NOTE_P (insn)) if (NOTE_P (insn))
switch (NOTE_LINE_NUMBER (insn)) switch (NOTE_LINE_NUMBER (insn))
{ {
case NOTE_INSN_LOOP_END:
case NOTE_INSN_BLOCK_END: case NOTE_INSN_BLOCK_END:
case NOTE_INSN_DELETED: case NOTE_INSN_DELETED:
case NOTE_INSN_DELETED_LABEL: case NOTE_INSN_DELETED_LABEL:
...@@ -986,10 +984,6 @@ duplicate_insn_chain (rtx from, rtx to) ...@@ -986,10 +984,6 @@ duplicate_insn_chain (rtx from, rtx to)
in first BB, we may want to copy the block. */ in first BB, we may want to copy the block. */
case NOTE_INSN_PROLOGUE_END: 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:
case NOTE_INSN_DELETED_LABEL: case NOTE_INSN_DELETED_LABEL:
/* No problem to strip these. */ /* No problem to strip these. */
......
...@@ -198,7 +198,6 @@ int flow_loop_nodes_find (basic_block, struct loop *); ...@@ -198,7 +198,6 @@ int flow_loop_nodes_find (basic_block, struct loop *);
void fix_loop_structure (struct loops *, bitmap changed_bbs); void fix_loop_structure (struct loops *, bitmap changed_bbs);
void mark_irreducible_loops (struct loops *); void mark_irreducible_loops (struct loops *);
void mark_single_exit_loops (struct loops *); void mark_single_exit_loops (struct loops *);
extern void create_loop_notes (void);
/* Loop data structure manipulation/querying. */ /* Loop data structure manipulation/querying. */
extern void flow_loop_tree_node_add (struct loop *, struct loop *); extern void flow_loop_tree_node_add (struct loop *, struct loop *);
......
...@@ -1275,100 +1275,6 @@ loop_split_edge_with (edge e, rtx insns) ...@@ -1275,100 +1275,6 @@ loop_split_edge_with (edge e, rtx insns)
return new_bb; 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 /* This function is called from loop_version. It splits the entry edge
of the loop we want to version, adds the versioning condition, and of the loop we want to version, adds the versioning condition, and
adjust the edges to the two versions of the loop appropriately. adjust the edges to the two versions of the loop appropriately.
......
...@@ -1697,8 +1697,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, ...@@ -1697,8 +1697,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
switch (NOTE_LINE_NUMBER (insn)) switch (NOTE_LINE_NUMBER (insn))
{ {
case NOTE_INSN_DELETED: case NOTE_INSN_DELETED:
case NOTE_INSN_LOOP_BEG:
case NOTE_INSN_LOOP_END:
case NOTE_INSN_FUNCTION_END: case NOTE_INSN_FUNCTION_END:
case NOTE_INSN_REPEATED_LINE_NUMBER: case NOTE_INSN_REPEATED_LINE_NUMBER:
case NOTE_INSN_EXPECTED_VALUE: case NOTE_INSN_EXPECTED_VALUE:
......
...@@ -260,11 +260,11 @@ mark_all_labels (rtx f) ...@@ -260,11 +260,11 @@ mark_all_labels (rtx f)
} }
} }
/* Move all block-beg, block-end, loop-beg, loop-cont, loop-vtop, loop-end, /* Move all block-beg, block-end and loop-beg notes between START and END out
notes between START and END out before START. START and END may be such before START. START and END may be such notes. Returns the values of the
notes. Returns the values of the new starting and ending insns, which new starting and ending insns, which may be different if the original ones
may be different if the original ones were such notes. were such notes. Return true if there were only such notes and no real
Return true if there were only such notes and no real instructions. */ instructions. */
bool bool
squeeze_notes (rtx* startp, rtx* endp) squeeze_notes (rtx* startp, rtx* endp)
...@@ -282,9 +282,7 @@ squeeze_notes (rtx* startp, rtx* endp) ...@@ -282,9 +282,7 @@ squeeze_notes (rtx* startp, rtx* endp)
next = NEXT_INSN (insn); next = NEXT_INSN (insn);
if (NOTE_P (insn) if (NOTE_P (insn)
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG || NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG))
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END))
{ {
/* BLOCK_BEG or BLOCK_END notes only exist in the `final' pass. */ /* BLOCK_BEG or BLOCK_END notes only exist in the `final' pass. */
gcc_assert (NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_BEG gcc_assert (NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_BEG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment