This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Remove special streaming of builtins
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <jh at suse dot de>
- Date: Tue, 26 Jul 2016 10:26:46 -0700
- Subject: Re: [PATCH] Remove special streaming of builtins
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.email@example.com>
On Mon, Jul 25, 2016 at 4:35 AM, Richard Biener <firstname.lastname@example.org> 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
> 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(?)
> 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.
> 2016-07-25 Richard Biener <email@example.com>
> * cgraph.c (cgraph_node::verify_node): Compare against builtin
> by using DECL_BUILT_IN_CLASS and DECL_FUNCTION_CODE.
> * 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
> (streamer_write_builtin): Remove.
> * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
> (unify_scc): Likewise.
> (lto_read_decls): Likewise.