1. 03 Jan, 2018 2 commits
    • Add a fixed_size_mode_pod class · b660eccf
      This patch adds a POD version of fixed_size_mode.  The only current use
      is for storing the __builtin_apply and __builtin_result register modes,
      which were made fixed_size_modes by the previous patch.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* coretypes.h (fixed_size_mode): Declare.
      	(fixed_size_mode_pod): New typedef.
      	* builtins.h (target_builtins::x_apply_args_mode)
      	(target_builtins::x_apply_result_mode): Change type to
      	fixed_size_mode_pod.
      	* builtins.c (apply_args_size, apply_result_size, result_vector)
      	(expand_builtin_apply_args_1, expand_builtin_apply)
      	(expand_builtin_return): Update accordingly.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r256193
      Richard Sandiford committed
    • Update copyright years. · 85ec4feb
      From-SVN: r256169
      Jakub Jelinek committed
  2. 16 Dec, 2017 1 commit
    • PR tree-optimization/78918 - missing -Wrestrict on memcpy copying over self · cc8bea0a
      gcc/c-family/ChangeLog:
      
      	PR tree-optimization/78918
      	* c-common.c (check_function_restrict): Avoid checking built-ins.
      	* c.opt (-Wrestrict): Include in -Wall.
      
      gcc/ChangeLog:
      
      	PR tree-optimization/78918
      	* Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
      	* builtins.c (check_sizes): Rename...
      	(check_access): ...to this.  Rename function arguments for clarity.
      	(check_memop_sizes): Adjust names.
      	(expand_builtin_memchr, expand_builtin_memcpy): Same.
      	(expand_builtin_memmove, expand_builtin_mempcpy): Same.
      	(expand_builtin_strcat, expand_builtin_stpncpy): Same.
      	(check_strncat_sizes, expand_builtin_strncat): Same.
      	(expand_builtin_strncpy, expand_builtin_memset): Same.
      	(expand_builtin_bzero, expand_builtin_memcmp): Same.
      	(expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
      	(maybe_emit_sprintf_chk_warning): Same.
      	(expand_builtin_strcpy): Adjust.
      	(expand_builtin_stpcpy): Same.
      	(expand_builtin_with_bounds): Detect out-of-bounds accesses
      	in pointer-checking forms of memcpy, memmove, and mempcpy.
      	(gcall_to_tree_minimal, max_object_size): Define new functions.
      	* builtins.h (max_object_size): Declare.
      	* calls.c (alloc_max_size): Call max_object_size instead of
      	hardcoding ssizetype limit.
      	(get_size_range): Handle new argument.
      	* calls.h (get_size_range): Add a new argument.
      	* cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
      	* doc/invoke.texi (-Wrestrict): Adjust, add example.
      	* gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
      	operations.
      	(gimple_fold_builtin_memory_chk): Same.
      	(gimple_fold_builtin_stxcpy_chk): New function.
      	* gimple-ssa-warn-restrict.c: New source.
      	* gimple-ssa-warn-restrict.h: New header.
      	* gimple.c (gimple_build_call_from_tree): Propagate location.
      	* passes.def (pass_warn_restrict): Add new pass.
      	* tree-pass.h (make_pass_warn_restrict): Declare.
      	* tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
      	operations.
      	(handle_builtin_strcat): Same.
      	(strlen_optimize_stmt): Rename...
      	(strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
      	stpncpy, strncpy, and their checking forms.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/78918
      	* c-c++-common/Warray-bounds.c: New test.
      	* c-c++-common/Warray-bounds-2.c: New test.
      	* c-c++-common/Warray-bounds-3.c: New test.
      	* c-c++-common/Warray-bounds-4.c: New test.
      	* c-c++-common/Warray-bounds-5.c: New test.
      	* c-c++-common/Wrestrict-2.c: New test.
      	* c-c++-common/Wrestrict.c: New test.
      	* c-c++-common/Wrestrict.s: New test.
      	* c-c++-common/Wsizeof-pointer-memaccess1.c: Adjust
      	* c-c++-common/Wsizeof-pointer-memaccess2.c: Same.
      	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same.
      	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Same.
      	* gcc.dg/range.h: New header.
      	* gcc.dg/memcpy-6.c: New test.
      	* gcc.dg/pr69172.c: Adjust.
      	* gcc.dg/pr79223.c: Same.
      	* gcc.dg/pr81345.c: Adjust.
      	* gcc.dg/Wobjsize-1.c: Same.
      	* gcc.dg/Wrestrict-2.c: New test.
      	* gcc.dg/Wrestrict.c: New test.
      	* gcc.dg/Wsizeof-pointer-memaccess1.c: Adjust.
      	* gcc.dg/builtin-stpncpy.c: Same.
      	* gcc.dg/builtin-stringop-chk-1.c: Same.
      	* gcc.target/i386/chkp-stropt-17.c: New test.
      	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Adjust.
      
      From-SVN: r255755
      Martin Sebor committed
  3. 10 Nov, 2017 1 commit
    • PR c/81117 - Improve buffer overflow checking in strncpy · 025d57f0
      gcc/ChangeLog:
      
      	PR c/81117
      	* builtins.c (compute_objsize): Handle arrays that
      	compute_builtin_object_size likes to fail for.  Make extern.
      	* builtins.h (compute_objsize): Declare.
      	(check_strncpy_sizes): New function.
      	(expand_builtin_strncpy): Call check_strncpy_sizes.
      	* gimple-fold.c (gimple_fold_builtin_strncpy): Implement
      	-Wstringop-truncation.
      	(gimple_fold_builtin_strncat): Same.
      	* gimple.c (gimple_build_call_from_tree): Set call location.
      	* tree-ssa-strlen.c (strlen_to_stridx): New global variable.
      	(maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
      	(handle_builtin_stxncpy, handle_builtin_strncat): Same.
      	(handle_builtin_strlen): Use strlen_to_stridx.
      	(strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
      	stpncpy.
      	Use strlen_to_stridx.
      	(pass_strlen::execute): Release strlen_to_stridx.
      	* doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
      	(-Wstringop-truncation): Document new option.
      
      gcc/ada/ChangeLog:
      
      	PR c/81117
      	* ada/adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
      	* ada/argv.c (__gnat_fill_arg, __gnat_fill_env): Same.
      
      gcc/c-family/ChangeLog:
      
      	PR c/81117
      	* c-common.c (catenate_strings): Use memcpy instead of strncpy.
      	* c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
      	* c.opt (-Wstringop-truncation): New option.
      
      gcc/fortran/ChangeLog:
      
      	PR c/81117
      	* gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
      
      gcc/objc/ChangeLog:
      
      	PR c/81117
      	* objc-encoding.c (encode_type): Use memcpy instead of strncpy.
      
      gcc/testsuite/ChangeLog:
      
      	PR c/81117
      	* c-c++-common/Wsizeof-pointer-memaccess3.c: New test.
      	* c-c++-common/Wstringop-overflow.c: Same.
      	* c-c++-common/Wstringop-truncation.c: Same.
      	* c-c++-common/Wsizeof-pointer-memaccess2.c: Adjust.
      	* c-c++-common/attr-nonstring-2.c: New test.
      	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Adjust.
      	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Same.
      	* gcc.dg/torture/pr63554.c: Same.
      	* gcc.dg/Walloca-1.c: Disable macro tracking.
      
      From-SVN: r254630
      Martin Sebor committed
  4. 30 Aug, 2017 1 commit
    • [62/77] Big machine_mode to scalar_int_mode replacement · 095a2d76
      This patch changes the types of various things from machine_mode
      to scalar_int_mode, in cases where (after previous patches)
      simply changing the type is enough on its own.  The patch does
      nothing other than that.
      
      2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
      	instead of a machine_mode.
      	(builtin_memset_read_str): Likewise.
      	* builtins.c (c_readstr): Likewise.
      	(builtin_memcpy_read_str): Likewise.
      	(builtin_strncpy_read_str): Likewise.
      	(builtin_memset_read_str): Likewise.
      	(builtin_memset_gen_str): Likewise.
      	(expand_builtin_signbit): Use scalar_int_mode for local variables.
      	* cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
      	instead of a machine_mode.
      	* combine.c (simplify_if_then_else): Use scalar_int_mode for local
      	variables.
      	(make_extraction): Likewise.
      	(try_widen_shift_mode): Take and return scalar_int_modes instead
      	of machine_modes.
      	* config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
      	a scalar_int_mode instead of a machine_mode.
      	* config/avr/avr.c (avr_addr_space_address_mode): Likewise.
      	(avr_addr_space_pointer_mode): Likewise.
      	* config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
      	* config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
      	(msp430_unwind_word_mode): Likewise.
      	* config/spu/spu.c (spu_unwind_word_mode): Likewise.
      	(spu_addr_space_pointer_mode): Likewise.
      	(spu_addr_space_address_mode): Likewise.
      	(spu_libgcc_cmp_return_mode): Likewise.
      	(spu_libgcc_shift_count_mode): Likewise.
      	* config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
      	(rl78_addr_space_pointer_mode): Likewise.
      	(fl78_unwind_word_mode): Likewise.
      	(rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
      	machine_mode.
      	* config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
      	* config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
      	* config/mips/mips.c (mips_mode_rep_extended): Likewise.
      	(mips_valid_pointer_mode): Likewise.
      	* config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
      	* config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
      	(ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
      	of a machine_mode.
      	(ft32_addr_space_address_mode): Likewise.
      	* config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
      	scalar_int_mode instead of a machine_mode.
      	(m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
      	of a machine_mode.
      	(m32c_addr_space_address_mode): Likewise.
      	* config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
      	(rs6000_eh_return_filter_mode): Likewise.
      	* config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
      	(rs6000_eh_return_filter_mode): Likewise.
      	* config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
      	(s390_libgcc_shift_count_mode): Likewise.
      	(s390_unwind_word_mode): Likewise.
      	(s390_valid_pointer_mode): Take a scalar_int_mode rather than a
      	machine_mode.
      	* target.def (mode_rep_extended): Likewise.
      	(valid_pointer_mode): Likewise.
      	(addr_space.valid_pointer_mode): Likewise.
      	(eh_return_filter_mode): Return a scalar_int_mode rather than
      	a machine_mode.
      	(libgcc_cmp_return_mode): Likewise.
      	(libgcc_shift_count_mode): Likewise.
      	(unwind_word_mode): Likewise.
      	(addr_space.pointer_mode): Likewise.
      	(addr_space.address_mode): Likewise.
      	* doc/tm.texi: Regenerate.
      	* dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
      	a machine_mode.
      	(do_jump): Use scalar_int_mode for local variables.
      	* dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
      	rather than a machine_mode.
      	* dwarf2out.c (convert_descriptor_to_mode): Likewise.
      	(scompare_loc_descriptor_wide): Likewise.
      	(scompare_loc_descriptor_narrow): Likewise.
      	* emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
      	variables.
      	* except.c (sjlj_emit_dispatch_table): Likewise.
      	(expand_builtin_eh_copy_values): Likewise.
      	* explow.c (convert_memory_address_addr_space_1): Likewise.
      	Take a scalar_int_mode rather than a machine_mode.
      	(convert_memory_address_addr_space): Take a scalar_int_mode rather
      	than a machine_mode.
      	(memory_address_addr_space): Use scalar_int_mode for local variables.
      	* expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
      	rather than a machine_mode.
      	* expmed.c (mask_rtx): Likewise.
      	(init_expmed_one_conv): Likewise.
      	(expand_mult_highpart_adjust): Likewise.
      	(extract_high_half): Likewise.
      	(expmed_mult_highpart_optab): Likewise.
      	(expmed_mult_highpart): Likewise.
      	(expand_smod_pow2): Likewise.
      	(expand_sdiv_pow2): Likewise.
      	(emit_store_flag_int): Likewise.
      	(adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
      	variables.
      	(extract_low_bits): Likewise.
      	* expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
      	a machine_mode.
      	* expr.c (pieces_addr::adjust):  Likewise.
      	(can_store_by_pieces): Likewise.
      	(store_by_pieces): Likewise.
      	(clear_by_pieces_1): Likewise.
      	(expand_expr_addr_expr_1): Likewise.
      	(expand_expr_addr_expr): Use scalar_int_mode for local variables.
      	(expand_expr_real_1): Likewise.
      	(try_casesi): Likewise.
      	* final.c (shorten_branches): Likewise.
      	* fold-const.c (fold_convert_const_int_from_fixed): Change the
      	type of "mode" to machine_mode.
      	* internal-fn.c (expand_arith_overflow_result_store): Take a
      	scalar_int_mode rather than a machine_mode.
      	(expand_mul_overflow): Use scalar_int_mode for local variables.
      	* loop-doloop.c (doloop_modify): Likewise.
      	(doloop_optimize): Likewise.
      	* optabs.c (expand_subword_shift): Take a scalar_int_mode rather
      	than a machine_mode.
      	(expand_doubleword_shift_condmove): Likewise.
      	(expand_doubleword_shift): Likewise.
      	(expand_doubleword_clz): Likewise.
      	(expand_doubleword_popcount): Likewise.
      	(expand_doubleword_parity): Likewise.
      	(expand_absneg_bit): Use scalar_int_mode for local variables.
      	(prepare_float_lib_cmp): Likewise.
      	* rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
      	rather than a machine_mode.
      	(convert_memory_address_addr_space): Likewise.
      	(get_mode_bounds): Likewise.
      	(get_address_mode): Return a scalar_int_mode rather than a
      	machine_mode.
      	* rtlanal.c (get_address_mode): Likewise.
      	* stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
      	than a machine_mode.
      	* targhooks.c (default_mode_rep_extended): Likewise.
      	(default_valid_pointer_mode): Likewise.
      	(default_addr_space_valid_pointer_mode): Likewise.
      	(default_eh_return_filter_mode): Return a scalar_int_mode rather
      	than a machine_mode.
      	(default_libgcc_cmp_return_mode): Likewise.
      	(default_libgcc_shift_count_mode): Likewise.
      	(default_unwind_word_mode): Likewise.
      	(default_addr_space_pointer_mode): Likewise.
      	(default_addr_space_address_mode): Likewise.
      	* targhooks.h (default_eh_return_filter_mode): Likewise.
      	(default_libgcc_cmp_return_mode): Likewise.
      	(default_libgcc_shift_count_mode): Likewise.
      	(default_unwind_word_mode): Likewise.
      	(default_addr_space_pointer_mode): Likewise.
      	(default_addr_space_address_mode): Likewise.
      	(default_mode_rep_extended): Take a scalar_int_mode rather than
      	a machine_mode.
      	(default_valid_pointer_mode): Likewise.
      	(default_addr_space_valid_pointer_mode): Likewise.
      	* tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
      	local variables.
      	* tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
      	rather than a machine_mode.
      	* tree-switch-conversion.c (array_value_type): Use scalar_int_mode
      	for local variables.
      	* tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
      	* var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
      	than a machine_mode.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r251513
      Richard Sandiford committed
  5. 01 Jan, 2017 1 commit
  6. 14 Oct, 2016 1 commit
    • Fold __builtin_memchr function · 488c6247
      	* builtins.h(target_char_cst_p): Declare the function.
      	* builtins.c (fold_builtin_memchr): Remove.
      	(target_char_cst_p): Move the function from gimple-fold.c.
      	(fold_builtin_3): Do not call the function.
      	* gimple-fold.c (gimple_fold_builtin_memchr): New function.
      	(gimple_fold_builtin): Call the function.
      	* fold-const-call.c (fold_const_call_1): Handle CFN_BUILT_IN_MEMCHR.
      
      From-SVN: r241160
      Martin Liska committed
  7. 28 Jun, 2016 1 commit
    • re PR middle-end/66867 (Suboptimal code generation for atomic_compare_exchange) · 849a76a5
      	PR middle-end/66867
      	* builtins.c (expand_ifn_atomic_compare_exchange_into_call,
      	expand_ifn_atomic_compare_exchange): New functions.
      	* internal-fn.c (expand_ATOMIC_COMPARE_EXCHANGE): New function.
      	* tree.h (build_call_expr_internal_loc): Rename to ...
      	(build_call_expr_internal_loc_array): ... this.  Fix up type of
      	last argument.
      	* internal-fn.def (ATOMIC_COMPARE_EXCHANGE): New internal fn.
      	* predict.c (expr_expected_value_1): Handle IMAGPART_EXPR of
      	ATOMIC_COMPARE_EXCHANGE result.
      	* builtins.h (expand_ifn_atomic_compare_exchange): New prototype.
      	* gimple-fold.h (optimize_atomic_compare_exchange_p,
      	fold_builtin_atomic_compare_exchange): New prototypes.
      	* gimple-fold.c (optimize_atomic_compare_exchange_p,
      	fold_builtin_atomic_compare_exchange): New functions..
      	* tree-ssa.c (execute_update_addresses_taken): If
      	optimize_atomic_compare_exchange_p, ignore &var in 2nd argument
      	of call when finding addressable vars, and if such var becomes
      	non-addressable, call fold_builtin_atomic_compare_exchange.
      
      From-SVN: r237814
      Jakub Jelinek committed
  8. 03 May, 2016 1 commit
    • re PR target/49244 (__sync or __atomic builtins will not emit 'lock bts/btr/btc') · adedd5c1
      	PR target/49244
      	* tree-ssa-ccp.c: Include stor-layout.h and optabs-query.h.
      	(optimize_atomic_bit_test_and): New function.
      	(pass_fold_builtins::execute): Use it.
      	* optabs.def (atomic_bit_test_and_set_optab,
      	atomic_bit_test_and_complement_optab,
      	atomic_bit_test_and_reset_optab): New optabs.
      	* internal-fn.def (ATOMIC_BIT_TEST_AND_SET,
      	ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_BIT_TEST_AND_RESET): New ifns.
      	* builtins.h (expand_ifn_atomic_bit_test_and): New prototype.
      	* builtins.c (expand_ifn_atomic_bit_test_and): New function.
      	* internal-fn.c (expand_ATOMIC_BIT_TEST_AND_SET,
      	expand_ATOMIC_BIT_TEST_AND_COMPLEMENT,
      	expand_ATOMIC_BIT_TEST_AND_RESET): New functions.
      	* doc/md.texi (atomic_bit_test_and_set@var{mode},
      	atomic_bit_test_and_complement@var{mode},
      	atomic_bit_test_and_reset@var{mode}): Document.
      	* config/i386/sync.md (atomic_bit_test_and_set<mode>,
      	atomic_bit_test_and_complement<mode>,
      	atomic_bit_test_and_reset<mode>): New expanders.
      	(atomic_bit_test_and_set<mode>_1,
      	atomic_bit_test_and_complement<mode>_1,
      	atomic_bit_test_and_reset<mode>_1): New insns.
      
      	* gcc.target/i386/pr49244-1.c: New test.
      	* gcc.target/i386/pr49244-2.c: New test.
      
      From-SVN: r235813
      Jakub Jelinek committed
  9. 04 Jan, 2016 1 commit
  10. 17 Nov, 2015 3 commits
    • Short-cut generation of simple built-in functions · 4cfe7a6c
      This patch short-circuits the builtins.c expansion code for a particular
      gimple call if:
      
      - the function has an associated internal function
      - the target implements that internal function
      - the call has no side effects
      
      This allows a later patch to remove the builtins.c code, once calls with
      side effects have been handled.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.h (called_as_built_in): Declare.
      	* builtins.c (called_as_built_in): Make external.
      	* internal-fn.h (expand_internal_call): Define a variant that
      	specifies the internal function explicitly.
      	* internal-fn.c (expand_load_lanes_optab_fn)
      	(expand_store_lanes_optab_fn, expand_ANNOTATE, expand_GOMP_SIMD_LANE)
      	(expand_GOMP_SIMD_VF, expand_GOMP_SIMD_LAST_LANE)
      	(expand_GOMP_SIMD_ORDERED_START, expand_GOMP_SIMD_ORDERED_END)
      	(expand_UBSAN_NULL, expand_UBSAN_BOUNDS, expand_UBSAN_VPTR)
      	(expand_UBSAN_OBJECT_SIZE, expand_ASAN_CHECK, expand_TSAN_FUNC_EXIT)
      	(expand_UBSAN_CHECK_ADD, expand_UBSAN_CHECK_SUB)
      	(expand_UBSAN_CHECK_MUL, expand_ADD_OVERFLOW, expand_SUB_OVERFLOW)
      	(expand_MUL_OVERFLOW, expand_LOOP_VECTORIZED)
      	(expand_mask_load_optab_fn, expand_mask_store_optab_fn)
      	(expand_ABNORMAL_DISPATCHER, expand_BUILTIN_EXPECT, expand_VA_ARG)
      	(expand_UNIQUE, expand_GOACC_DIM_SIZE, expand_GOACC_DIM_POS)
      	(expand_GOACC_LOOP, expand_GOACC_REDUCTION, expand_direct_optab_fn)
      	(expand_unary_optab_fn, expand_binary_optab_fn): Add an internal_fn
      	argument.
      	(internal_fn_expanders): Update prototype.
      	(expand_internal_call): Define a variant that specifies the
      	internal function explicitly. Use it to implement the previous
      	interface.
      	* cfgexpand.c (expand_call_stmt): Try to expand calls to built-in
      	functions as calls to internal functions.
      
      From-SVN: r230487
      Richard Sandiford committed
    • Extend mathfn_built_in to handle combined_fn · b03ff92e
      This patch extends mathfn_built_in to handle combined_fn, but keeps the
      old built_in_function interface around since it's a common case.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.h (mathfn_built_in): Add a variant that takes
      	a combined_fn.
      	* builtins.c: Include case-cfn-macros.h.
      	(CASE_MATHFN): Use CASE_CFN_*.
      	(CASE_MATHFN_REENT): Use CFN_ codes.
      	(mathfn_built_in_2, mathfn_built_in_1): Replace built_in_function
      	argument with a combined_fn.
      	(mathfn_built_in): Add a variant that takes a combined_fn.
      	(expand_builtin_int_roundingfn_2): Update callers accordingly.
      	(fold_builtin_sincos, fold_builtin_classify): Likewise.
      
      From-SVN: r230483
      Richard Sandiford committed
    • Add internal math functions · 686ee971
      This patch adds internal functions for simple FLT_FN built-in functions,
      in cases where an associated optab already exists.  Unlike some of the
      built-in functions, these internal functions never set errno.
      
      LDEXP is an odd-one out in that its second operand is an integer.
      All the others operate on uniform types.
      
      The patch also adds a function to query the internal function associated
      with a built-in function (if any), and another to test whether a given
      gcall could be replaced by a call to an internal function on the current
      target (as long as the caller deals with errno appropriately).
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.h (associated_internal_fn): Declare.
      	(replacement_internal_fn): Likewise.
      	* builtins.c: Include internal-fn.h
      	(associated_internal_fn, replacement_internal_fn): New functions.
      	* internal-fn.def (DEF_INTERNAL_FLT_FN): New macro.
      	(ACOS, ASIN, ATAN, COS, EXP, EXP10, EXP2, EXPM1, LOG, LOG10, LOG1P)
      	(LOG2, LOGB, SIGNIFICAND, SIN, SQRT, TAN, CEIL, FLOOR, NEARBYINT)
      	(RINT, ROUND, TRUNC, ATAN2, COPYSIGN, FMOD, POW, REMAINDER, SCALB)
      	(LDEXP): New functions.
      	* internal-fn.c: Include recog.h.
      	(unary_direct, binary_direct): New macros.
      	(expand_direct_optab_fn): New function.
      	(expand_unary_optab_fn): New macro.
      	(expand_binary_optab_fn): Likewise.
      	(direct_unary_optab_supported_p): Likewise.
      	(direct_binary_optab_supported_p): Likewise.
      
      From-SVN: r230474
      Richard Sandiford committed
  11. 07 Nov, 2015 1 commit
    • Move c_getstr to fold-const.c · 5486d913
      Upcoming patches to fold-const-call.c want to use c_getstr, which is
      currently defined in builtins.c.  The function doesn't really do anything
      related to built-ins, and I'd rather not make fold-const-call.c depend
      on builtins.c and builtins.c depend on fold-const-call.c, so this patch
      moves the function to fold-const.c instead.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.h (c_getstr): Move to...
      	* fold-const.h (c_getstr): ...here.
      	* builtins.c (c_getstr): Move to...
      	* fold-const.c (c_getstr): ...here.
      
      From-SVN: r229919
      Richard Sandiford committed
  12. 02 Nov, 2015 1 commit
    • Move constant folds for maths functions to new file · 5c1a2e63
      The new routines operate on the built-in enum rather than on tree decls.
      The idea is to extend this to handle internal functions too, with a
      combined enum for both.
      
      The patch also moves fold_fma too, with the same prototype.  The long-term
      plan is to replace FMA_EXPR with an internal function, for consistency
      with the way that things like SQRT will be handled.
      
      Tested on x86_64-linux-gnu, arm-linux-gnueabi and aarch64-linux-gnu.
      
      gcc/
      	* builtins.h (fold_fma): Move to fold-const-call.h.
      	* builtins.c: Include fold-const-call.h.
      	(mathfn_built_in_2): New function, split out from...
      	(mathfn_built_in_1): ...here.
      	(do_real_to_int_conversion, fold_const_builtin_pow)
      	(fold_const_builtin_logb, fold_const_builtin_significand)
      	(fold_const_builtin_load_exponent, do_mpfr_arg1, do_mpfr_arg2)
      	(do_mpfr_arg3, do_mpfr_sincos, do_mpfr_bessel_n, do_mpc_arg1): Delete.
      	(fold_builtin_sincos): Use fold_const_call to handle constants.
      	(fold_builtin_1, fold_builtin_2, fold_builtin_3): Add explicit
      	checks for ERROR_MARK.  Use fold_const_call to handle constant
      	folds for math functions.
      	(fold_fma): Move to fold-const-call.c.
      	* fold-const.c: Include fold-const-call.h.
      	* Makefile.in (OBJS): Add fold-const-call.o.
      	(PLUGIN_HEADERS): Add fold-const-call.h.
      	* realmpfr.h (real_from_mpfr): Allow the format to be specified
      	directly.
      	* realmpfr.c (real_from_mpfr): Likewise.
      	* fold-const-call.h, fold-const-call.c: New files.
      
      From-SVN: r229669
      Richard Sandiford committed
  13. 19 May, 2015 1 commit
    • insn-notes.def (UPDATE_SJLJ_CONTEXT): New note. · d33606c3
      	* insn-notes.def (UPDATE_SJLJ_CONTEXT): New note.
      	* builtins.c (expand_builtin_update_setjmp_buf): Make global.
      	(expand_stack_restore): Call record_new_stack_level.
      	(expand_stack_save): Do not call do_pending_stack_adjust.
      	* builtins.h (expand_builtin_update_setjmp_buf): Declare.
      	* calls.c (expand_call): Call record_new_stack_level for alloca.
      	* except.c (sjlj_mark_call_sites): Expand builtin_update_setjmp_buf
      	wherever a NOTE_INSN_UPDATE_SJLJ_CONTEXT note is present.
      	(update_sjlj_context): New global function.
      	* except.h (update_sjlj_context): Declare.
      	* explow.c (record_new_stack_level): New global function.
      	(allocate_dynamic_stack_space): Call record_new_stack_level.
      	* explow.h (record_new_stack_level): Declare.
      	* final.c (final_scan_insn): Deal with NOTE_INSN_UPDATE_SJLJ_CONTEXT.
      	* cfgrtl.c (duplicate_insn_chain): Likewise.
      
      Co-Authored-By: Tristan Gingold <gingold@adacore.com>
      
      From-SVN: r223348
      Eric Botcazou committed
  14. 05 Jan, 2015 1 commit
  15. 04 Dec, 2014 1 commit
    • builtins.c (target_newline): Export. · ad03a744
      2014-12-04  Richard Biener  <rguenther@suse.de>
      
      	* builtins.c (target_newline): Export.
      	(target_percent_s_newline): Likewise.
      	(fold_builtin_1): Do not fold printf functions here.
      	(fold_builtin_2): Likewise.
      	(fold_builtin_3): Likewise, do not fold strncat.
      	(fold_builtin_strncat): Move to gimple-fold.c.
      	(fold_builtin_printf): Likewise.
      	* builtins.h (target_newline): Declare.
      	(target_percent_s_newline): Likewise.
      	* gimple-fold.c (gimple_fold_builtin_strncat): Move from
      	builtins.c and gimplify.
      	(gimple_fold_builtin_printf): Likewise.
      	(gimple_fold_builtin): Fold strncat, printf, printf_unlocked,
      	vprintf, printf_chk and vprintf_chk here.
      
      From-SVN: r218343
      Richard Biener committed
  16. 03 Dec, 2014 1 commit
    • builtins.c (target_percent_c): Export. · edd7ae68
      2014-12-03  Richard Biener  <rguenther@suse.de>
      
      	* builtins.c (target_percent_c): Export.
      	(fold_builtin_fprintf): Move to gimple-fold.c.
      	(fold_builtin_2): Do not fold fprintf functions.
      	(fold_builtin_3): Likewise.
      	(fold_builtin_4): Remove.
      	(fold_builtin_n): Do not call fold_builtin_4.
      	* builtins.h (target_percent_c): Declare.
      	* gimple-fold.c (gimple_fold_builtin_fprintf): Move from
      	builtins.c and gimplify.
      	(gimple_fold_builtin): Fold fprintf, fprintf_unlocked, vfprintf,
      	fprintf_chk and vfprintf_chk here.
      
      From-SVN: r218317
      Richard Biener committed
  17. 19 Nov, 2014 1 commit
    • Merger of git branch "gimple-classes-v2-option-3" · 538dd0b7
      gcc/ChangeLog:
      	Merger of git branch "gimple-classes-v2-option-3".
      
      	* ChangeLog.gimple-classes: New.
      
      	* coretypes.h (struct gcond): Add forward decl.
      	(struct gdebug): Likewise.
      	(struct ggoto): Likewise.
      	(struct glabel): Likewise.
      	(struct gswitch): Likewise.
      	(struct gassign): Likewise.
      	(struct gasm): Likewise.
      	(struct gcall): Likewise.
      	(struct gtransaction): Likewise.
      	(struct greturn): Likewise.
      	(struct gbind): Likewise.
      	(struct gcatch): Likewise.
      	(struct geh_filter): Likewise.
      	(struct geh_mnt): Likewise.
      	(struct geh_else): Likewise.
      	(struct gresx): Likewise.
      	(struct geh_dispatch): Likewise.
      	(struct gphi): Likewise.
      	(struct gtry): Likewise.
      	(struct gomp_atomic_load): Likewise.
      	(struct gomp_atomic_store): Likewise.
      	(struct gomp_continue): Likewise.
      	(struct gomp_critical): Likewise.
      	(struct gomp_for): Likewise.
      	(struct gomp_parallel): Likewise.
      	(struct gomp_task): Likewise.
      	(struct gomp_sections): Likewise.
      	(struct gomp_single): Likewise.
      	(struct gomp_target): Likewise.
      	(struct gomp_teams): Likewise.
      
      	* doc/gimple.texi (Class hierarchy of GIMPLE statements): Update
      	for renaming of gimple subclasses.
      
      	* gdbhooks.py: Update.
      
      	* gimple-iterator.c (gsi_for_phi): New.
      	(gsi_start_phis): Strengthen return type from gimple_stmt_iterator
      	to gphi_iterator.
      	* gimple-iterator.h (struct gphi_iterator): New subclass of
      	gimple_stmt_iterator.
      	(gsi_for_phi): New prototype.
      	(gsi_start_phis): Strengthen return type from gimple_stmt_iterator
      	to gphi_iterator.
      	(gsi_next_nonvirtual_phi): Strengthen param from
      	gimple_stmt_iterator * to gphi_iterator *, and local "phi" from
      	gimple to gphi *.
      
      	* gsstruct.def: Update for renamings of classes.
      
      	* gimple.c (gimple_build_return): Strengthen return type from
      	gimple to greturn *.
      	(gimple_call_reset_alias_info): Strengthen param to gcall *.
      	(gimple_build_call_1): Strengthen return type from gimple to
      	gcall *.
      	(gimple_build_call_vec): Likewise.
      	(gimple_build_call): Likewise.
      	(gimple_build_call_valist): Likewise.
      	(gimple_build_call_internal_1): Likewise.
      	(gimple_build_call_internal): Likewise.
      	(gimple_build_call_internal_vec): Likewise.
      	(gimple_build_call_from_tree): Likewise.
      	(gimple_build_assign_stat): Strengthen return type from gimple to
      	gassign *.
      	(gimple_build_assign_with_ops): Likewise.
      	(gimple_build_assign_with_ops): Likewise.
      	(gimple_build_cond): Strengthen return type from gimple to
      	gcond *.
      	(gimple_build_cond_from_tree): Likewise.
      	(gimple_cond_set_condition_from_tree): Require a gcond *.
      	(gimple_build_label): Strengthen return type from gimple to
      	glabel *.
      	(gimple_build_goto): Strengthen return type from gimple to
      	ggoto *.
      	(gimple_build_bind): Strengthen return type from gimple to
      	gbind *.
      	(gimple_build_asm_1): Strengthen return type from gimple to
      	gasm *.
      	(gimple_build_asm_vec): Likewise.
      	(gimple_build_catch): Strengthen return type from gimple to
      	gcatch *.
      	(gimple_build_eh_filter): Strengthen return type from gimple to
      	geh_filter *.
      	(gimple_build_eh_must_not_throw): Strengthen return type from
      	gimple to geh_mnt *.
      	(gimple_build_eh_else): Strengthen return type from gimple to
      	geh_else *.
      	(gimple_build_try): Update for renaming of gimple_statement_try to
      	gtry.
      	(gimple_build_resx): Strengthen return type from gimple to
      	gresx *.
      	(gimple_build_switch_nlabels): Strengthen return type from gimple
      	to gswitch *.
      	(gimple_build_switch): Likewise.
      	(gimple_build_eh_dispatch): Strengthen return type from gimple to
      	geh_dispatch *.
      	(gimple_build_debug_bind_stat): Strengthen return type from gimple
      	to gdebug *.
      	(gimple_build_debug_source_bind_stat): Strengthen return type from
      	gimple to gdebug *.
      	(gimple_build_omp_critical): Strengthen return type from gimple to
      	gomp_critical *.
      	(gimple_build_omp_for): Strengthen return type from gimple to
      	gomp_for *.
      	(gimple_build_omp_parallel): Strengthen return type from gimple to
      	gomp_parallel *.
      	(gimple_build_omp_task): Strengthen return type from gimple to
      	gomp_task *.
      	(gimple_build_omp_continue): Strengthen return type from gimple to
      	gomp_continue *.
      	(gimple_build_omp_sections): Strengthen return type from gimple to
      	gomp_sections *.
      	(gimple_build_omp_single): Strengthen return type from gimple to
      	gomp_single *.
      	(gimple_build_omp_target): Strengthen return type from gimple to
      	gomp_target *.
      	(gimple_build_omp_teams): Strengthen return type from gimple to
      	gomp_teams *.
      	(gimple_build_omp_atomic_load): Strengthen return type from gimple
      	to gomp_atomic_load *.
      	(gimple_build_omp_atomic_store): Strengthen return type from gimple
      	to gomp_atomic_store *.
      	(gimple_build_transaction): Strengthen return type from gimple
      	to gtransaction *.
      	(empty_stmt_p): Replace check for GIMPLE_BIND with a dyn_cast.
      	(gimple_call_fnspec): Require a const gcall *.
      	(gimple_call_arg_flags): Likewise.
      	(gimple_call_return_flags): Likewise.
      	(gimple_set_bb): Add a checked cast.
      	(gimple_copy): Within the cases, add locals of the appropriate
      	subclass and use in place of "stmt" and "copy" for typesafety.
      	(gimple_has_side_effects): Add a checked cast.
      	(gimple_could_trap_p_1): Likewise.
      	(gimple_call_copy_skip_args): Require a gcall *, and return one.
      	(gimple_asm_clobbers_memory_p): Require a const gasm *.
      	(infer_nonnull_range): Replace a check for GIMPLE_RETURN with a
      	dyn_cast, introducing local "return_stmt" and using ti in place
      	of "stmt".
      
      	* gimple.h (gimple_vec): Eliminate this typedef.
      	(struct gimple_statement_call): Rename to...
      	(struct gcall): ...this.
      	(struct gimple_statement_bind): Rename to...
      	(struct gbind): ...this.
      	(struct gimple_statement_catch): Rename to...
      	(struct gcatch): ...this.
      	(struct gimple_statement_eh_filter): Rename to...
      	(struct geh_filter): ...this.
      	(struct gimple_statement_eh_else): Rename to...
      	(struct geh_else): ...this.
      	(struct gimple_statement_eh_mnt): Rename to...
      	(struct geh_mnt): ...this.
      	(struct gimple_statement_phi): Rename to...
      	(struct gphi): ...this.
      	(struct gimple_statement_resx): Rename to...
      	(struct gresx): ...this.
      	(struct gimple_statement_eh_dispatch): Rename to...
      	(struct geh_dispatch): ...this.
      	(struct gimple_statement_try): Rename to...
      	(struct gtry): ...this.
      	(struct gimple_statement_asm): Rename to...
      	(struct gasm): ...this.
      	(struct gimple_statement_omp_critical): Rename to...
      	(struct gomp_critical): ...this.
      	(struct gimple_statement_omp_for): Rename to...
      	(struct gomp_for): ...this.
      	(struct gimple_statement_omp_parallel): Rename to...
      	(struct gomp_parallel): ...this.
      	(struct gimple_statement_omp_target): Rename to...
      	(struct gomp_target): ...this.
      	(struct gimple_statement_omp_task): Rename to...
      	(struct gomp_task): ...this.
      	(struct gimple_statement_omp_sections): Rename to...
      	(struct gomp_sections): ...this.
      	(struct gimple_statement_omp_continue): Rename to...
      	(struct gomp_continue): ...this.
      	(struct gimple_statement_omp_single): Rename to...
      	(struct gomp_single): ...this.
      	(struct gimple_statement_omp_teams): Rename to...
      	(struct gomp_teams): ...this.
      	(struct gimple_statement_omp_atomic_load): Rename to...
      	(struct gomp_atomic_load): ...this.
      	(struct gimple_statement_omp_atomic_store :): Rename to...
      	(struct gomp_atomic_store :): ...this.
      	(struct gimple_statement_transaction): Rename to...
      	(struct gtransaction): ...this.
      	(struct gcond): New subclass.
      	(struct gdebug): New subclass.
      	(struct ggoto): New subclass.
      	(struct glabel): New subclass.
      	(struct gswitch): New subclass.
      	(struct gassign): New subclass.
      	(struct greturn): New subclass.
      	(is_a_helper <gimple_statement_asm *>::test): Rename to...
      	(is_a_helper <gasm *>::test): ...this.
      	(is_a_helper <gimple_statement_bind *>::test): Rename to...
      	(is_a_helper <gbind *>::test): ...this.
      	(is_a_helper <gassign *>::test): New.
      	(is_a_helper <gimple_statement_call *>::test): Rename to...
      	(is_a_helper <gcall *>::test): ...this.
      	(is_a_helper <gimple_statement_catch *>::test): Rename to...
      	(is_a_helper <gcatch *>::test): ...this.
      	(is_a_helper <gimple_statement_resx *>::test): Rename to...
      	(is_a_helper <gresx *>::test): ...this.
      	(is_a_helper <gcond *>::test): New.
      	(is_a_helper <gdebug *>::test): New.
      	(is_a_helper <ggoto *>::test): New.
      	(is_a_helper <glabel *>::test): New.
      	(is_a_helper <gimple_statement_eh_dispatch *>::test): Rename to...
      	(is_a_helper <geh_dispatch *>::test): ...this.
      	(is_a_helper <gimple_statement_eh_else *>::test): Rename to...
      	(is_a_helper <geh_else *>::test): ...this.
      	(is_a_helper <gimple_statement_eh_filter *>::test): Rename to...
      	(is_a_helper <geh_filter *>::test): ...this.
      	(is_a_helper <gimple_statement_eh_mnt *>::test): Rename to...
      	(is_a_helper <geh_mnt *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_atomic_load *>::test): Rename to...
      	(is_a_helper <gomp_atomic_load *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_atomic_store *>::test): Rename to...
      	(is_a_helper <gomp_atomic_store *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_continue *>::test): Rename to...
      	(is_a_helper <gomp_continue *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_critical *>::test): Rename to...
      	(is_a_helper <gomp_critical *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_for *>::test): Rename to...
      	(is_a_helper <gomp_for *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_parallel *>::test): Rename to...
      	(is_a_helper <gomp_parallel *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_target *>::test): Rename to...
      	(is_a_helper <gomp_target *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_sections *>::test): Rename to...
      	(is_a_helper <gomp_sections *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_single *>::test): Rename to...
      	(is_a_helper <gomp_single *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_teams *>::test): Rename to...
      	(is_a_helper <gomp_teams *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_task *>::test): Rename to...
      	(is_a_helper <gomp_task *>::test): ...this.
      	(is_a_helper <gimple_statement_phi *>::test): Rename to...
      	(is_a_helper <gphi *>::test): ...this.
      	(is_a_helper <gimple_statement_transaction *>::test): Rename to...
      	(is_a_helper <gtransaction *>::test): ...this.
      	(is_a_helper <greturn *>::test): New.
      	(is_a_helper <gswitch *>::test): New.
      	(is_a_helper <gimple_statement_try *>::test): Rename to...
      	(is_a_helper <gtry *>::test): ...this.
      	(is_a_helper <const gimple_statement_asm *>::test): Rename to...
      	(is_a_helper <const gasm *>::test): ...this.
      	(is_a_helper <const gimple_statement_bind *>::test): Rename to...
      	(is_a_helper <const gbind *>::test): ...this.
      	(is_a_helper <const gimple_statement_call *>::test): Rename to...
      	(is_a_helper <const gcall *>::test): ...this.
      	(is_a_helper <const gimple_statement_catch *>::test): Rename to...
      	(is_a_helper <const gcatch *>::test): ...this.
      	(is_a_helper <const gimple_statement_resx *>::test): Rename to...
      	(is_a_helper <const gresx *>::test): ...this.
      	(is_a_helper <const gimple_statement_eh_dispatch *>::test): Rename to...
      	(is_a_helper <const geh_dispatch *>::test): ...this.
      	(is_a_helper <const gimple_statement_eh_filter *>::test): Rename to...
      	(is_a_helper <const geh_filter *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_atomic_load *>::test):
      	Rename to...
      	(is_a_helper <const gomp_atomic_load *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_atomic_store *>::test):
      	Rename to...
      	(is_a_helper <const gomp_atomic_store *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_continue *>::test):
      	Rename to...
      	(is_a_helper <const gomp_continue *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_critical *>::test):
      	Rename to...
      	(is_a_helper <const gomp_critical *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_for *>::test): Rename to...
      	(is_a_helper <const gomp_for *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_parallel *>::test):
      	Rename to...
      	(is_a_helper <const gomp_parallel *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_target *>::test): Rename to...
      	(is_a_helper <const gomp_target *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_sections *>::test):
      	Rename to...
      	(is_a_helper <const gomp_sections *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_single *>::test): Rename to...
      	(is_a_helper <const gomp_single *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_teams *>::test): Rename to...
      	(is_a_helper <const gomp_teams *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_task *>::test): Rename to...
      	(is_a_helper <const gomp_task *>::test): ...this.
      	(is_a_helper <const gimple_statement_phi *>::test): Rename to...
      	(is_a_helper <const gphi *>::test): ...this.
      	(is_a_helper <const gimple_statement_transaction *>::test): Rename to...
      	(is_a_helper <const gtransaction *>::test): ...this.
      	(gimple_build_return): Strengthen return type to greturn *.
      	(gimple_call_reset_alias_info): Require a gcall *.
      	(gimple_build_call_vec): Return a gcall *.
      	(gimple_build_call): Likewise.
      	(gimple_build_call_valist): Likewise.
      	(gimple_build_call_internal): Likewise.
      	(gimple_build_call_internal_vec): Likewise.
      	(gimple_build_call_from_tree): Likewise.
      	(gimple_build_assign_stat): Return a gassign *.
      	(gimple_build_assign_with_ops): Likewise.
      	(gimple_build_cond): Return a gcond *.
      	(gimple_build_cond_from_tree): Likewise.
      	(gimple_cond_set_condition_from_tree): Require a gcond *.
      	(gimple_build_label): Return a glabel *.
      	(gimple_build_goto): Return a ggoto *.
      	(gimple_build_bind): Return a gbind *.
      	(gimple_build_asm_vec): Return a gasm *.
      	(gimple_build_catch): Return a gcatch *.
      	(gimple_build_eh_filter): Return a geh_filter *.
      	(gimple_build_eh_must_not_throw): Return a geh_mnt *.
      	(gimple_build_eh_else): Return a geh_else *.
      	(gimple_build_try): Return a gtry *.
      	(gimple_build_resx): Return a gresx *.
      	(gimple_build_switch_nlabels): Return a gswitch *.
      	(gimple_build_switch): Return a gswitch *.
      	(gimple_build_eh_dispatch): Return a geh_dispatch *.
      	(gimple_build_debug_bind_stat): Return a gdebug *.
      	(gimple_build_debug_source_bind_stat): Return a gdebug *.
      	(gimple_build_omp_critical): Return a gomp_critical *.
      	(gimple_build_omp_for): Return a gomp_for *.
      	(gimple_build_omp_parallel): Return a gomp_parallel *.
      	(gimple_build_omp_task): Return a gomp_task *.
      	(gimple_build_omp_continue): Return a gomp_continue *.
      	(gimple_build_omp_sections): Return a gomp_sections *.
      	(gimple_build_omp_single): Return a gomp_single *.
      	(gimple_build_omp_target): Return a gomp_target *.
      	(gimple_build_omp_teams): Return a gomp_teams *.
      	(gimple_build_omp_atomic_load): Return a gomp_atomic_load *.
      	(gimple_build_omp_atomic_store): Return a gomp_atomic_store *.
      	(gimple_build_transaction): Return a gtransaction *.
      	(gimple_call_arg_flags): Require a const gcall *.
      	(gimple_call_return_flags): Likewise.
      	(gimple_call_copy_skip_args): Require and return a gcall *.
      	(gimple_asm_clobbers_memory_p): Require a const gasm *.
      	(gimple_seq_first_stmt_as_a_bind): New.
      	(gimple_assign_nontemporal_move_p): Require a const gassign *
      	rather than a const_gimple.
      	(gimple_call_internal_fn): Update for renaming to gcall.
      	(gimple_call_fntype): Likewise.
      	(gimple_call_set_fntype): Require a gcall * rather than a gimple.
      	(gimple_call_set_fn): Likewise.
      	(gimple_call_set_internal_fn): Likewise.
      	(gimple_call_set_chain): Likewise.
      	(gimple_call_set_tail): Likewise.
      	(gimple_call_tail_p): Likewise.
      	(gimple_call_set_return_slot_opt): Likewise.
      	(gimple_call_return_slot_opt_p): Likewise.
      	(gimple_call_set_from_thunk): Likewise.
      	(gimple_call_from_thunk_p): Likewise.
      	(gimple_call_set_va_arg_pack): Likewise.
      	(gimple_call_va_arg_pack_p): Likewise.
      	(gimple_call_set_nothrow): Likewise.
      	(gimple_call_nothrow_p): Likewise.
      	(gimple_call_set_alloca_for_var): Likewise.
      	(gimple_call_alloca_for_var_p): Likewise.
      	(gimple_call_use_set): Likewise.
      	(gimple_call_clobber_set): Likewise.
      	(gimple_call_return_type): Require a const gcall * rather than a
      	const_gimple.
      	(gimple_call_chain_ptr): Likewise.
      	(gimple_call_copy_flags): Require a pair of gcall *.
      	(gimple_cond_set_code): Require a gcond * rather than a gimple
      	(gimple_cond_set_lhs): Likewise.
      	(gimple_cond_set_rhs): Likewise.
      	(gimple_cond_set_true_label): Likewise.
      	(gimple_cond_set_false_label): Likewise.
      	(gimple_cond_make_false): Likewise.
      	(gimple_cond_make_true): Likewise.
      	(gimple_cond_lhs_ptr): Require a const gcond * rather than a
      	const_gimple.
      	(gimple_cond_rhs_ptr): Likewise.
      	(gimple_cond_true_label): Likewise.
      	(gimple_cond_false_label): Likewise.
      	(gimple_cond_true_p): Likewise.
      	(gimple_cond_false_p): Likewise.
      	(gimple_cond_set_condition): Likewise.
      	(gimple_label_label): Require a const glabel *.
      	(gimple_label_set_label): Require a glabel *.
      	(gimple_goto_set_dest): Require a ggoto *.
      	(gimple_bind_vars): Require a const gbind *.
      	(gimple_bind_block): Likewise.
      	(gimple_bind_set_vars): Require a gbind *.
      	(gimple_bind_append_vars): Likewise.
      	(gimple_bind_body_ptr): Likewise.
      	(gimple_bind_body): Likewise.
      	(gimple_bind_set_body): Likewise.
      	(gimple_bind_add_stmt): Likewise.
      	(gimple_bind_add_seq): Likewise.
      	(gimple_bind_set_block): Likewise.
      	(gimple_asm_ninputs): Require a const gasm *.
      	(gimple_asm_noutputs): Likewise.
      	(gimple_asm_nclobbers): Likewise.
      	(gimple_asm_nlabels): Likewise.
      	(gimple_asm_input_op): Likewise.
      	(gimple_asm_input_op_ptr): Likewise.
      	(gimple_asm_output_op): Likewise.
      	(gimple_asm_output_op_ptr): Likewise.
      	(gimple_asm_clobber_op): Likewise.
      	(gimple_asm_label_op): Likewise.
      	(gimple_asm_string): Likewise.
      	(gimple_asm_volatile_p): Likewise.
      	(gimple_asm_input_p): Likewise.
      	(gimple_asm_set_input_op): Require a gasm *.
      	(gimple_asm_set_output_op): Likewise.
      	(gimple_asm_set_clobber_op): Likewise.
      	(gimple_asm_set_label_op): Likewise.
      	(gimple_asm_set_volatile): Likewise.
      	(gimple_asm_set_input): Likewise.
      	(gimple_catch_types): Require a const gcatch *.
      	(gimple_catch_types_ptr): Require a gcatch *.
      	(gimple_catch_handler_ptr): Likewise.
      	(gimple_catch_handler): Likewise.
      	(gimple_catch_set_types): Likewise.
      	(gimple_catch_set_handler): Likewise.
      	(gimple_eh_filter_types): Update for renaming of subclass to
      	geh_filter.
      	(gimple_eh_filter_types_ptr): Likewise.
      	(gimple_eh_filter_failure_ptr): Likewise.
      	(gimple_eh_filter_set_types): Require a geh_filter *.
      	(gimple_eh_filter_set_failure): Likewise.
      	(gimple_eh_must_not_throw_fndecl): Require a geh_mnt *.
      	(gimple_eh_must_not_throw_set_fndecl): Likewise.
      	(gimple_eh_else_n_body_ptr): Require a geh_else *.
      	(gimple_eh_else_n_body): Likewise.
      	(gimple_eh_else_e_body_ptr): Likewise.
      	(gimple_eh_else_e_body): Likewise.
      	(gimple_eh_else_set_n_body): Likewise.
      	(gimple_eh_else_set_e_body): Likewise.
      	(gimple_try_set_kind): Require a gtry *.
      	(gimple_try_set_catch_is_cleanup): Likewise.
      	(gimple_try_set_eval): Likewise.
      	(gimple_try_set_cleanup): Likewise.
      	(gimple_try_eval_ptr): Update for renaming of subclass to gtry.
      	(gimple_try_cleanup_ptr): Likewise.
      	(gimple_phi_capacity): Update for renaming of subclass to gphi.
      	(gimple_phi_num_args): Likewise.
      	(gimple_phi_result): Likewise.
      	(gimple_phi_result_ptr): Likewise.
      	(gimple_phi_arg): Likewise.
      	(gimple_phi_set_result): Require a gphi *.
      	(gimple_phi_set_arg): Likewise.
      	(gimple_phi_arg_def_ptr): Likewise.
      	(gimple_phi_arg_edge): Likewise.
      	(gimple_phi_arg_location): Likewise.
      	(gimple_phi_arg_location_from_edge): Likewise.
      	(gimple_phi_arg_set_location): Likewise.
      	(gimple_phi_arg_has_location): Likewise.
      	(gimple_resx_region): Require a const gresx *.
      	(gimple_resx_set_region): Require a gresx *.
      	(gimple_eh_dispatch_region): Require a const geh_dispatch *.
      	(gimple_eh_dispatch_set_region): Require a geh_dispatch *.
      	(gimple_switch_num_labels): Require a const gswitch *.
      	(gimple_switch_set_num_labels): Likewise.
      	(gimple_switch_index): Likewise.
      	(gimple_switch_index_ptr): Likewise.
      	(gimple_switch_label): Likewise.
      	(gimple_switch_default_label): Likewise.
      	(gimple_switch_set_index): Require a gswitch *.
      	(gimple_switch_set_label): Likewise.
      	(gimple_switch_set_default_label): Likewise.
      	(gimple_omp_critical_name): Require a const gomp_critical *.
      	(gimple_omp_critical_name_ptr): Require a gomp_critical *.
      	(gimple_omp_critical_set_name): Likewise.
      	(gimple_omp_for_set_kind): Require a gomp_for *.
      	(gimple_omp_for_set_combined_p): Likewise.
      	(gimple_omp_for_set_combined_into_p): Likewise.
      	(gimple_omp_for_clauses): Update for renaming of subclass to
      	gomp_for.
      	(gimple_omp_for_clauses_ptr): Likewise.
      	(gimple_omp_for_set_clauses): Likewise.
      	(gimple_omp_for_collapse): Likewise.
      	(gimple_omp_for_index): Likewise.
      	(gimple_omp_for_index_ptr): Likewise.
      	(gimple_omp_for_set_index): Likewise.
      	(gimple_omp_for_initial): Likewise.
      	(gimple_omp_for_initial_ptr): Likewise.
      	(gimple_omp_for_set_initial): Likewise.
      	(gimple_omp_for_final): Likewise.
      	(gimple_omp_for_final_ptr): Likewise.
      	(gimple_omp_for_set_final): Likewise.
      	(gimple_omp_for_incr): Likewise.
      	(gimple_omp_for_incr_ptr): Likewise.
      	(gimple_omp_for_set_incr): Likewise.
      	(gimple_omp_for_pre_body): Likewise.
      	(gimple_omp_for_set_pre_body): Likewise.
      	(gimple_omp_parallel_clauses): Update for renaming of subclass to
      	gomp_parallel.
      	(gimple_omp_parallel_clauses_ptr): Require a gomp_parallel *.
      	(gimple_omp_parallel_set_clauses): Likewise.
      	(gimple_omp_parallel_child_fn_ptr): Likewise.
      	(gimple_omp_parallel_set_child_fn): Likewise.
      	(gimple_omp_parallel_data_arg_ptr): Likewise.
      	(gimple_omp_parallel_set_data_arg): Likewise.
      	(gimple_omp_parallel_child_fn): Require a const gomp_parallel *.
      	(gimple_omp_parallel_data_arg): Likewise.
      	(gimple_omp_task_clauses): Update for renaming of subclass to
      	gomp_task.
      	(gimple_omp_task_clauses_ptr): Likewise.
      	(gimple_omp_task_set_clauses): Likewise.
      	(gimple_omp_task_child_fn): Likewise.
      	(gimple_omp_task_child_fn_ptr): Likewise.
      	(gimple_omp_task_set_child_fn): Likewise.
      	(gimple_omp_task_data_arg): Likewise.
      	(gimple_omp_task_data_arg_ptr): Likewise.
      	(gimple_omp_task_set_data_arg): Likewise.
      	(gimple_omp_taskreg_clauses): Whitespace fixes.
      	(gimple_omp_taskreg_clauses_ptr): Likewise.
      	(gimple_omp_taskreg_set_clauses): Likewise.
      	(gimple_omp_taskreg_child_fn): Likewise.
      	(gimple_omp_taskreg_child_fn_ptr): Likewise.
      	(gimple_omp_taskreg_set_child_fn): Likewise.
      	(gimple_omp_taskreg_data_arg): Likewise.
      	(gimple_omp_taskreg_data_arg_ptr): Likewise.
      	(gimple_omp_taskreg_set_data_arg): Likewise.
      	(gimple_omp_task_copy_fn): Update for renaming of subclass to
      	gomp_task.
      	(gimple_omp_task_copy_fn_ptr): Likewise.
      	(gimple_omp_task_set_copy_fn): Likewise.
      	(gimple_omp_task_arg_size): Likewise.
      	(gimple_omp_task_arg_size_ptr): Likewise.
      	(gimple_omp_task_set_arg_size): Likewise.
      	(gimple_omp_task_arg_align): Likewise.
      	(gimple_omp_task_arg_align_ptr): Likewise.
      	(gimple_omp_task_set_arg_align): Likewise.
      	(gimple_omp_single_clauses): Update for renaming of subclass to
      	gomp_single.
      	(gimple_omp_single_clauses_ptr): Likewise.
      	(gimple_omp_single_set_clauses): Likewise.
      	(gimple_omp_target_clauses): Update for renaming of subclass to
      	gomp_target.
      	(gimple_omp_target_clauses_ptr): Likewise.
      	(gimple_omp_target_set_clauses): Require a gomp_target *.
      	(gimple_omp_target_set_kind): Likewise.
      	(gimple_omp_target_child_fn_ptr): Likewise.
      	(gimple_omp_target_set_child_fn): Likewise.
      	(gimple_omp_target_data_arg_ptr): Likewise.
      	(gimple_omp_target_set_data_arg): Likewise.
      	(gimple_omp_target_child_fn): Require a const gomp_target *.
      	(gimple_omp_target_data_arg): Likewise.
      	(gimple_omp_teams_clauses): Update for renaming of subclass to
      	gomp_teams.
      	(gimple_omp_teams_clauses_ptr): Likewise.
      	(gimple_omp_teams_set_clauses): Require a gomp_teams *.
      	(gimple_omp_sections_clauses): Update for renaming of subclass to
      	gomp_sections.
      	(gimple_omp_sections_clauses_ptr): Likewise.
      	(gimple_omp_sections_set_clauses): Likewise.
      	(gimple_omp_sections_control): Likewise.
      	(gimple_omp_sections_control_ptr): Likewise.
      	(gimple_omp_sections_set_control): Likewise.
      	(gimple_omp_for_set_cond): Likewise.
      	(gimple_omp_for_cond): Likewise.
      	(gimple_omp_atomic_store_set_val): Require a gomp_atomic_store *.
      	(gimple_omp_atomic_store_val_ptr): Likewise.
      	(gimple_omp_atomic_load_set_lhs): Likewise.
      	(gimple_omp_atomic_store_val): Require a const gomp_atomic_store *.
      	(gimple_omp_atomic_load_lhs): Likewise.
      	(gimple_omp_atomic_load_rhs): Likewise.
      	(gimple_omp_atomic_load_lhs_ptr): Require a gomp_atomic_load *.
      	(gimple_omp_atomic_load_set_rhs): Likewise.
      	(gimple_omp_atomic_load_rhs_ptr): Likewise.
      	(gimple_omp_continue_control_def): Require a const gomp_continue *.
      	(gimple_omp_continue_control_use): Likewise.
      	(gimple_omp_continue_control_def_ptr): Require a gomp_continue *.
      	(gimple_omp_continue_set_control_def): Likewise.
      	(gimple_omp_continue_control_use_ptr): Likewise.
      	(gimple_omp_continue_set_control_use): Likewise.
      	(gimple_transaction_body_ptr): Require a gtransaction *.
      	(gimple_transaction_body): Likewise.
      	(gimple_transaction_label_ptr): Likewise.
      	(gimple_transaction_label): Require a const gtransaction *.
      	(gimple_transaction_subcode): Likewise.
      	(gimple_transaction_set_body): Require a gtransaction *.
      	(gimple_transaction_set_label): Likewise.
      	(gimple_transaction_set_subcode): Likewise.
      	(gimple_return_retval_ptr): Require a const greturn *.
      	(gimple_return_retval): Likewise.
      	(gimple_return_set_retval): Require a greturn *.
      	(gimple_expr_type): Introduce local "call_stmt" and use in place of
      	"stmt" for typesafety.
      
      	* asan.c: Use gimple subclasses.
      	* auto-profile.c: Likewise.
      	* builtins.c: Likewise.
      	* builtins.h: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphbuild.c: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* expr.h: Likewise.
      	* gimple-builder.c: Likewise.
      	* gimple-builder.h: Likewise.
      	* gimple-fold.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-pretty-print.c: Likewise.
      	* gimple-ssa-isolate-paths.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimple-streamer-in.c: Likewise.
      	* gimple-streamer-out.c: Likewise.
      	* gimple-walk.c: Likewise.
      	* gimplify-me.c: Likewise.
      	* gimplify.c: Likewise.
      	* gimplify.h: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* internal-fn.c: Likewise.
      	* internal-fn.def:: Likewise.
      	* internal-fn.h: Likewise.
      	* ipa-icf-gimple.c: Likewise.
      	* ipa-icf-gimple.h: Likewise.
      	* ipa-icf.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-split.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* omp-low.c: Likewise.
      	* predict.c: Likewise.
      	* sanopt.c: Likewise.
      	* sese.c: Likewise.
      	* ssa-iterators.h: Likewise.
      	* stmt.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfg.h: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chkp.c: Likewise.
      	* tree-chkp.h: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-eh.h: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-inline.h: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-into-ssa.h: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-nrv.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-phinodes.h: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-scalar-evolution.h
      	* tree-sra.cn_function):
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-alias.h: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-copy.c: Likewise.
      	* tree-ssa-copyrename.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-ifcombine.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop-unswitch.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-propagate.h: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-sccvn.h: Likewise.
      	* tree-ssa-sink.c: Likewise.
      	* tree-ssa-strlen.c
      	* tree-ssa-structalias.c
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadedge.h: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-tailcall.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-generic.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* ubsan.c: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* vtable-verify.c: Likewise.
      
      gcc/c-family/ChangeLog:
      	Merger of git branch "gimple-classes-v2-option-3".
      	* ChangeLog.gimple-classes: New.
      	* c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
      	from being just a vec<gimple> to a vec<gbind *>.
      
      gcc/java/ChangeLog:
      	Merger of git branch "gimple-classes-v2-option-3".
      	* ChangeLog.gimple-classes: New.
      	* java-gimplify.c (java_gimplify_block): Strengthen local "outer"
      	from gimple to gbind *.
      
      From-SVN: r217787
      David Malcolm committed
  18. 17 Nov, 2014 1 commit
    • tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds… · edcf72f3
      tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin...
      
      	* tree-core.h (built_in_class): Add builtin codes to be used
      	by Pointer Bounds Checker for instrumented builtin functions.
      	* tree-streamer-in.c: Include ipa-chkp.h.
      	(streamer_get_builtin_tree): Created instrumented decl if
      	required.
      	* ipa-chkp.h (chkp_maybe_clone_builtin_fndecl): New.
      	* ipa-chkp.c (chkp_build_instrumented_fndecl): Support builtin
      	function decls.
      	(chkp_maybe_clone_builtin_fndecl): New.
      	(chkp_maybe_create_clone): Support builtin function decls.
      	(chkp_versioning): Clone builtin functions.
      	* tree-chkp.c (chkp_instrument_normal_builtin): New.
      	(chkp_add_bounds_to_call_stmt): Support builtin functions.
      	(chkp_replace_function_pointer): Likewise.
      	* builtins.c (expand_builtin_memcpy_args): New.
      	(expand_builtin_memcpy): Call expand_builtin_memcpy_args.
      	(expand_builtin_memcpy_with_bounds): New.
      	(expand_builtin_mempcpy_with_bounds): New.
      	(expand_builtin_mempcpy_args): Add orig_exp arg. Support
      	BUILT_IN_CHKP_MEMCPY_NOBND_NOCHK
      	(expand_builtin_memset_with_bounds): New.
      	(expand_builtin_memset_args): Support BUILT_IN_CHKP_MEMSET_NOBND_NOCHK.
      	(expand_builtin_with_bounds): New.
      	* builtins.h (expand_builtin_with_bounds): New.
      	* expr.c (expand_expr_real_1): Support instrumented builtin calls.
      
      From-SVN: r217655
      Ilya Enkovich committed
  19. 29 Oct, 2014 1 commit
    • decl.c, [...]: Remove redundant enum from machine_mode. · ef4bddc2
      gcc/ada/
      	* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
      	gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
      	Remove redundant enum from machine_mode.
      
      gcc/c-family/
      	* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
      	enum from machine_mode.
      
      gcc/c/
      	* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
      	machine_mode.
      
      gcc/cp/
      	* constexpr.c: Remove redundant enum from machine_mode.
      
      gcc/fortran/
      	* trans-types.c, trans-types.h: Remove redundant enum from
      	machine_mode.
      
      gcc/go/
      	* go-lang.c: Remove redundant enum from machine_mode.
      
      gcc/java/
      	* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
      	machine_mode.
      
      gcc/lto/
      	* lto-lang.c: Remove redundant enum from machine_mode.
      
      gcc/
      	* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
      	builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
      	cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
      	config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
      	config/aarch64/aarch64.c, config/aarch64/aarch64.h,
      	config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
      	config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
      	config/arc/arc.h, config/arc/predicates.md,
      	config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
      	config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
      	config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
      	config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
      	config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
      	config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
      	config/cr16/cr16-protos.h, config/cr16/cr16.c,
      	config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
      	config/darwin-protos.h, config/darwin.c,
      	config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
      	config/epiphany/epiphany.md, config/fr30/fr30.c,
      	config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
      	config/h8300/h8300-protos.h, config/h8300/h8300.c,
      	config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
      	config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
      	config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
      	config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
      	config/iq2000/iq2000.c, config/iq2000/iq2000.md,
      	config/lm32/lm32-protos.h, config/lm32/lm32.c,
      	config/m32c/m32c-protos.h, config/m32c/m32c.c,
      	config/m32r/m32r-protos.h, config/m32r/m32r.c,
      	config/m68k/m68k-protos.h, config/m68k/m68k.c,
      	config/mcore/mcore-protos.h, config/mcore/mcore.c,
      	config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
      	config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
      	config/mips/mips-protos.h, config/mips/mips.c,
      	config/mmix/mmix-protos.h, config/mmix/mmix.c,
      	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
      	config/moxie/moxie.c, config/msp430/msp430-protos.h,
      	config/msp430/msp430.c, config/nds32/nds32-cost.c,
      	config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
      	config/nds32/nds32-protos.h, config/nds32/nds32.c,
      	config/nios2/nios2-protos.h, config/nios2/nios2.c,
      	config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
      	config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
      	config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
      	config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
      	config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
      	config/s390/predicates.md, config/s390/s390-protos.h,
      	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
      	config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
      	config/sh/sh.md, config/sparc/predicates.md,
      	config/sparc/sparc-protos.h, config/sparc/sparc.c,
      	config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
      	config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
      	config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
      	config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
      	config/tilepro/tilepro.c, config/v850/v850-protos.h,
      	config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
      	config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
      	config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
      	dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
      	doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
      	dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
      	except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
      	fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
      	fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
      	genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
      	graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
      	internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
      	ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
      	libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
      	loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
      	lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
      	lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
      	output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
      	recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
      	regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
      	rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
      	sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
      	simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
      	targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
      	tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
      	tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
      	tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
      	tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
      	tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
      	tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
      	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
      	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
      	tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
      	var-tracking.c, varasm.c: Remove redundant enum from
      	machine_mode.
      gcc/
      	* gengtype.c (main): Treat machine_mode as a scalar typedef.
      	* genmodes.c (emit_insn_modes_h): Hide inline functions if
      	USED_FOR_TARGET.
      
      From-SVN: r216834
      Richard Sandiford committed
  20. 22 Oct, 2014 1 commit
    • Makefile.in (OBJS): Add gimple-match.o and generic-match.o. · 3d2cf79f
      2014-10-22  Richard Biener  <rguenther@suse.de>
      	Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
      
      	* Makefile.in (OBJS): Add gimple-match.o and generic-match.o.
      	(MOSTLYCLEANFILES): Add gimple-match.c and generic-match.c.
      	(gimple-match.c): Generate by triggering s-match.
      	(generic-match.c): Likewise.
      	(s-match): Rule to build gimple-match.c and generic-match.c
      	by running the genmatch generator program.
      	(build/hash-table.o): Dependencies to build hash-table.c for the host.
      	(build/genmatch.o): Dependencies to build genmatch.
      	(genprog): Add match.
      	(build/genmatch): Likewise.
      	(TEXI_GCCINT_FILES): Add match-and-simplify.texi.
      	* generic-match-head.c: New file.
      	* gimple-match-head.c: Likewise.
      	* gimple-match.h: Likewise.
      	* genmatch.c: Likewise.
      	* match.pd: Likewise.
      	* builtins.h (fold_builtin_n): Export.
      	* builtins.c (fold_builtin_n): Likewise.
      	* gimple-fold.h (gimple_build): Declare various overloads.
      	(gimple_simplify): Likewise.
      	(gimple_convert): Re-implement in terms of gimple_build.
      	* gimple-fold.c (gimple_convert): Remove.
      	(gimple_build): New functions.
      
      	* doc/match-and-simplify.texi: New file.
      	* doc/gccint.texi: Add menu item Match and Simplify and include
      	match-and-simplify.texi.
      
      Co-Authored-By: Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
      
      From-SVN: r216542
      Richard Biener committed
  21. 09 Sep, 2014 1 commit
    • bb-reorder.h (default_target_bb_reorder): Remove redundant GTY. · 1942d1a9
      gcc/
      	* bb-reorder.h (default_target_bb_reorder): Remove redundant GTY.
      	* builtins.h (default_target_builtins): Likewise.
      	* gcse.h (default_target_gcse): Likewise.
      	* target-globals.h (target_globals): Add a destructor.  Convert
      	void-pointer fields back to their real type and change from
      	GTY((atomic)) to GTY((skip)).
      	(restore_target_globals): Remove casts accordingly.
      	* target-globals.c (save_target_globals): Use XCNEW rather than
      	ggc_internal_cleared_alloc to allocate non-GC structures.
      	Use ggc_cleared_alloc to allocate the target_globals structure
      	itself.
      	(target_globals::~target_globals): Define.
      
      From-SVN: r215063
      Richard Sandiford committed
  22. 08 Aug, 2014 1 commit
    • builtins.c (c_getstr, [...]): Export. · fef5a0d9
      2014-08-08  Richard Biener  <rguenther@suse.de>
      
      	* builtins.c (c_getstr, readonly_data_expr, init_target_chars,
      	target_percent, target_percent_s): Export.
      	(var_decl_component_p, fold_builtin_memory_op, fold_builtin_memset,
      	fold_builtin_bzero, fold_builtin_strcpy, fold_builtin_strncpy,
      	fold_builtin_strcat, fold_builtin_fputs, fold_builtin_memory_chk,
      	fold_builtin_stxcpy_chk, fold_builtin_stxncpy_chk,
      	fold_builtin_sprintf_chk_1, fold_builtin_snprintf_chk_1):
      	Move to gimple-fold.c.
      	(fold_builtin_2): Remove handling of bzero, fputs, fputs_unlocked,
      	strcat and strcpy.
      	(fold_builtin_3): Remove handling of memset, bcopy, memcpy,
      	mempcpy, memmove, strncpy, strcpy_chk and stpcpy_chk.
      	(fold_builtin_4): Remove handling of memcpy_chk, mempcpy_chk,
      	memmove_chk, memset_chk, strncpy_chk and stpncpy_chk.
      	(rewrite_call_expr_array): Remove.
      	(fold_builtin_sprintf_chk): Likewise.
      	(fold_builtin_snprintf_chk): Likewise.
      	(fold_builtin_varargs): Remove handling of sprintf_chk,
      	vsprintf_chk, snprintf_chk and vsnprintf_chk.
      	(gimple_fold_builtin_sprintf_chk): Remove.
      	(gimple_fold_builtin_snprintf_chk): Likewise.
      	(gimple_fold_builtin_varargs): Likewise.
      	(fold_call_stmt): Do not call gimple_fold_builtin_varargs.
      	* predict.c (optimize_bb_for_size_p): Handle NULL bb.
      	* gimple.c (gimple_seq_add_seq_without_update): New function.
      	* gimple.h (gimple_seq_add_seq_without_update): Declare.
      	* gimple-fold.c: Include output.h.
      	(gsi_replace_with_seq_vops): New function, split out from ...
      	(gimplify_and_update_call_from_tree): ... here.
      	(replace_call_with_value): New function.
      	(replace_call_with_call_and_fold): Likewise.
      	(var_decl_component_p): Moved from builtins.c.
      	(gimple_fold_builtin_memory_op): Moved from builtins.c
      	fold_builtin_memory_op and rewritten to GIMPLE.
      	(gimple_fold_builtin_memset): Likewise.
      	(gimple_fold_builtin_strcpy): Likewise.
      	(gimple_fold_builtin_strncpy): Likewise.
      	(gimple_fold_builtin_strcat): Likewise.
      	(gimple_fold_builtin_fputs): Likewise.
      	(gimple_fold_builtin_memory_chk): Likewise.
      	(gimple_fold_builtin_stxcpy_chk): Likewise.
      	(gimple_fold_builtin_stxncpy_chk): Likewise.
      	(gimple_fold_builtin_snprintf_chk): Likewise.
      	(gimple_fold_builtin_sprintf_chk): Likewise.
      	(gimple_fold_builtin_strlen): New function.
      	(gimple_fold_builtin_with_strlen): New function split out from
      	gimple_fold_builtin.
      	(gimple_fold_builtin): Change signature and handle
      	bzero, memset, bcopy, memcpy, mempcpy and memmove folding
      	here.  Call gimple_fold_builtin_with_strlen.
      	(gimple_fold_call): Adjust.
      
      	* gcc.dg/strlenopt-8.c: Remove XFAIL.
      	* gcc.dg/tree-prof/stringop-2.c: Adjust.
      	* gfortran.dg/array_memcpy_4.f90: Likewise.
      	* gfortran.dg/trim_optimize_1.f90: Likewise.
      	* gfortran.dg/trim_optimize_2.f90: Likewise.
      
      From-SVN: r213753
      Richard Biener committed
  23. 02 Jun, 2014 1 commit
    • expr.h: Remove prototypes of functions defined in builtins.c. · 9b2b7279
      	* expr.h: Remove prototypes of functions defined in builtins.c.
      	* tree.h: (build_call_expr_*, build_string_literal): Add prototypes.
      	Remove prototypes of functions defined in builtins.c.
      	* builtins.h: Update prototype list to include all exported functions.
      	* builtins.c: (default_libc_has_function, gnu_libc_has_function,
      	no_c99_libc_has_function): Move to targhooks.c
      	(build_string_literal, build_call_expr_loc_array,
      	build_call_expr_loc_vec, build_call_expr_loc, build_call_expr): Move
      	to tree.c.
      	(expand_builtin_object_size, fold_builtin_object_size): Make static.
      	* targhooks.c (default_libc_has_function, gnu_libc_has_function,
      	no_c99_libc_has_function): Relocate from builtins.c.
      	* tree.c: Include builtins.h.
      	(build_call_expr_loc_array, build_call_expr_loc_vec,
      	build_call_expr_loc, build_call_expr, build_string_literal): Relocate
      	from builtins.c.
      	* fold-const.h (fold_fma): Move prototype to builtins.h.
      	* realmpfr.h (do_mpc_arg2): Move prototype to builtins.h.
      
      	* fortran/trans.c (trans_runtime_error_vararg): Call
      	fold_build_call_array_loc instead of fold_builtin_call_array.
      
      	* asan.c: Include builtins.h.
      	* cfgexpand.c: Likewise.
      	* convert.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* except.c: Likewise.
      	* expr.c: Likewise.
      	* fold-const.c: Likewise.
      	* gimple-fold.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimplify.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* stmt.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      
      	c
      	* c-decl.c: Include builtins.h.
      	* c-parser.c: Likewise.
      
      	cp
      	* decl.c: Include builtins.h.
      	* semantics.c: Likewise.
      
      	go
      	* go-gcc.cc: Include builtins.h.
      
      	lto
      	* lto-symtab.c: Include builtins.h.
      
      	config
      	* aarch64/aarch64.c: Include builtins.h.
      	* alpha/alpha.c: Likewise.
      	* arc/arc.c: Likewise.
      	* arm/arm.c: Likewise.
      	* avr/avr.c: Likewise.
      	* bfin/bfin.c: Likewise.
      	* c6x/c6x.c: Likewise.
      	* cr16/cr16.c: Likewise.
      	* cris/cris.c: Likewise.
      	* epiphany/epiphany.c: Likewise.
      	* fr30/fr30.c: Likewise.
      	* frv/frv.c: Likewise.
      	* h8300/h8300.c: Likewise.
      	* i386/i386.c: Likewise.
      	* i386/winnt.c: Likewise.
      	* ia64/ia64.c: Likewise.
      	* iq2000/iq2000.c: Likewise.
      	* lm32/lm32.c: Likewise.
      	* m32c/m32c.c: Likewise.
      	* m32r/m32r.c: Likewise.
      	* m68k/m68k.c: Likewise.
      	* mcore/mcore.c: Likewise.
      	* mep/mep.c: Likewise.
      	* microblaze/microblaze.c: Likewise.
      	* mips/mips.c: Likewise.
      	* mmix/mmix.c: Likewise.
      	* mn10300/mn10300.c: Likewise.
      	* moxie/moxie.c: Likewise.
      	* msp430/msp430.c: Likewise.
      	* nds32/nds32.c: Likewise.
      	* pa/pa.c: Likewise.
      	* pdp11/pdp11.c: Likewise.
      	* picochip/picochip.c: Likewise.
      	* rl78/rl78.c: Likewise.
      	* rs6000/rs6000.c: Likewise.
      	* rx/rx.c: Likewise.
      	* s390/s390.c: Likewise.
      	* score/score.c: Likewise.
      	* sh/sh.c: Likewise.
      	* sparc/sparc.c: Likewise.
      	* spu/spu.c: Likewise.
      	* stormy16/stormy16.c: Likewise.
      	* tilegx/tilegx.c: Likewise.
      	* tilepro/tilepro.c: Likewise.
      	* v850/v850.c: Likewise.
      	* vax/vax.c: Likewise.
      	* xtensa/xtensa.c: Likewise.
      
      From-SVN: r211145
      Andrew MacLeod committed
  24. 02 Jan, 2014 1 commit
  25. 17 Nov, 2013 1 commit
    • gimple.h: Reorder prototypes to match .c declaration order... · 1fe37220
      
      	* gimple.h: Reorder prototypes to match .c declaration order, and remove
      	protyotypes for functions not in gimple.c.
      	(LABEL): Move to tree-into-ssa.c.
      	* gimple.c: Remove unused prototypes.
      	(get_base_address): Move to tree.c.
      	* tree.c (get_base_address): Relocate from gimple.c.
      	* builtins.h (validate_gimple_arglist): Add prototype.
      	* trans-mem.h (compute_transaction_bits, is_tm_ending): Add prototype.
      	* cfgexpand.h: New File.
      	(gimple_assign_rhs_to_tree, estimated_stack_frame_size): Add protoype.
      	* tree.h (build_addr): Move to tree-nested.h.
      	* tree-nested.h: New File.
      	(build_addr, lower_nested_functions, insert_field_into_struct): Add
      	prototypes.
      	* tree-inline.h (estimated_stack_frame_size): Remove prototype.
      	* ipa-inline-analysis.c: Include cfgexpand.h.
      	* cgraphunit.c: Include tree-nested.h.
      	* omp-low.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* gimple-low.h: Likewise.
      	* tree-profile.h: Likewise.
      	* expr.c: Include cfgexpand.h.
      	* tree-affine.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssa-loop-im.c: Include trans-mem.h.
      	* tree-ssa-tail-merge.c: Likewise.
      	* value-prof.c: Include builtins.h and tree-nested.h.
      	* tree-into-ssa.c (LABEL): Define here.
      
      	* fortran/trans-intrinsic.c: Include tree-nested.h.
      
      From-SVN: r204919
      Andrew MacLeod committed
  26. 10 Jan, 2013 1 commit
  27. 12 Jul, 2010 1 commit
    • Makefile.in (target-globals.o): Depend on builtins.h. · fa19795e
      gcc/
      	* Makefile.in (target-globals.o): Depend on builtins.h.
      	* builtins.h: New file.
      	* builtins.c: Include builtins.h.
      	(default_target_builtins): New variable.
      	(this_target_builtins): New conditional variable.
      	(apply_args_mode, apply_result_mode): Redefine as macros.
      	* target-globals.h (this_target_builtins): Declare.
      	(target_globals): Add a builtins field.
      	(restore_target_globals): Copy the builtins field to
      	this_target_builtins.
      	* target-globals.c: Include builtins.h.
      	(default_target_globals): Initialize the builtins field.
      	(save_target_globals): Likewise.
      
      From-SVN: r162105
      Richard Sandiford committed