return false;
}
+/* Verify that partitions which claim to be the same object really are at the
+ same address. MEM_EXPR-based disambiguation identifies a location by a
+ MEM_EXPR base and an offset from it, so two stack slots carrying one
+ MEM_EXPR read as a single object, which lets an access to one be redirected
+ to the other. out-of-SSA keeps them apart, see the comment above
+ split_overlapping_partition_decls. */
+
+static void
+verify_partition_mem_exprs (void)
+{
+ hash_map<tree, rtx> slots;
+ for (unsigned i = 0; i < num_var_partitions (SA.map); i++)
+ {
+ rtx x = SA.partition_to_pseudo[i];
+ if (!x || !MEM_P (x) || !MEM_EXPR (x))
+ continue;
+ bool existed;
+ rtx &known = slots.get_or_insert (MEM_EXPR (x), &existed);
+ if (!existed)
+ known = x;
+ else
+ gcc_assert (rtx_equal_p (XEXP (known, 0), XEXP (x, 0)));
+ }
+}
+
/* Expand all variables used in the function. */
static rtx_insn *
adjust_one_expanded_partition_var (name);
}
+ if (flag_checking)
+ verify_partition_mem_exprs ();
+
/* Clean up RTL of variables that straddle across multiple
partitions, and check that the rtl of any PARM_DECLs that are not
cleaned up is that of their default defs. */