+2008-03-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * ipa-reference.c (static_execute): Remove module_statics_const and
+ associated setting code.
+
2008-03-11 Uros Bizjak <ubizjak@gmail.com>
PR target/35540
unsigned int index;
bitmap_iterator bi;
bitmap module_statics_readonly = BITMAP_ALLOC (&ipa_obstack);
- bitmap module_statics_const = BITMAP_ALLOC (&ipa_obstack);
bitmap bm_temp = BITMAP_ALLOC (&ipa_obstack);
EXECUTE_IF_SET_IN_BITMAP (module_statics_escape, 0, index, bi)
fprintf (dump_file, "read-only var %s\n",
get_static_name (index));
}
- if (DECL_INITIAL (var)
- && is_gimple_min_invariant (DECL_INITIAL (var)))
- {
- bitmap_set_bit (module_statics_const, index);
- if (dump_file)
- fprintf (dump_file, "read-only constant %s\n",
- get_static_name (index));
- }
}
BITMAP_FREE(module_statics_escape);
}
BITMAP_FREE(module_statics_readonly);
- BITMAP_FREE(module_statics_const);
BITMAP_FREE(bm_temp);
}
+2008-03-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR tree-opt/35403
+ * gcc.dg/tree-ssa/ipa-reference-1.c: New testcase.
+
2008-03-11 Uros Bizjak <ubizjak@gmail.com>
PR target/35540
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+static int conststaticvariable;
+
+int f(void)
+{
+ return conststaticvariable;
+}
+
+/* There should be no reference to conststaticvariable as we should have
+ inlined the 0 as IPA reference should have marked the variable as a const
+ as it is not set in the IR. */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 0 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */