mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-28 06:20:24 +08:00
cfganal.c (flow_dfs_compute_reverse_execute): Accept new argument holding last unvisited block.
* cfganal.c (flow_dfs_compute_reverse_execute): Accept new argument holding last unvisited block. Start search for unvisited blocks at LAST_UNVISITED rather than EXIT_BLOCK. (connect_infinite_loops_to_exit): Supply last unvisited block to flow_dfs_compute_reverse_execute. From-SVN: r90386
This commit is contained in:
parent
9686c8110e
commit
24c75ec69c
@ -1,3 +1,11 @@
|
|||||||
|
2004-11-09 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* cfganal.c (flow_dfs_compute_reverse_execute): Accept new
|
||||||
|
argument holding last unvisited block. Start search for
|
||||||
|
unvisited blocks at LAST_UNVISITED rather than EXIT_BLOCK.
|
||||||
|
(connect_infinite_loops_to_exit): Supply last unvisited block
|
||||||
|
to flow_dfs_compute_reverse_execute.
|
||||||
|
|
||||||
2004-10-22 Aldy Hernandez <aldyh@redhat.com>
|
2004-10-22 Aldy Hernandez <aldyh@redhat.com>
|
||||||
|
|
||||||
* config/rs6000/rs6000.md (fix_truncdfsi2): Handle e500
|
* config/rs6000/rs6000.md (fix_truncdfsi2): Handle e500
|
||||||
|
@ -50,7 +50,8 @@ typedef struct depth_first_search_dsS *depth_first_search_ds;
|
|||||||
static void flow_dfs_compute_reverse_init (depth_first_search_ds);
|
static void flow_dfs_compute_reverse_init (depth_first_search_ds);
|
||||||
static void flow_dfs_compute_reverse_add_bb (depth_first_search_ds,
|
static void flow_dfs_compute_reverse_add_bb (depth_first_search_ds,
|
||||||
basic_block);
|
basic_block);
|
||||||
static basic_block flow_dfs_compute_reverse_execute (depth_first_search_ds);
|
static basic_block flow_dfs_compute_reverse_execute (depth_first_search_ds,
|
||||||
|
basic_block);
|
||||||
static void flow_dfs_compute_reverse_finish (depth_first_search_ds);
|
static void flow_dfs_compute_reverse_finish (depth_first_search_ds);
|
||||||
static bool flow_active_insn_p (rtx);
|
static bool flow_active_insn_p (rtx);
|
||||||
|
|
||||||
@ -613,7 +614,7 @@ add_noreturn_fake_exit_edges (void)
|
|||||||
void
|
void
|
||||||
connect_infinite_loops_to_exit (void)
|
connect_infinite_loops_to_exit (void)
|
||||||
{
|
{
|
||||||
basic_block unvisited_block;
|
basic_block unvisited_block = EXIT_BLOCK_PTR;
|
||||||
struct depth_first_search_dsS dfs_ds;
|
struct depth_first_search_dsS dfs_ds;
|
||||||
|
|
||||||
/* Perform depth-first search in the reverse graph to find nodes
|
/* Perform depth-first search in the reverse graph to find nodes
|
||||||
@ -624,7 +625,8 @@ connect_infinite_loops_to_exit (void)
|
|||||||
/* Repeatedly add fake edges, updating the unreachable nodes. */
|
/* Repeatedly add fake edges, updating the unreachable nodes. */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
unvisited_block = flow_dfs_compute_reverse_execute (&dfs_ds);
|
unvisited_block = flow_dfs_compute_reverse_execute (&dfs_ds,
|
||||||
|
unvisited_block);
|
||||||
if (!unvisited_block)
|
if (!unvisited_block)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -847,7 +849,8 @@ flow_dfs_compute_reverse_add_bb (depth_first_search_ds data, basic_block bb)
|
|||||||
available. */
|
available. */
|
||||||
|
|
||||||
static basic_block
|
static basic_block
|
||||||
flow_dfs_compute_reverse_execute (depth_first_search_ds data)
|
flow_dfs_compute_reverse_execute (depth_first_search_ds data,
|
||||||
|
basic_block last_unvisited)
|
||||||
{
|
{
|
||||||
basic_block bb;
|
basic_block bb;
|
||||||
edge e;
|
edge e;
|
||||||
@ -865,7 +868,7 @@ flow_dfs_compute_reverse_execute (depth_first_search_ds data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Determine if there are unvisited basic blocks. */
|
/* Determine if there are unvisited basic blocks. */
|
||||||
FOR_BB_BETWEEN (bb, EXIT_BLOCK_PTR, NULL, prev_bb)
|
FOR_BB_BETWEEN (bb, last_unvisited, NULL, prev_bb)
|
||||||
if (!TEST_BIT (data->visited_blocks, bb->index - (INVALID_BLOCK + 1)))
|
if (!TEST_BIT (data->visited_blocks, bb->index - (INVALID_BLOCK + 1)))
|
||||||
return bb;
|
return bb;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user