+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
/* 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)
}
}
- 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)
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)