Commit 2a6fa433 by Jason Eckhardt Committed by Jason Eckhardt

bb-reorder.c (struct reorder_block_def): Member succ removed.

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.

From-SVN: r33655
parent d8e7c884
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.
Wed May 3 13:29:54 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Wed May 3 13:29:54 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree.c (staticp, case LABEL_DECL): New case. * tree.c (staticp, case LABEL_DECL): New case.
......
...@@ -103,7 +103,6 @@ typedef struct reorder_block_def { ...@@ -103,7 +103,6 @@ typedef struct reorder_block_def {
int flags; int flags;
int index; int index;
basic_block add_jump; basic_block add_jump;
edge succ;
rtx eff_head; rtx eff_head;
rtx eff_end; rtx eff_end;
scope scope; scope scope;
...@@ -114,7 +113,6 @@ static struct reorder_block_def rbd_init ...@@ -114,7 +113,6 @@ static struct reorder_block_def rbd_init
0, /* flags */ 0, /* flags */
0, /* index */ 0, /* index */
NULL, /* add_jump */ NULL, /* add_jump */
NULL, /* succ */
NULL_RTX, /* eff_head */ NULL_RTX, /* eff_head */
NULL_RTX, /* eff_end */ NULL_RTX, /* eff_end */
NULL /* scope */ NULL /* scope */
...@@ -133,9 +131,6 @@ static struct reorder_block_def rbd_init ...@@ -133,9 +131,6 @@ static struct reorder_block_def rbd_init
#define REORDER_BLOCK_ADD_JUMP(bb) \ #define REORDER_BLOCK_ADD_JUMP(bb) \
((reorder_block_def) (bb)->aux)->add_jump ((reorder_block_def) (bb)->aux)->add_jump
#define REORDER_BLOCK_SUCC(bb) \
((reorder_block_def) (bb)->aux)->succ
#define REORDER_BLOCK_EFF_HEAD(bb) \ #define REORDER_BLOCK_EFF_HEAD(bb) \
((reorder_block_def) (bb)->aux)->eff_head ((reorder_block_def) (bb)->aux)->eff_head
...@@ -149,13 +144,9 @@ static struct reorder_block_def rbd_init ...@@ -149,13 +144,9 @@ static struct reorder_block_def rbd_init
static int reorder_index; static int reorder_index;
static basic_block reorder_last_visited; static basic_block reorder_last_visited;
enum reorder_skip_type {REORDER_SKIP_BEFORE, REORDER_SKIP_AFTER,
REORDER_SKIP_BLOCK_END};
/* Local function prototypes. */ /* Local function prototypes. */
static rtx skip_insns_between_block PARAMS ((basic_block, static rtx skip_insns_after_block PARAMS ((basic_block));
enum reorder_skip_type));
static basic_block get_common_dest PARAMS ((basic_block, basic_block)); static basic_block get_common_dest PARAMS ((basic_block, basic_block));
static basic_block chain_reorder_blocks PARAMS ((edge, basic_block)); static basic_block chain_reorder_blocks PARAMS ((edge, basic_block));
static void make_reorder_chain PARAMS ((basic_block)); static void make_reorder_chain PARAMS ((basic_block));
...@@ -176,113 +167,52 @@ static void free_scope_forest PARAMS ((scope_forest_info *)); ...@@ -176,113 +167,52 @@ static void free_scope_forest PARAMS ((scope_forest_info *));
void dump_scope_forest PARAMS ((scope_forest_info *)); void dump_scope_forest PARAMS ((scope_forest_info *));
static void dump_scope_forest_1 PARAMS ((scope, int)); static void dump_scope_forest_1 PARAMS ((scope, int));
/* Skip over insns BEFORE or AFTER BB which are typically associated with /* Skip over inter-block insns occurring after BB which are typically
basic block BB. */ associated with BB (e.g., barriers). If there are any such insns,
we return the last one. Otherwise, we return the end of BB. */
static rtx static rtx
skip_insns_between_block (bb, skip_type) skip_insns_after_block (bb)
basic_block bb; basic_block bb;
enum reorder_skip_type skip_type;
{ {
rtx insn, last_insn; rtx insn, last_insn;
if (skip_type == REORDER_SKIP_BEFORE) last_insn = bb->end;
{
if (bb == ENTRY_BLOCK_PTR)
return 0;
last_insn = bb->head; if (bb == EXIT_BLOCK_PTR)
for (insn = PREV_INSN (bb->head); return 0;
insn && insn != BASIC_BLOCK (bb->index - 1)->end;
last_insn = insn, insn = PREV_INSN (insn))
{
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
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_END)
continue;
break;
}
}
else
{
last_insn = bb->end;
if (bb == EXIT_BLOCK_PTR) for (insn = NEXT_INSN (bb->end);
return 0; insn;
last_insn = insn, insn = NEXT_INSN (insn))
{
if (bb->index + 1 != n_basic_blocks
&& insn == BASIC_BLOCK (bb->index + 1)->head)
break;
if (GET_CODE (insn) == BARRIER
|| GET_CODE (insn) == JUMP_INSN
|| (GET_CODE (insn) == NOTE
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)))
continue;
for (insn = NEXT_INSN (bb->end); if (GET_CODE (insn) == CODE_LABEL
insn; && GET_CODE (NEXT_INSN (insn)) == JUMP_INSN
last_insn = insn, insn = NEXT_INSN (insn)) && (GET_CODE (PATTERN (NEXT_INSN (insn))) == ADDR_VEC
|| GET_CODE (PATTERN (NEXT_INSN (insn))) == ADDR_DIFF_VEC))
{ {
if (bb->index + 1 != n_basic_blocks insn = NEXT_INSN (insn);
&& insn == BASIC_BLOCK (bb->index + 1)->head) continue;
break;
if (GET_CODE (insn) == BARRIER
|| GET_CODE (insn) == JUMP_INSN
|| (GET_CODE (insn) == NOTE
&& (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
|| GET_CODE (PATTERN
(NEXT_INSN (insn))) == ADDR_DIFF_VEC))
{
insn = NEXT_INSN (insn);
continue;
}
/* Skip to next non-deleted insn. */
if (GET_CODE (insn) == NOTE
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL))
continue;
break;
} }
if (skip_type == REORDER_SKIP_BLOCK_END) /* Skip to next non-deleted insn. */
{ if (GET_CODE (insn) == NOTE
int found_block_end = 0; && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL))
for (; insn; last_insn = insn, insn = NEXT_INSN (insn)) continue;
{
if (bb->index + 1 != n_basic_blocks
&& insn == BASIC_BLOCK (bb->index + 1)->head)
break;
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
{
found_block_end = 1;
continue;
}
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
continue;
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) >= 0
&& NEXT_INSN (insn)
&& GET_CODE (NEXT_INSN (insn)) == NOTE
&& (NOTE_LINE_NUMBER (NEXT_INSN (insn))
== NOTE_INSN_BLOCK_END))
continue;
break;
}
if (! found_block_end) break;
last_insn = 0;
}
} }
return last_insn; return last_insn;
...@@ -566,8 +496,6 @@ make_reorder_chain (bb) ...@@ -566,8 +496,6 @@ make_reorder_chain (bb)
if (REORDER_BLOCK_FLAGS (e->dest) & REORDER_BLOCK_VISITED) if (REORDER_BLOCK_FLAGS (e->dest) & REORDER_BLOCK_VISITED)
REORDER_BLOCK_FLAGS (e->dest) &= ~REORDER_BLOCK_HEAD; REORDER_BLOCK_FLAGS (e->dest) &= ~REORDER_BLOCK_HEAD;
REORDER_BLOCK_SUCC (bb) = e;
visited_edge = e->dest; visited_edge = e->dest;
reorder_last_visited = chain_reorder_blocks (e, bb); reorder_last_visited = chain_reorder_blocks (e, bb);
...@@ -1410,8 +1338,7 @@ reorder_basic_blocks () ...@@ -1410,8 +1338,7 @@ reorder_basic_blocks ()
for (i = 0; i < n_basic_blocks; i++) for (i = 0; i < n_basic_blocks; i++)
{ {
basic_block bbi = BASIC_BLOCK (i); basic_block bbi = BASIC_BLOCK (i);
REORDER_BLOCK_EFF_END (bbi) REORDER_BLOCK_EFF_END (bbi) = skip_insns_after_block (bbi);
= skip_insns_between_block (bbi, REORDER_SKIP_AFTER);
if (i == 0) if (i == 0)
REORDER_BLOCK_EFF_HEAD (bbi) = get_insns (); REORDER_BLOCK_EFF_HEAD (bbi) = get_insns ();
else else
......
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