summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-04-09 08:51:43 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-04-09 06:51:43 +0000
commitc7b852c8a60d46ba79c50b9d2a4f3cba4847c896 (patch)
treef5af72013d20563b8340bcf3462e935b8ad07bef /gcc/tree-ssa-loop-manip.c
parent782c9150c34a05791f425af5af81c8198cf49176 (diff)
downloadgcc-c7b852c8a60d46ba79c50b9d2a4f3cba4847c896.tar.gz
cfgloopmanip.c (create_preheader): Do not use loop_preheader_edge.
* cfgloopmanip.c (create_preheader): Do not use loop_preheader_edge. (create_preheaders): Check that loops are available. (fix_loop_structure): Clean up, improve comments. * tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa): Check that loops are available. Set LOOP_CLOSED_SSA to the loops state flags. * tree-scalar-evolution.c (scev_finalize): Clear scalar_evolution_info. * predict.c (tree_estimate_probability): Do not call calculate_dominance_info. Call create_preheaders. * tree-cfgcleanup.c (cleanup_tree_cfg_loop): Only call rewrite_into_loop_closed_ssa if LOOP_CLOSED_SSA is set in loops state flags. * cfgloop.c (loop_preheader_edge): Assert that loops have preheaders. * cfgloop.h (LOOP_CLOSED_SSA): New constant. * tree-cfg.c (tree_split_edge): Make an assert more precise. * tree-ssa-threadedge.c (thread_across_edge): Comment the function arguments. From-SVN: r123670
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r--gcc/tree-ssa-loop-manip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index bce9890d6a4..30f853469fc 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -355,10 +355,16 @@ find_uses_to_rename (bitmap changed_bbs, bitmap *use_blocks, bitmap need_phis)
void
rewrite_into_loop_closed_ssa (bitmap changed_bbs, unsigned update_flag)
{
- bitmap loop_exits = get_loops_exits ();
+ bitmap loop_exits;
bitmap *use_blocks;
unsigned i, old_num_ssa_names;
- bitmap names_to_rename = BITMAP_ALLOC (NULL);
+ bitmap names_to_rename;
+
+ if (!current_loops)
+ return;
+
+ loop_exits = get_loops_exits ();
+ names_to_rename = BITMAP_ALLOC (NULL);
/* If the pass has caused the SSA form to be out-of-date, update it
now. */
@@ -383,6 +389,8 @@ rewrite_into_loop_closed_ssa (bitmap changed_bbs, unsigned update_flag)
/* Fix up all the names found to be used outside their original
loops. */
update_ssa (TODO_update_ssa);
+
+ current_loops->state |= LOOP_CLOSED_SSA;
}
/* Check invariants of the loop closed ssa form for the USE in BB. */