2016-07-26 22:52 GMT+03:00 Richard Biener <rguent...@suse.de>: > On July 26, 2016 7:26:46 PM GMT+02:00, "H.J. Lu" <hjl.to...@gmail.com> wrote: >>On Mon, Jul 25, 2016 at 4:35 AM, Richard Biener <rguent...@suse.de> >>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 <rguent...@suse.de> >>> >>> * 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 >>> 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: >> >>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72683 > > Probably another by-decl built-in function compare in the mpx support. I > have fixed the one that triggered on a not mpx capable machine. Ilya > possibly knows where the other one(s) are lurking off his head?
I found a couple more of such comparisons. Their replacement fixes PR72683 and PR72657. Thanks, Ilya > > Richard. > >