void
ranger_cache::mark_stale (tree name)
{
- // Only mark it as stale if it has been processed. If it has no range
- // it will be calculated at the next request anyway.
- if (m_globals.has_range (name))
- bitmap_set_bit (m_stale, SSA_NAME_VERSION (name));
+ if (SSA_NAME_IS_DEFAULT_DEF (name))
+ {
+ // Default defs have no DEF to recalculate, just create a new timestamp.
+ m_temporal->set_timestamp_stored (name);
+ }
+ else if (m_globals.has_range (name))
+ {
+ // Otherwise Only mark it as stale if it has been processed. If it has no
+ // range it will be calculated at the next request anyway.
+ bitmap_set_bit (m_stale, SSA_NAME_VERSION (name));
+ }
}
// Get the global range for NAME, and return in R. Return false if the
fprintf (dump_file, "\n");
}
+ get_range_query (cfun)->update_range_info (name);
+
// If NAME already has a range, intersect them and done.
exit_range *ptr = m_on_exit[bb->index].find_ptr (name);
if (ptr)
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+
+struct rtx {
+ int code;
+};
+
+static inline void *zero ()
+{
+ return 0;
+}
+static inline int three ()
+{
+ return 3;
+}
+
+int
+can_combine_p (struct rtx *insn, struct rtx *elt)
+{
+ struct rtx *set;
+
+ set = zero ();
+ if (insn->code == three ())
+ set = insn;
+ else
+ {
+ set = elt;
+ if (set == zero ())
+ return 0;
+ }
+
+ return (set == zero ());
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Global Exported: set_.*1," "evrp" } } */
+