This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Incremental LTO linking part 4: lto-opts support
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 May 2018 12:08:15 +0200 (CEST)
- Subject: Re: Incremental LTO linking part 4: lto-opts support
- References: <20180508152021.GD16916@kam.mff.cuni.cz>
On Tue, 8 May 2018, Jan Hubicka wrote:
> Hi,
> this patch prevents lto-option to store some flags that does not make snese to store,
> in partiuclar dumpdir and -fresolution. These definitly should not be preserved from
> compile time to link time and in case of incremental linking they caused trouble with
> wrong resolution file being used in some cases.
>
> I guess this is just tip of iceberg - I think we should switch to
> whitelisting options that needs saving rather than saving everything
> with few exceptions. This is however a separate issue.
We probably should strip all CL_OPTIMIZATION and CL_TARGET options (if
the target supports streaming target options and the option is saved,
unfortunately we don't record a CL_SAVED flag).
We should think about _not_ dropping diagnostic options and/or
putting those into the optimization nodes.
> Bootstrapped/regtested x86_64-linux, OK?
> * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
> Index: lto-opts.c
> ===================================================================
> --- lto-opts.c (revision 260042)
> +++ lto-opts.c (working copy)
> @@ -109,6 +109,8 @@
> case OPT_SPECIAL_ignore:
> case OPT_SPECIAL_program_name:
> case OPT_SPECIAL_input_file:
> + case OPT_dumpdir:
> + case OPT_fresolution_:
> continue;
OK.
Richard.