Commit 8fde427f by Yufeng Zhang Committed by Yufeng Zhang

gimple-ssa-strength-reduction.c (find_basis_for_candidate): Guard the…

gimple-ssa-strength-reduction.c (find_basis_for_candidate): Guard the get_alternative_base call with flag_expensive_optimizations.

gcc/

	* gimple-ssa-strength-reduction.c (find_basis_for_candidate): Guard
	the get_alternative_base call with flag_expensive_optimizations.
	(alloc_cand_and_find_basis): Likewise.

From-SVN: r205713
parent 8c895291
2013-12-05 Yufeng Zhang <yufeng.zhang@arm.com>
* gimple-ssa-strength-reduction.c (find_basis_for_candidate): Guard
the get_alternative_base call with flag_expensive_optimizations.
(alloc_cand_and_find_basis): Likewise.
2013-12-05 Tejas Belagod <tejas.belagod@arm.com> 2013-12-05 Tejas Belagod <tejas.belagod@arm.com>
* rtlanal.c (set_noop_p): Return nonzero in case of redundant vec_select * rtlanal.c (set_noop_p): Return nonzero in case of redundant vec_select
...@@ -437,7 +437,10 @@ static struct pointer_map_t *alt_base_map; ...@@ -437,7 +437,10 @@ static struct pointer_map_t *alt_base_map;
/* Given BASE, use the tree affine combiniation facilities to /* Given BASE, use the tree affine combiniation facilities to
find the underlying tree expression for BASE, with any find the underlying tree expression for BASE, with any
immediate offset excluded. */ immediate offset excluded.
N.B. we should eliminate this backtracking with better forward
analysis in a future release. */
static tree static tree
get_alternative_base (tree base) get_alternative_base (tree base)
...@@ -565,7 +568,7 @@ find_basis_for_candidate (slsr_cand_t c) ...@@ -565,7 +568,7 @@ find_basis_for_candidate (slsr_cand_t c)
} }
} }
if (!basis && c->kind == CAND_REF) if (flag_expensive_optimizations && !basis && c->kind == CAND_REF)
{ {
tree alt_base_expr = get_alternative_base (c->base_expr); tree alt_base_expr = get_alternative_base (c->base_expr);
if (alt_base_expr) if (alt_base_expr)
...@@ -650,7 +653,7 @@ alloc_cand_and_find_basis (enum cand_kind kind, gimple gs, tree base, ...@@ -650,7 +653,7 @@ alloc_cand_and_find_basis (enum cand_kind kind, gimple gs, tree base,
c->basis = find_basis_for_candidate (c); c->basis = find_basis_for_candidate (c);
record_potential_basis (c, base); record_potential_basis (c, base);
if (kind == CAND_REF) if (flag_expensive_optimizations && kind == CAND_REF)
{ {
tree alt_base = get_alternative_base (base); tree alt_base = get_alternative_base (base);
if (alt_base) if (alt_base)
......
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