summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-17 10:47:59 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-17 10:47:59 +0000
commit67e23d6fc5c5b34e3b5d874aa3a1a6cb894b7ef6 (patch)
tree87501164890f5046ea55327b6647afe5ac2c9e28 /gcc/loop-invariant.c
parentad1237841efb05f9d73cea299f7e857490ea48ce (diff)
downloadgcc-67e23d6fc5c5b34e3b5d874aa3a1a6cb894b7ef6.tar.gz
2014-01-17 Richard Biener <rguenther@suse.de>
PR rtl-optimization/38518 * df.h (df_analyze_loop): Declare. * df-core.c: Include cfgloop.h. (df_analyze_1): Split out main part of df_analyze. (df_analyze): Adjust. (loop_inverted_post_order_compute): New function. (loop_post_order_compute): Likewise. (df_analyze_loop): New function avoiding whole-function postorder computes. * loop-invariant.c (find_defs): Use df_analyze_loop. (find_invariants): Adjust. * loop-iv.c (iv_analysis_loop_init): Use df_analyze_loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index b31b9268ead..100a2c1b7ff 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -652,14 +652,8 @@ may_assign_reg_p (rtx x)
BODY. */
static void
-find_defs (struct loop *loop, basic_block *body)
+find_defs (struct loop *loop)
{
- unsigned i;
- bitmap blocks = BITMAP_ALLOC (NULL);
-
- for (i = 0; i < loop->num_nodes; i++)
- bitmap_set_bit (blocks, body[i]->index);
-
if (dump_file)
{
fprintf (dump_file,
@@ -670,9 +664,8 @@ find_defs (struct loop *loop, basic_block *body)
df_remove_problem (df_chain);
df_process_deferred_rescans ();
df_chain_add_problem (DF_UD_CHAIN);
- df_set_blocks (blocks);
df_set_flags (DF_RD_PRUNE_DEAD_DEFS);
- df_analyze ();
+ df_analyze_loop (loop);
check_invariant_table_size ();
if (dump_file)
@@ -682,8 +675,6 @@ find_defs (struct loop *loop, basic_block *body)
"*****ending processing of loop %d ******\n",
loop->num);
}
-
- BITMAP_FREE (blocks);
}
/* Creates a new invariant for definition DEF in INSN, depending on invariants
@@ -1005,7 +996,7 @@ find_invariants (struct loop *loop)
compute_always_reached (loop, body, may_exit, always_reached);
compute_always_reached (loop, body, has_exit, always_executed);
- find_defs (loop, body);
+ find_defs (loop);
find_invariants_body (loop, body, always_reached, always_executed);
merge_identical_invariants ();