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: [PATCH] Remove special streaming of builtins

On Mon, Jul 25, 2016 at 4:35 AM, Richard Biener <> wrote:
> So I needed to fix that builtins appearing in BLOCK_VARs and the solution
> I came up with accidentially disabled streaming via the special path.
> Thus the following patch removes the special-casing completely and makes
> the BLOCK_VARs handling work the same way as for regular externs (by
> streaming a local copy).  We stream each builtin decl once and then
> refer to it via the decl index (which is cheaper than the special
> casing).
> I'm not 100% this solves for example the -fno-math-errno inlining
> across TUs (it certainly doesn't if you use attribute optimize with
> -fno-math-errno), but it eventually should by means of having two
> different BUILT_IN_XXX if they have different behavior.  At least
> if all relevant bits are set on the function _type_ rather than
> the decl which I think we still lto-symtab replace with one
> entity during WPA(?)
> Well.
> LTO bootstrapped and tested on x86_64-unknown-linux-gnu (c,c++,fortran),
> bootstrapped on x86_64-unknown-linux-gnu (all), testing in progress.
> I might have not catched all fndecl compares.
> Will apply to trunk if testing completes.  As said, maybe followup
> cleanups possible, at least to lto-opts.c / lto-wrapper.
> Richard.
> 2016-07-25  Richard Biener  <>
>         * cgraph.c (cgraph_node::verify_node): Compare against builtin
>         * tree-chkp.c (chkp_gimple_call_builtin_p): Likewise.
>         * tree-streamer.h (streamer_handle_as_builtin_p): Remove.
>         (streamer_get_builtin_tree): Likewise.
>         (streamer_write_builtin): Likewise.
>         * lto-streamer.h (LTO_builtin_decl): Remove.
>         * lto-streamer-in.c (lto_read_tree_1): Remove assert.
>         (lto_input_scc): Remove LTO_builtin_decl handling.
>         (lto_input_tree_1): Liekwise.
>         * lto-streamer-out.c (lto_output_tree_1): Remove special
>         handling of builtins.
>         (DFS::DFS): Likewise.
>         * tree-streamer-in.c (streamer_get_builtin_tree): Remove.
>         * tree-streamer-out.c (pack_ts_function_decl_value_fields): Remove
>         assert.
>         (streamer_write_builtin): Remove.
>         lto/
>         * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
>         (unify_scc): Likewise.
>         (lto_read_decls): Likewise.

This caused:


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