re PR middle-end/21846 (segfault in fold_binary compiling vpr with -O2 -funroll-loops)
PR tree-optimization/21846 * tree-cfg.c (replace_uses_by): Update information stored at loops. * tree-flow.h (substitute_in_loop_info): Declare. * tree-scalar-evolution.c (initialize_scalar_evolutions_analyzer): Ensure that chrec_dont_know and chrec_known have a type. * tree-ssa-loop-niter.c (substitute_in_loop_info): New function. From-SVN: r100631
This commit is contained in:
parent
86403f0f32
commit
d5ab567508
@ -1,3 +1,12 @@
|
||||
2005-06-05 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR tree-optimization/21846
|
||||
* tree-cfg.c (replace_uses_by): Update information stored at loops.
|
||||
* tree-flow.h (substitute_in_loop_info): Declare.
|
||||
* tree-scalar-evolution.c (initialize_scalar_evolutions_analyzer):
|
||||
Ensure that chrec_dont_know and chrec_known have a type.
|
||||
* tree-ssa-loop-niter.c (substitute_in_loop_info): New function.
|
||||
|
||||
2005-06-05 Steven Bosscher <stevenb@suse.de>
|
||||
|
||||
* config/i386/i386.c (x86_use_loop): Remove.
|
||||
|
@ -1264,6 +1264,19 @@ replace_uses_by (tree name, tree val)
|
||||
}
|
||||
|
||||
VEC_free (tree, heap, stmts);
|
||||
|
||||
/* Also update the trees stored in loop structures. */
|
||||
if (current_loops)
|
||||
{
|
||||
struct loop *loop;
|
||||
|
||||
for (i = 0; i < current_loops->num; i++)
|
||||
{
|
||||
loop = current_loops->parray[i];
|
||||
if (loop)
|
||||
substitute_in_loop_info (loop, name, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Merge block B into block A. */
|
||||
|
@ -679,6 +679,7 @@ bool tree_duplicate_loop_to_header_edge (struct loop *, edge, struct loops *,
|
||||
struct loop *tree_ssa_loop_version (struct loops *, struct loop *, tree,
|
||||
basic_block *);
|
||||
tree expand_simple_operations (tree);
|
||||
void substitute_in_loop_info (struct loop *, tree, tree);
|
||||
|
||||
/* In tree-ssa-loop-im.c */
|
||||
/* The possibilities of statement movement. */
|
||||
|
@ -2503,8 +2503,8 @@ initialize_scalar_evolutions_analyzer (void)
|
||||
chrec_not_analyzed_yet = NULL_TREE;
|
||||
chrec_dont_know = make_node (SCEV_NOT_KNOWN);
|
||||
chrec_known = make_node (SCEV_KNOWN);
|
||||
TREE_TYPE (chrec_dont_know) = NULL_TREE;
|
||||
TREE_TYPE (chrec_known) = NULL_TREE;
|
||||
TREE_TYPE (chrec_dont_know) = void_type_node;
|
||||
TREE_TYPE (chrec_known) = void_type_node;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1600,3 +1600,21 @@ free_numbers_of_iterations_estimates (struct loops *loops)
|
||||
free_numbers_of_iterations_estimates_loop (loop);
|
||||
}
|
||||
}
|
||||
|
||||
/* Substitute value VAL for ssa name NAME inside expressions held
|
||||
at LOOP. */
|
||||
|
||||
void
|
||||
substitute_in_loop_info (struct loop *loop, tree name, tree val)
|
||||
{
|
||||
struct nb_iter_bound *bound;
|
||||
|
||||
loop->nb_iterations = simplify_replace_tree (loop->nb_iterations, name, val);
|
||||
loop->estimated_nb_iterations
|
||||
= simplify_replace_tree (loop->estimated_nb_iterations, name, val);
|
||||
for (bound = loop->bounds; bound; bound = bound->next)
|
||||
{
|
||||
bound->bound = simplify_replace_tree (bound->bound, name, val);
|
||||
bound->additional = simplify_replace_tree (bound->additional, name, val);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user