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.

Reply via email to