static tree compute_object_offset (const_tree, const_tree);
static unsigned HOST_WIDE_INT addr_object_size (struct object_size_info *,
const_tree, int);
-static unsigned HOST_WIDE_INT alloc_object_size (const_gimple, int);
-static tree pass_through_call (const_gimple);
+static unsigned HOST_WIDE_INT alloc_object_size (const gcall *, int);
+static tree pass_through_call (const gcall *);
static void collect_object_sizes_for (struct object_size_info *, tree);
static void expr_object_size (struct object_size_info *, tree, tree);
static bool merge_object_sizes (struct object_size_info *, tree, tree,
unknown[object_size_type]. */
static unsigned HOST_WIDE_INT
-alloc_object_size (const_gimple call, int object_size_type)
+alloc_object_size (const gcall *call, int object_size_type)
{
tree callee, bytes = NULL_TREE;
tree alloc_size;
Otherwise return NULL. */
static tree
-pass_through_call (const_gimple call)
+pass_through_call (const gcall *call)
{
tree callee = gimple_call_fndecl (call);
/* Compute object_sizes for PTR, defined to the result of a call. */
static void
-call_object_size (struct object_size_info *osi, tree ptr, gimple call)
+call_object_size (struct object_size_info *osi, tree ptr, gcall *call)
{
int object_size_type = osi->object_size_type;
unsigned int varno = SSA_NAME_VERSION (ptr);
case GIMPLE_CALL:
{
- tree arg = pass_through_call (stmt);
+ gcall *call_stmt = as_a <gcall *> (stmt);
+ tree arg = pass_through_call (call_stmt);
if (arg)
{
if (TREE_CODE (arg) == SSA_NAME
expr_object_size (osi, var, arg);
}
else
- call_object_size (osi, var, stmt);
+ call_object_size (osi, var, call_stmt);
break;
}
case GIMPLE_CALL:
{
- tree arg = pass_through_call (stmt);
+ gcall *call_stmt = as_a <gcall *> (stmt);
+ tree arg = pass_through_call (call_stmt);
if (arg)
{
if (TREE_CODE (arg) == SSA_NAME)
continue;
init_object_sizes ();
- result = fold_call_stmt (call, false);
+ result = fold_call_stmt (as_a <gcall *> (call), false);
if (!result)
{
if (gimple_call_num_args (call) == 2