+2015-10-12 Jeff Law <law@redhat.com>
+
+ * tree-ssa-threadbackward.c (fsm_find_thread_path): Remove
+ restriction that traced SSA_NAME is a user variable.
+
2015-10-12 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/67476
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp2-details" } */
+/* { dg-final { scan-tree-dump "FSM" "vrp2" } } */
+
+void abort (void);
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+typedef struct bitmap_obstack
+{
+ struct bitmap_obstack *next;
+ unsigned int indx;
+}
+bitmap_element;
+typedef struct bitmap_head_def
+{
+ bitmap_element *first;
+}
+bitmap_head;
+static __inline__ unsigned char
+bitmap_elt_ior (bitmap dst, bitmap_element * dst_elt,
+ bitmap_element * dst_prev, const bitmap_element * a_elt,
+ const bitmap_element * b_elt)
+{
+ ((void) (!(a_elt || b_elt) ? abort (), 0 : 0));
+}
+
+unsigned char
+bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b,
+ const_bitmap kill)
+{
+ bitmap_element *dst_elt = dst->first;
+ const bitmap_element *a_elt = a->first;
+ const bitmap_element *b_elt = b->first;
+ const bitmap_element *kill_elt = kill->first;
+ bitmap_element *dst_prev = ((void *) 0);
+ while (a_elt || b_elt)
+ {
+ if (b_elt && kill_elt && kill_elt->indx == b_elt->indx
+ && (!a_elt || a_elt->indx >= b_elt->indx));
+ else
+ {
+ bitmap_elt_ior (dst, dst_elt, dst_prev, a_elt, b_elt);
+ if (a_elt && b_elt && a_elt->indx == b_elt->indx)
+ ;
+ else if (a_elt && (!b_elt || a_elt->indx <= b_elt->indx))
+ a_elt = a_elt->next;
+ }
+ }
+}
return false;
}
-/* We trace the value of the variable EXPR back through any phi nodes looking
+/* We trace the value of the SSA_NAME EXPR back through any phi nodes looking
for places where it gets a constant value and save the path. Stop after
having recorded MAX_PATHS jump threading paths. */
vec<basic_block, va_gc> *&path,
bool seen_loop_phi)
{
- tree var = SSA_NAME_VAR (expr);
gimple *def_stmt = SSA_NAME_DEF_STMT (expr);
basic_block var_bb = gimple_bb (def_stmt);
- if (var == NULL || var_bb == NULL)
+ if (var_bb == NULL)
return;
/* For the moment we assume that an SSA chain only contains phi nodes, and