This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tuples][patch] Convert pass_object_sizes to tuples

On Tue, Mar 18, 2008 at 11:38:25AM -0700, Bill Maddox wrote:
> On Tue, Mar 18, 2008 at 11:14 AM, Diego Novillo <> wrote:
> >  Hmm, no.  I don't think this is possible now.  We call
> >  compute_builtin_object_size mostly from fold_builtin_object_size,
> >  which is only invoked during GIMPLE optimization.
> >
> >  If it is possible to call this code path from GENERIC, we should have
> >  a Good Reason.  If not, I would like to block this possibility.
> fold_builtin_object_size can be called from fold_builtin_call_array,
> which is in turn is invoked from build_call_expr and build_function_call_expr.
> These are called in the front-end (c-omp.c) and back-end (rtx stuff in
> expr.c) as well as middle-end passes.  It is likely that there is no reason
> why we need to do the object size optimization in all of theses cases,
> but, as the code is presently structured, it looks like it can happen in
> multiple places.

Folding __builtin_object_size already in the C/C++ frontends is useful, allows
to get rid of lots of garbage (glibc headers use this heavily for many
functions).  But not handling CALL_EXPRs there is something we can live with
I think, just please don't gcc_assert it can't be seen there, because it
can, just let it fall through to return unknown[object_size_type] which
means it won't be folded right away.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]