This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: IPA merge: cgraph_add_function improvement
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: jh at suse dot cz (Jan Hubicka)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 31 Dec 2006 13:09:56 -0500 (EST)
- Subject: Re: IPA merge: cgraph_add_function improvement
>
> Hi,
> this patch make cgraph_add_new_function to work in more contextes than gomp.
> We currently do add functions via cgraph_build_static_cdtor, via
> cgraph_add_function and via clonning. THis is somewhat painful as the
> logic of what needs to be done is duplicated across those places and also
> dependent on stage of compilation.
>
> This patch moves all the logic into one place so it is not dependent on
> stage of compilation the function is called and form of function passed
> to it and thus we can move passes around more easilly (on IPA-SSA I do
> GOMP before inlining). The function is inherently somewhat add-hoc (ie
> whole plan behind cgraph was to make all functions to be noticed early),
> but I hope to simplify it once IPA is more converted to pass manager and
> add some ability to execute all local passes that should be done up to
> current IPA pass.
>
> Bootstrapped/regtested i686-linux, will commit it tomorrow if there are no
> complains.
This causes a bootstrap failure on powerpc-aix and maybe other targets which don't
have support for the init section.
A reduced testcase is:
static void f(void) __attribute__((constructor));
static void f(void) {}
I tested this with a cross compiler to powerpc-aix5.3.
The ICE we get is:
t.c:2: internal compiler error: in cgraph_expand_all_functions, at cgraphunit.c:1220
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Thanks,
Andrew Pinski