This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Avoid applying inline plan for all functions ahead of late compilation
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Nov 2014 07:47:13 -0800
- Subject: Re: Avoid applying inline plan for all functions ahead of late compilation
- Authentication-results: sourceware.org; auth=none
- References: <20141116071537 dot GB27166 at kam dot mff dot cuni dot cz>
On Sat, Nov 15, 2014 at 11:15 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> late in GCC 4.9 development we broke the feature that ltrans stages do not read all
> functions in ahead. This is because of late IPA passes that do not like to see functions
> without IPA transformations applied. I was originally OK with the solution based
> on fact that we have only IPA-PTA as late IPA pass that is disabled by default and
> eventually probably should become part of WPA in some form.
> SIMD streaming was however added and this causes us to stream in all function bodies
> and apply all inlining decisions at very beggining of optimization queue.
>
> Fixed by this patch. get_body is now responsible for applying transformations
> on demand and late IPA passes needs to call get_body on functions that they
> are interested in + are advised to not be interested in every single function in
> the program.
>
> The patch also hits a bug in i386's ix86_set_current_function. It is responsible
> for initializing backend and it does so lazily remembering the previous options
> backend was initialized for. Pragma parsing however clears the cache that leads
> to wrong settings being used for subsetquent functions.
>
> Bootstrapped/regtested x86_64-linux, will commit it tomorrow after bit of more testing.
>
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63967
H.J.