static bool merge_object_sizes (struct object_size_info *, tree, tree,
unsigned HOST_WIDE_INT);
static bool plus_expr_object_size (struct object_size_info *, tree, tree);
-static void compute_object_sizes (void);
+static unsigned int compute_object_sizes (void);
static void init_offset_limit (void);
static void check_for_plus_in_loops (struct object_size_info *, tree);
static void check_for_plus_in_loops_1 (struct object_size_info *, tree,
E.g. p = &buf[0]; while (cond) p = p + 4; */
if (object_size_type & 2)
{
- osi.depths = xcalloc (num_ssa_names, sizeof (unsigned int));
- osi.stack = xmalloc (num_ssa_names * sizeof (unsigned int));
+ osi.depths = XCNEWVEC (unsigned int, num_ssa_names);
+ osi.stack = XNEWVEC (unsigned int, num_ssa_names);
osi.tos = osi.stack;
osi.pass = 1;
/* collect_object_sizes_for is changing
for (object_size_type = 0; object_size_type <= 3; object_size_type++)
{
- object_sizes[object_size_type]
- = xmalloc (num_ssa_names * sizeof (HOST_WIDE_INT));
+ object_sizes[object_size_type] = XNEWVEC (unsigned HOST_WIDE_INT, num_ssa_names);
computed[object_size_type] = BITMAP_ALLOC (NULL);
}
/* Simple pass to optimize all __builtin_object_size () builtins. */
-static void
+static unsigned int
compute_object_sizes (void)
{
basic_block bb;
}
fini_object_sizes ();
+ return 0;
}
struct tree_opt_pass pass_object_sizes =