From ea6e17d5c008e7df184e00e50be3bf078e002634 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 25 Jul 2016 12:35:08 +0000 Subject: cgraph.c (cgraph_node::verify_node): Compare against builtin by using DECL_BUILT_IN_CLASS and DECL_FUNCTION_CODE. 2016-07-25 Richard Biener * 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. From-SVN: r238709 --- gcc/tree-streamer-out.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'gcc/tree-streamer-out.c') diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index a70666b..887448e 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -278,10 +278,6 @@ pack_ts_decl_with_vis_value_fields (struct bitpack_d *bp, tree expr) static void pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) { - /* For normal/md builtins we only write the class and code, so they - should never be handled here. */ - gcc_assert (!streamer_handle_as_builtin_p (expr)); - bp_pack_enum (bp, built_in_class, BUILT_IN_LAST, DECL_BUILT_IN_CLASS (expr)); bp_pack_value (bp, DECL_STATIC_CONSTRUCTOR (expr), 1); @@ -487,41 +483,6 @@ streamer_write_tree_bitfields (struct output_block *ob, tree expr) } -/* Write the code and class of builtin EXPR to output block OB. IX is - the index into the streamer cache where EXPR is stored.*/ - -void -streamer_write_builtin (struct output_block *ob, tree expr) -{ - gcc_assert (streamer_handle_as_builtin_p (expr)); - - if (DECL_BUILT_IN_CLASS (expr) == BUILT_IN_MD - && !targetm.builtin_decl) - sorry ("tree bytecode streams do not support machine specific builtin " - "functions on this target"); - - streamer_write_record_start (ob, LTO_builtin_decl); - streamer_write_enum (ob->main_stream, built_in_class, BUILT_IN_LAST, - DECL_BUILT_IN_CLASS (expr)); - streamer_write_uhwi (ob, DECL_FUNCTION_CODE (expr)); - - if (DECL_ASSEMBLER_NAME_SET_P (expr)) - { - /* When the assembler name of a builtin gets a user name, - the new name is always prefixed with '*' by - set_builtin_user_assembler_name. So, to prevent the - reader side from adding a second '*', we omit it here. */ - const char *str = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (expr)); - if (strlen (str) > 1 && str[0] == '*') - streamer_write_string (ob, ob->main_stream, &str[1], true); - else - streamer_write_string (ob, ob->main_stream, NULL, true); - } - else - streamer_write_string (ob, ob->main_stream, NULL, true); -} - - /* Emit the chain of tree nodes starting at T. OB is the output block to write to. REF_P is true if chain elements should be emitted as references. */ -- cgit v1.1