diff options
author | Yufeng Zhang <yufeng.zhang@arm.com> | 2013-12-05 17:28:08 +0000 |
---|---|---|
committer | Yufeng Zhang <yufeng@gcc.gnu.org> | 2013-12-05 17:28:08 +0000 |
commit | 8fde427f4fa132c7d86197c6273c1ef4729f3ae5 (patch) | |
tree | 65ea1d9cc7b0918e824467cd9492a4b543b5278f /gcc | |
parent | 8c8952918b75f4fa6adbbe44cd641d5fd0bb55e3 (diff) | |
download | gcc-8fde427f4fa132c7d86197c6273c1ef4729f3ae5.zip gcc-8fde427f4fa132c7d86197c6273c1ef4729f3ae5.tar.gz gcc-8fde427f4fa132c7d86197c6273c1ef4729f3ae5.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49c0844..58f9782 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> * rtlanal.c (set_noop_p): Return nonzero in case of redundant vec_select diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 8471812..f5148ea 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -437,7 +437,10 @@ static struct pointer_map_t *alt_base_map; /* Given BASE, use the tree affine combiniation facilities to 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 get_alternative_base (tree base) @@ -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); if (alt_base_expr) @@ -650,7 +653,7 @@ alloc_cand_and_find_basis (enum cand_kind kind, gimple gs, tree base, c->basis = find_basis_for_candidate (c); record_potential_basis (c, base); - if (kind == CAND_REF) + if (flag_expensive_optimizations && kind == CAND_REF) { tree alt_base = get_alternative_base (base); if (alt_base) |