Come up with fndecl_built_in_p.
authorMartin Liska <mliska@suse.cz>
Mon, 27 Aug 2018 12:34:52 +0000 (14:34 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 27 Aug 2018 12:34:52 +0000 (12:34 +0000)
commit3d78e00879b42574c9b0084c30f1361f0cfb9101
treebc8f9a510c36fa862ab02298af03a506c99fdda5
parentbb79aba479cf228832b8d2c6bfb8bf420a1f6f4a
Come up with fndecl_built_in_p.

2018-08-27  Martin Liska  <mliska@suse.cz>

* builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
* builtins.c (is_builtin_fn): Likewise.
* attribs.c (diag_attr_exclusions): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
(builtin_mathfn_code): Likewise.
(fold_builtin_expect): Likewise.
(fold_call_expr): Likewise.
(fold_builtin_call_array): Likewise.
(fold_call_stmt): Likewise.
(set_builtin_user_assembler_name): Likewise.
(is_simple_builtin): Likewise.
* calls.c (gimple_alloca_call_p): Likewise.
(maybe_warn_nonstring_arg): Likewise.
* cfgexpand.c (expand_call_stmt): Likewise.
* cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
(cgraph_edge::verify_corresponds_to_fndecl): Likewise.
(cgraph_node::verify_node): Likewise.
* cgraphclones.c (build_function_decl_skip_args): Likewise.
(cgraph_node::create_clone): Likewise.
* config/arm/arm.c (arm_insert_attributes): Likewise.
* config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
* dse.c (scan_insn): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* fold-const.c (operand_equal_p): Likewise.
(fold_binary_loc): Likewise.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
* gimple-low.c (lower_stmt): Likewise.
* gimple-pretty-print.c (dump_gimple_call): Likewise.
* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
* gimple.c (gimple_build_call_from_tree): Likewise.
(gimple_call_builtin_p): Likewise.
(gimple_call_combined_fn): Likewise.
* gimplify.c (gimplify_call_expr): Likewise.
(gimple_boolify): Likewise.
(gimplify_modify_expr): Likewise.
(gimplify_addr_expr): Likewise.
* hsa-gen.c (gen_hsa_insns_for_call): Likewise.
* ipa-cp.c (determine_versionability): Likewise.
* ipa-fnsummary.c (compute_fn_summary): Likewise.
* ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
* ipa-split.c (visit_bb): Likewise.
(split_function): Likewise.
* ipa-visibility.c (cgraph_externally_visible_p): Likewise.
* lto-cgraph.c (input_node): Likewise.
* lto-streamer-out.c (write_symbol): Likewise.
* omp-low.c (setjmp_or_longjmp_p): Likewise.
(lower_omp_1): Likewise.
* predict.c (strip_predict_hints): Likewise.
* print-tree.c (print_node): Likewise.
* symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
* trans-mem.c (is_tm_irrevocable): Likewise.
(is_tm_load): Likewise.
(is_tm_simple_load): Likewise.
(is_tm_store): Likewise.
(is_tm_simple_store): Likewise.
(is_tm_abort): Likewise.
(tm_region_init_1): Likewise.
* tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
* tree-cfg.c (verify_gimple_call): Likewise.
(move_stmt_r): Likewise.
(stmt_can_terminate_bb_p): Likewise.
* tree-eh.c (lower_eh_constructs_2): Likewise.
* tree-if-conv.c (if_convertible_stmt_p): Likewise.
* tree-inline.c (remap_gimple_stmt): Likewise.
(copy_bb): Likewise.
(estimate_num_insns): Likewise.
(fold_marked_statements): Likewise.
* tree-sra.c (scan_function): Likewise.
* tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
(optimize_stack_restore): Likewise.
(pass_fold_builtins::execute): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
(mark_all_reaching_defs_necessary_1): Likewise.
* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
* tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
(pass_forwprop::execute): Likewise.
* tree-ssa-loop-im.c (stmt_cost): Likewise.
* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
* tree-ssa-strlen.c (get_string_length): Likewise.
* tree-ssa-structalias.c (handle_lhs_call): Likewise.
(find_func_aliases_for_call): Likewise.
* tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
* tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
* tree-tailcall.c (find_tail_calls): Likewise.
* tree.c (need_assembler_name_p): Likewise.
(free_lang_data_in_decl): Likewise.
(get_call_combined_fn): Likewise.
* ubsan.c (is_ubsan_builtin_p): Likewise.
* varasm.c (incorporeal_function_p): Likewise.
* tree.h (DECL_BUILT_IN): Remove and replace with
        fndecl_built_in_p.
(DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
(fndecl_built_in_p): New.
2018-08-27  Martin Liska  <mliska@suse.cz>

* gcc-interface/decl.c (update_profile): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
* gcc-interface/gigi.h (call_is_atomic_load): Likewise.
* gcc-interface/utils.c (gnat_pushdecl): Likewise.
2018-08-27  Martin Liska  <mliska@suse.cz>

* c-common.c (check_function_restrict): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
(check_builtin_function_arguments): Likewise.
(reject_gcc_builtin): Likewise.
* c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2018-08-27  Martin Liska  <mliska@suse.cz>

* c-decl.c (locate_old_decl): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
(diagnose_mismatched_decls): Likewise.
(merge_decls): Likewise.
(warn_if_shadowing): Likewise.
(pushdecl): Likewise.
(implicitly_declare): Likewise.
* c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
* c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
* c-typeck.c (build_function_call_vec): Likewise.
(convert_arguments): Likewise.
2018-08-27  Martin Liska  <mliska@suse.cz>

* call.c (build_call_a): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
(build_cxx_call): Likewise.
* constexpr.c (constexpr_fn_retval): Likewise.
(cxx_eval_builtin_function_call): Likewise.
(cxx_eval_call_expression): Likewise.
(potential_constant_expression_1): Likewise.
* cp-gimplify.c (cp_gimplify_expr): Likewise.
(cp_fold): Likewise.
* decl.c (decls_match): Likewise.
(validate_constexpr_redeclaration): Likewise.
(duplicate_decls): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
* name-lookup.c (consider_binding_level): Likewise.
(cp_emit_debug_info_for_using): Likewise.
* semantics.c (finish_call_expr): Likewise.
* tree.c (builtin_valid_in_constant_expr_p): Likewise.
2018-08-27  Martin Liska  <mliska@suse.cz>

* go-gcc.cc (Gcc_backend::call_expression): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
2018-08-27  Martin Liska  <mliska@suse.cz>

* lto-lang.c (handle_const_attribute): Use new function
        fndecl_built_in_p and remove check for FUNCTION_DECL if
        possible.
* lto-symtab.c (lto_symtab_merge_p): Likewise.
(lto_symtab_merge_decls_1): Likewise.
(lto_symtab_merge_symbols): Likewise.
* lto.c (lto_maybe_register_decl): Likewise.
(read_cgraph_and_symbols): Likewise.

From-SVN: r263880
80 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/utils.c
gcc/attribs.c
gcc/builtins.c
gcc/builtins.h
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-warn.c
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/c/c-parser.c
gcc/c/c-tree.h
gcc/c/c-typeck.c
gcc/calls.c
gcc/cfgexpand.c
gcc/cgraph.c
gcc/cgraphclones.c
gcc/config/arm/arm.c
gcc/config/i386/i386.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/constexpr.c
gcc/cp/cp-gimplify.c
gcc/cp/decl.c
gcc/cp/name-lookup.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/dse.c
gcc/expr.c
gcc/fold-const.c
gcc/gimple-fold.c
gcc/gimple-low.c
gcc/gimple-pretty-print.c
gcc/gimple-ssa-warn-restrict.c
gcc/gimple.c
gcc/gimplify.c
gcc/go/ChangeLog
gcc/go/go-gcc.cc
gcc/hsa-gen.c
gcc/ipa-cp.c
gcc/ipa-fnsummary.c
gcc/ipa-param-manipulation.c
gcc/ipa-split.c
gcc/ipa-visibility.c
gcc/lto-cgraph.c
gcc/lto-streamer-out.c
gcc/lto/ChangeLog
gcc/lto/lto-lang.c
gcc/lto/lto-symtab.c
gcc/lto/lto.c
gcc/omp-low.c
gcc/predict.c
gcc/print-tree.c
gcc/symtab.c
gcc/trans-mem.c
gcc/tree-call-cdce.c
gcc/tree-cfg.c
gcc/tree-eh.c
gcc/tree-if-conv.c
gcc/tree-inline.c
gcc/tree-sra.c
gcc/tree-ssa-ccp.c
gcc/tree-ssa-dce.c
gcc/tree-ssa-dom.c
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-math-opts.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-strlen.c
gcc/tree-ssa-structalias.c
gcc/tree-ssa-ter.c
gcc/tree-stdarg.c
gcc/tree-tailcall.c
gcc/tree.c
gcc/tree.h
gcc/ubsan.c
gcc/varasm.c