aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
AgeCommit message (Collapse)AuthorFilesLines
2011-11-18Add _mm_stream_si64.H.J. Lu1-0/+1
2011-11-18 H.J. Lu <hongjiu.lu@intel.com> PR target/33944 * doc/extend.texi: Document __builtin_ia32_movnti64. * config/i386/emmintrin.h (_mm_stream_si64): New. * config/i386/i386-builtin-types.def: Add VOID_FTYPE_PLONGLONG_LONGLONG. * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MOVNTI64. (bdesc_special_args): Update __builtin_ia32_movnti. Add __builtin_ia32_movnti64. (ix86_expand_special_args_builtin): Handle VOID_FTYPE_PLONGLONG_LONGLONG. * config/i386/i386.md (UNSPEC_MOVNTI): New. * config/i386/sse.md (sse2_movntsi): Renamed to ... (sse2_movnti<mode>): This. From-SVN: r181491
2011-11-16* doc/invoke.texi: Document AMD bdver1 and btver1.Venkataramanan Kumar1-0/+9
From-SVN: r181417
2011-11-14Fix a cross reference.Mingjie Xing1-1/+1
From-SVN: r181346
2011-11-13install.texi (Specific): Fix anchor for x86_64-*-solaris2.1[0-9]*.Jonathan Wakely1-1/+1
* doc/install.texi (Specific): Fix anchor for x86_64-*-solaris2.1[0-9]*. From-SVN: r181338
2011-11-13gcov.c (source_prefix, [...]): New globals.Nathan Sidwell1-2/+20
* gcov.c (source_prefix, source_length): New globals. (flag_relative_only): Likewise. (print_usage, options, process_args): Update. (generate_results): Use coverage.name, check flag_relative_only. Adjust messages. (find_source): Check source_prefix. (output_lines): Use coverage.name, adjust messages. * doc/gcov.texi (Invoking Gcov): Document new options. From-SVN: r181335
2011-11-12gcov.c (struct name_map): New.Nathan Sidwell1-12/+17
* gcov.c (struct name_map): New. (names, n_names, a_names): New global vars. (print_usage): Adjust usage. (generate_results): Canonicalize main file name. (release_structures): Adjust. (name_search, name_sort): New callbacks. (find_source): Look for and create a canonical name. (canonicalize_name): New. (make_gcov_file_name): Reimplement and fix mangling. (mangle_name): New. * doc/gcov.texi: Update documentation about path preservation. testsuite/ * gcc.misc-tests/gcov-15.c: New. From-SVN: r181309
2011-11-10extend.texi: Document __atomic_test_and_set and __atomic_clear.Andrew MacLeod1-0/+21
2011-11-10 Andrew MacLeod <amacleod@redhat.com> * doc/extend.texi: Document __atomic_test_and_set and __atomic_clear. From-SVN: r181273
2011-11-09re PR c++/51045 (erroneous zero as null pointer constant warning at delete)Paolo Carlini1-1/+1
/cp 2011-11-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51045 * init.c (build_new_1, build_vec_delete_1, build_delete): Use nullptr_node. /testsuite 2011-11-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51045 * g++.dg/warn/Wzero-as-null-pointer-constant-2.C: New. 2011-11-09 Paolo Carlini <paolo.carlini@oracle.com> * doc/invoke.texi ([Option Summary, C++ Language Options]): Add -Wzero-as-null-pointer-constant. From-SVN: r181214
2011-11-09Matthew Gretton-Dann <matthew.gretton-dann@arm.com>Matthew Gretton-Dann1-2/+2
* config/arm/arm-cores.def: Add -mcpu=cortex-a7. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Likewise. * config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex A-7. * doc/invoke.texi: Document -mcpu=cortex-a7. From-SVN: r181210
2011-11-08tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument.Ulrich Weigand2-14/+22
* doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08Merge from transactional-memory branch.Aldy Hernandez3-0/+32
From-SVN: r181154
2011-11-07Allow libcalls to be installed for legacy __sync optabs.Richard Henderson1-0/+11
This allows a target which implements the __sync interfaces in libgcc to continue to use them transparently with the new __atomic builtins. It is assumed that these libgcc routines DO NOT use spinlocks. This is true of all extant libgcc instances. * optabs.h (OTI_sync_compare_and_swap, OTI_sync_lock_test_and_set, OTI_sync_old_add, OTI_sync_old_sub, OTI_sync_old_ior, OTI_sync_old_and, OTI_sync_old_xor, OTI_sync_old_nand, OTI_sync_new_add, OTI_sync_new_sub, OTI_sync_new_ior, OTI_sync_new_and, OTI_sync_new_xor, OTI_sync_new_nand): Move and rename from the direct_optab_index enum. (sync_compare_and_swap_optab, sync_lock_test_and_set_optab, sync_old_add_optab, sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab, sync_new_nand_optab): Read from the optab_table, not the direct_optab_table. (init_sync_libfuncs): Declare. (can_compare_and_swap_p): Update parameters. * optabs.c (init_sync_libfuncs_1, init_sync_libfuncs): New. (can_compare_and_swap_p): Add allow_libcall parameter; if true, test for the legacy compare-and-swap libcall. (expand_atomic_exchange): Use the legacy test-and-set libcall. (expand_atomic_compare_and_swap): Use the legacy CAS libcall. (struct atomic_op_functions): Update for optab type changes. (maybe_emit_op): Likewise. (expand_atomic_fetch_op): Use the legacy fetch-op libcalls. * builtins.c (fold_builtin_atomic_always_lock_free): Update call to can_compare_and_swap_p. * omp-low.c (expand_omp_atomic_fetch_op): Likewise. (expand_omp_atomic_pipeline): Likewise. * genopinit.c (optabs): Make sync_old_*_optab, sync_new_*_optab, sync_compare_and_swap_optab, sync_lock_test_and_set_optab regular optabs. From-SVN: r181134
2011-11-07atomic_base.h (atomic_thread_fence): Call builtin.Andrew MacLeod1-7/+1
2011-11-07 Andrew MacLeod <amacleod@redhat.com> libstdc++-v3 * include/bits/atomic_base.h (atomic_thread_fence): Call builtin. (atomic_signal_fence): Call builtin. (atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree, otherwise fall back to call __sync_lock_test_and_set. (atomic_flag::clear): Call __atomic_store when it is lockfree, otherwise fall back to call __sync_lock_release. gcc * doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and __atomic_store. * optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set only when originated from that builtin. (expand_atomic_store): Expand to __sync_lock_release when originated from that builtin. * builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that expand_atomic_exchange call originated from here. (expand_builtin_sync_lock_release): Add flag that expand_atomic_store call originated from here. (expand_builtin_atomic_exchange): Add origination flag. (expand_builtin_atomic_store): Add origination flag. * expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean parameters to indicate implementation fall back options. From-SVN: r181111
2011-11-07re PR tree-optimization/50789 (Gather vectorization)Jakub Jelinek2-0/+16
PR tree-optimization/50789 * tree-vect-stmts.c (process_use): Add force argument, avoid exist_non_indexing_operands_for_use_p check if true. (vect_mark_stmts_to_be_vectorized): Adjust callers. Handle STMT_VINFO_GATHER_P. (gen_perm_mask): New function. (perm_mask_for_reverse): Use it. (reverse_vec_element): Rename to... (permute_vec_elements): ... this. Add Y and MASK_VEC arguments, generalize for any permutations. (vectorizable_load): Adjust caller. Handle STMT_VINFO_GATHER_P. * target.def (TARGET_VECTORIZE_BUILTIN_GATHER): New hook. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_GATHER): Document it. * doc/tm.texi: Regenerate. * tree-data-ref.c (initialize_data_dependence_relation, compute_self_dependence): No longer static. * tree-data-ref.h (initialize_data_dependence_relation, compute_self_dependence): New prototypes. * tree-vect-data-refs.c (vect_check_gather): New function. (vect_analyze_data_refs): Detect possible gather load data refs. * tree-vectorizer.h (struct _stmt_vec_info): Add gather_p field. (STMT_VINFO_GATHER_P): Define. (vect_check_gather): New prototype. * config/i386/i386-builtin-types.def: Add types for alternate gather builtins. * config/i386/sse.md (AVXMODE48P_DI): Remove. (VEC_GATHER_MODE): Rename mode_attr to... (VEC_GATHER_IDXSI): ... this. (VEC_GATHER_IDXDI, VEC_GATHER_SRCDI): New mode_attrs. (avx2_gathersi<mode>, *avx2_gathersi<mode>): Use <VEC_GATHER_IDXSI> instead of <VEC_GATHER_MODE>. (avx2_gatherdi<mode>): Use <VEC_GATHER_IDXDI> instead of <<AVXMODE48P_DI> and <VEC_GATHER_SRCDI> instead of VEC_GATHER_MODE on src and mask operands. (*avx2_gatherdi<mode>): Likewise. Use VEC_GATHER_MODE iterator instead of AVXMODE48P_DI. (avx2_gatherdi<mode>256, *avx2_gatherdi<mode>256): Removed. * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_GATHERALTSIV4DF, IX86_BUILTIN_GATHERALTDIV8SF, IX86_BUILTIN_GATHERALTSIV4DI and IX86_BUILTIN_GATHERALTDIV8SI. (ix86_init_mmx_sse_builtins): Create those builtins. (ix86_expand_builtin): Handle those builtins and adjust expansions of other gather builtins. (ix86_vectorize_builtin_gather): New function. (TARGET_VECTORIZE_BUILTIN_GATHER): Define. * gcc.target/i386/avx2-gather-1.c: New test. * gcc.target/i386/avx2-gather-2.c: New test. * gcc.target/i386/avx2-gather-3.c: New test. * gcc.target/i386/avx2-gather-4.c: New test. From-SVN: r181089
2011-11-06Check in patch/merge from cxx-mem-model BranchAndrew Macleod3-4/+402
From-SVN: r181031
2011-11-05config.gcc (epiphany-*-*): New architecture.Joern Rennecke5-5/+253
gcc: * config.gcc (epiphany-*-*): New architecture. (epiphany-*-elf): New configuration. * config/epiphany, common/config/epiphany : New directories. * doc/extend.texi (disinterrupt attribute): Add Epiphany. (interrupt attribute): Add Epiphany. (long_call, short_call attribute): Add Epiphany. * doc/invoke.texi (Options): Add Epiphany options. * doc/md.texi (Machine Constraints): Add Epiphany constraints. * doc/install.texi (Options specification): Add --with-stack-offset=@var{num} description. (host/target specific issues): Add epiphany-*-elf. * doc/contrib.texi (Contributors): Mention Epiphany port. gcc/testsuite: * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Disable test on Epiphany. * gcc.c-torture/execute/20101011-1.c: Disable test on Epiphany. * gcc.dg/stack-usage-1.c [__epiphany__] (SIZE): Define. * gcc.dg/pragma-pack-3.c: Disable test on Epiphany. * g++.dg/parse/pragma3.C: Likewise. * stackalign/builtin-apply-2.c (STACK_ARGUMENTS_SIZE): Define. (bar): Use it. * gcc.dg/weak/typeof-2.c [epiphany-*-*]: Add option -mshort-calls. * gcc.dg/tls/thr-cse-1.c: Likewise. * g++.dg/opt/devirt2.C: Likewise. * gcc.dg/20020312-2.c [epiphany-*-*] (PIC_REG): Define. * gcc.dg/builtin-apply2.c [__epiphany__]: (STACK_ARGUMENTS_SIZE): 20. * gcc.target/epiphany: New directory. libgcc: * config.host (epiphany-*-elf*): New configuration. * config/epiphany: New Directory. contrib: * contrib-list.mk: Add Epiphany configurations. From-SVN: r181016
2011-11-02re PR c++/50810 (c++0x-compat does not warn about narrowing conversions)Jason Merrill1-7/+13
PR c++/50810 gcc/c-family * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default Wnarrowing for C++0x and C++98. * c.opt ([Wnarrowing]): Update. gcc/cp * typeck2.c (check_narrowing): Adjust OPT_Wnarrowing diagnostics. (digest_init_r): Call check_narrowing irrespective of the C++ dialect. * decl.c (check_initializer): Likewise. * semantics.c (finish_compound_literal): Likewise. gcc/ * configure.ac: Add -Wno-narrowing to warning options. libcpp/ * configure.ac: Add -Wno-narrowing to warning options. From-SVN: r180794
2011-11-01re PR c++/44277 ([C++0x] Add warning to facilitate nullptr conversion.)Paolo Carlini1-0/+6
/cp 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/44277 * cvt.c (cp_convert_to_pointer): Warn for zero as null pointer constant. * typeck.c (cp_truthvalue_conversion): Handle pointers and member function pointers under c_inhibit_evaluation_warnings; use nullptr_node for data member pointers. (cp_build_binary_op): Tweak, just forward to cp_convert op1, either a nullptr_node or an integer_zero_node. (build_ptrmemfunc): Use nullptr_node. * init.c (build_zero_init_1): Likewise. /c-family 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/44277 * c.opt: Add Wzero-as-null-pointer-constant. /gcc 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/44277 * doc/invoke.texi: Document -Wzero-as-null-pointer-constant. /testsuite 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/44277 * g++.dg/warn/Wzero-as-null-pointer-constant-1.C: New. * g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C: Likewise. From-SVN: r180750
2011-11-01* c.opt (-fdeduce-init-list): Off by default.Jason Merrill1-6/+7
From-SVN: r180728
2011-11-01* doc/invoke.texi: Update for -std=c++11.Jason Merrill1-19/+16
From-SVN: r180726
2011-10-27re PR c++/30066 (option to make inline functions hidden)Roberto Agostino Vitillo1-1/+1
PR c++/30066 gcc/c-family: * c.opt (fvisibility-inlines-hidden): Description change. gcc/cp: * decl2.c (determine_hidden_inline): New function. (determine_visibility): fvisibility-inlines-hidden affects inline functions. From-SVN: r180589
2011-10-26invoke.texi (sink-frequency-threshold): Document.Jeff Law1-0/+13
* doc/invoke.texi (sink-frequency-threshold): Document. * tree-ssa-sink.c: Include params.h. (select_best_block): New function. (statement_sink_location): Use it. * params.def (SINK_FREQUENCY_THRESHOLD): New PARAM. From-SVN: r180524
2011-10-25Change vec_perm checking and expansion level.Richard Henderson1-1/+1
The can_vec_perm_p interface changed to use a C integer array. This allows easy re-use from the rtl level and the gimple level within the vectorizer. It allows both to determine if a given permutation is (un-)supported without having to create tree/rtl garbage. The expand_vec_perm interface changed to use rtl. This allows easy re-use from the rtl level, so that expand_vec_perm can be used in the fallback implementation of other optabs. * target.def (vec_perm_const_ok): Change parameters to mode and array of indicies. * doc/tm.texi: Rebuild. * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change parameters to mode and array of indicies. * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Expand operands here. * optabs.c (can_vec_perm_p): Rename from can_vec_perm_expr_p. Change parameters to mode and array of indicies. (expand_vec_perm_1): Rename from expand_vec_perm_expr_1. (expand_vec_perm): Rename from expand_vec_perm_expr. Change parameters to mode and rtx inputs. Try lowering to QImode vec_perm_const before trying fully variable permutation. * optabs.h: Update decls. * tree-vect-generic.c (lower_vec_perm): Extract array of indices from VECTOR_CST to pass to can_vec_perm_p. * tree-vect-slp.c (vect_get_mask_element): Change mask parameter type from int pointer to unsigned char pointer. (vect_transform_slp_perm_load): Update for change to can_vec_perm_p. * tree-vect-stmts.c (perm_mask_for_reverse): Likewise. From-SVN: r180449
2011-10-25Delete remaining references to sparc little-endian support.David S. Miller1-6/+0
* config/sparc/little-endian.opt: Delete. * config.gcc: Remove references to config/sparc/little-endian.opt * doc/invoke.texi: Remove documentation of -mlittl-endian on sparc. * config/sparc/linux64.h: Delete references to -mlittle-endian. * config/sparc/netbsd-elf.h: Likewise. * config/sparc/openbsd64.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sp64-elf.h: Likewise and delete overrides for BYTES_BIG_ENDIAN and WORDS_BIG_ENDIAN. * config/sparc/sparc.c (dump_target_flag_bits): Remove reference to MASK_LITTLE_ENDIAN. * config/sparc/sparc.opt (Mask(LITTLE_ENDIAN)): Delete. From-SVN: r180425
2011-10-24re PR target/50820 ([avr] Use EIND consistently)Georg-Johann Lay1-0/+111
PR target/50820 Port from 4.6 branch r180379 * doc/invoke.texi (AVR Options): New subsubsection to explain EIND handling and indirect jump/calls on devices > 128k. From-SVN: r180388
2011-10-24re PR target/49824 ([avr] Missing documentation for OS_task and OS_main ↵Anatoly Sokolov1-10/+40
attributes) PR target/49824 * doc/extend.texi (Declaring Attributes of Functions): Document OS_main and OS_task attributes. (Specifying Attributes of Variables): Move up subsection "AVR Variable Attributes" as of alphabetical order. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r180385
2011-10-23re PR c++/50841 (bootstrap failure: narrowing conversion of ↵Paolo Carlini1-7/+5
'-0x00000000000000001' from 'int' in tree-object-size.c) /c-family 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default Wnarrowing for C++0x and C++98. * c.opt ([Wnarrowing]): Update. /cp 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * typeck2.c (check_narrowing): Adjust OPT_Wnarrowing diagnostics. (digest_init_r): Call check_narrowing irrespective of the C++ dialect. * decl.c (check_initializer): Likewise. * semantics.c (finish_compound_literal): Likewise. /testsuite 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * g++.dg/cpp0x/warn_cxx0x2.C: New. * g++.dg/cpp0x/warn_cxx0x3.C: Likewise. 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * doc/invoke.texi ([-Wnarrowing], [-Wc++0x-compat]): Update. From-SVN: r180348
2011-10-23re PR c++/50810 (c++0x-compat does not warn about narrowing conversions)Paolo Carlini1-5/+7
/c-family 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default Wnarrowing for C++0x and C++98. * c.opt ([Wnarrowing]): Update. /cp 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * typeck2.c (check_narrowing): Adjust OPT_Wnarrowing diagnostics. (digest_init_r): Call check_narrowing irrespective of the C++ dialect. * decl.c (check_initializer): Likewise. * semantics.c (finish_compound_literal): Likewise. /testsuite 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * g++.dg/cpp0x/warn_cxx0x2.C: New. * g++.dg/cpp0x/warn_cxx0x3.C: Likewise. 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * doc/invoke.texi ([-Wnarrowing], [-Wc++0x-compat]): Update. From-SVN: r180343
2011-10-20target.def (vec_perm_const_ok): Rename from builtin_vec_perm_ok.Richard Henderson2-2/+2
* target.def (vec_perm_const_ok): Rename from builtin_vec_perm_ok. * optabs.c (can_vec_perm_expr_p): Update to match. (expand_vec_perm_expr): Likewise. * config/i386/i386.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Rename from TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK. * doc/tm.texi.in: Likewise. From-SVN: r180270
2011-10-20Remove TARGET_VECTORIZE_BUILTIN_VEC_PERM.Richard Henderson2-10/+2
From-SVN: r180266
2011-10-20re PR target/47989 (-mrecip causes 482.sphinx3, 464.h264ref and 481.wrf to ↵Uros Bizjak1-1/+6
miscompare) PR target/47989 * config/i386/i386.h (RECIP_MASK_DEFAULT): New define. * config/i386/i386.op (recip_mask): Initialize with RECIP_MASK_DEFAULT. * doc/invoke.texi (ix86 Options, -mrecip): Document that GCC implements vectorized single float division and vectorized sqrtf(x) with reciprocal sequence with additional Newton-Raphson step with -ffast-math. From-SVN: r180256
2011-10-20Use @smallexample instead of @quotation in cppopts.texiDodji Seketeli1-2/+2
gcc/ PR other/50659 * doc/cppopts.texi: Use @smallexample/@end smallexample in documentation for -fdebug-cpp instead of @quotation/@end quotation that is not supported by contrib/texi2pod.pl. From-SVN: r180250
2011-10-19re PR middle-end/49310 (Compile time hog in var-tracking emit)Alexandre Oliva1-2/+1
PR debug/49310 * var-tracking.c (loc_exp_dep, onepart_aux): New structs. (variable_part): Replace offset with union. (enum onepart_enum, onepart_enum_t): New. (variable_def): Drop cur_loc_changed, add onepart. (value_chain_def, const_value_chain): Remove. (VAR_PART_OFFSET, VAR_LOC_1PAUX): New macros, with checking. (VAR_LOC_DEP_LST, VAR_LOC_DEP_LSTP): New macros. (VAR_LOC_FROM, VAR_LOC_DEPTH, VAR_LOC_DEP_VEC): Likewise. (value_chain_pool, value_chains): Remove. (dropped_values): New. (struct parm_reg): Only if HAVE_window_save. (vt_stack_adjustments): Don't record register arguments. (dv_as_rtx): New. (dv_onepart_p): Return a onepart_enum_t. (onepart_pool): New. (dv_pool): Remove. (dv_from_rtx): New. (variable_htab_free): Release onepart aux data. Reset flags. (value_chain_htab_hash, value_chain_htab_eq): Remove. (unshare_variable): Use onepart field. Propagate onepart aux data or offset. Drop cur_loc_changed. (val_store): Cope with NULL insn. Rephrase dump output. Check for unsuitable locs. Add FIXME on using cselib locs. (val_reset): Remove FIXME of unfounded concerns. (val_resolve): Check for unsuitable locs. Add FIXME on using cselib locs. (variable_union): Use onepart field, adjust access to offset. (NO_LOC_P): New. (VALUE_CHANGED, DECL_CHANGED): Update doc. (set_dv_changed): Clear NO_LOC_P when changed. (find_loc_in_1pdv): Use onepart field. (intersect_loc_chains): Likewise. (unsuitable_loc): New. (loc_cmp): Keep ENTRY_VALUEs at the end of the loc list. (add_value_chain, add_value_chains): Remove. (add_cselib_value_chains, remove_value_chain): Likewise. (remove_value_chains, remove_cselib_value_chains): Likewise. (canonicalize_loc_order_check): Use onepart. Drop cur_loc_changed. (canonicalize_values_star, canonicalize_vars_star): Use onepart. (variable_merge_over_cur): Likewise. Adjust access to offset. Drop cur_loc_changed. (variable_merge_over_src): Use onepart field. (remove_duplicate_values): Likewise. (variable_post_merge_new_vals): Likewise. (find_mem_expr_in_1pdv): Likewise. (dataflow_set_preserve_mem_locs): Likewise. Drop cur_loc_changed and value chains. (dataflow_set_remove_mem_locs): Likewise. Use VAR_LOC_FROM. (variable_different_p): Use onepart field. Move onepart test out of the loop. (argument_reg_set): Drop. (add_uses, add_stores): Preserve but do not record in dynamic tables equivalences for ENTRY_VALUEs and CFA_based addresses. Avoid unsuitable address expressions. (EXPR_DEPTH): Unlimit. (EXPR_USE_DEPTH): Repurpose PARAM_MAX_VARTRACK_EXPR_DEPTH. (prepare_call_arguments): Use DECL_RTL_IF_SET. (dump_var): Adjust access to offset. (variable_from_dropped, recover_dropped_1paux): New. (variable_was_changed): Drop cur_loc_changed. Use onepart. Preserve onepart aux in empty_var. Recover empty_var and onepart aux from dropped_values. (find_variable_location_part): Special-case onepart. Adjust access to offset. (set_slot_part): Use onepart. Drop cur_loc_changed. Adjust access to offset. Initialize onepaux. Drop value chains. (delete_slot_part): Drop value chains. Use VAR_LOC_FROM. (VEC (variable, heap), VEC (rtx, stack)): Define. (expand_loc_callback_data): Drop dummy, cur_loc_changed, ignore_cur_loc. Add expanding, pending, depth. (loc_exp_dep_alloc, loc_exp_dep_clear): New. (loc_exp_dep_insert, loc_exp_dep_set): New. (notify_dependents_of_resolved_value): New. (update_depth, vt_expand_var_loc_chain): New. (vt_expand_loc_callback): Revamped. (resolve_expansions_pending_recursion): New. (INIT_ELCD, FINI_ELCD): New. (vt_expand_loc): Use the new macros above. Drop ignore_cur_loc parameter, adjust all callers. (vt_expand_loc_dummy): Drop. (vt_expand_1pvar): New. (emit_note_insn_var_location): Operate on non-debug decls only. Revamp multi-part cur_loc recomputation and one-part expansion. Drop cur_loc_changed. Adjust access to offset. (VEC (variable, heap)): Drop. (changed_variables_stack, changed_values_stack): Drop. (check_changed_vars_0, check_changed_vars_1): Remove. (check_changed_vars_2, check_changed_vars_3): Remove. (values_to_stack, remove_value_from_changed_variables): New. (notify_dependents_of_changed_value, process_changed_values): New. (emit_notes_for_changes): Revamp onepart updates. (emit_notes_for_differences_1): Use onepart. Drop cur_loc_changed and value chains. Propagate onepaux. Recover empty_var and onepaux from dropped_values. (emit_notes_for_differences_2): Drop value chains. (emit_notes_in_bb): Adjust. (vt_emit_notes): Drop value chains, changed_variables_stack. Initialize and release dropped_values. (create_entry_value): Revamp. (vt_add_function_parameter): Use new interface. (note_register_arguments): Remove. (vt_initialize): Drop value chains and register arguments. (vt_finalize): Drop value chains. Release windowed_parm_regs only if HAVE_window_save. * rtl.h: Document various pass-local uses of RTL flags. * tree.h (DECL_RTL_KNOWN_SET): New. * doc/invoke.texi (param max-vartrack-expr-depth): Update description and default. From-SVN: r180194
2011-10-18config.host (arm*-*-linux*): Add driver-arm.o and x-arm.Andrew Stubbs1-0/+16
2011-10-18 Andrew Stubbs <ams@codesourcery.com> gcc/ * config.host (arm*-*-linux*): Add driver-arm.o and x-arm. * config/arm/arm.opt: Add 'native' processor_type and arm_arch enum values. * config/arm/arm.h (host_detect_local_cpu): New prototype. (EXTRA_SPEC_FUNCTIONS): New define. (MCPU_MTUNE_NATIVE_SPECS): New define. (DRIVER_SELF_SPECS): New define. * config/arm/driver-arm.c: New file. * config/arm/x-arm: New file. * doc/invoke.texi (ARM Options): Document -mcpu=native, -mtune=native and -march=native. From-SVN: r180139
2011-10-18md.texi (vec_widen_ushiftl_hi, [...]): Document.Ira Rosen1-0/+11
* doc/md.texi (vec_widen_ushiftl_hi, vec_widen_ushiftl_lo, vec_widen_sshiftl_hi, vec_widen_sshiftl_lo): Document. * tree-pretty-print.c (dump_generic_node): Handle WIDEN_LSHIFT_EXPR, VEC_WIDEN_LSHIFT_HI_EXPR and VEC_WIDEN_LSHIFT_LO_EXPR. (op_code_prio): Likewise. (op_symbol_code): Handle WIDEN_LSHIFT_EXPR. * optabs.c (optab_for_tree_code): Handle VEC_WIDEN_LSHIFT_HI_EXPR and VEC_WIDEN_LSHIFT_LO_EXPR. (init-optabs): Initialize optab codes for vec_widen_u/sshiftl_hi/lo. * optabs.h (enum optab_index): Add OTI_vec_widen_u/sshiftl_hi/lo. * genopinit.c (optabs): Initialize the new optabs. * expr.c (expand_expr_real_2): Handle VEC_WIDEN_LSHIFT_HI_EXPR and VEC_WIDEN_LSHIFT_LO_EXPR. * gimple-pretty-print.c (dump_binary_rhs): Likewise. * tree-vectorizer.h (NUM_PATTERNS): Increase to 8. * tree.def (WIDEN_LSHIFT_EXPR, VEC_WIDEN_LSHIFT_HI_EXPR, VEC_WIDEN_LSHIFT_LO_EXPR): New. * cfgexpand.c (expand_debug_expr): Handle new tree codes. * tree-vect-patterns.c (vect_vect_recog_func_ptrs): Add vect_recog_widen_shift_pattern. (vect_handle_widen_mult_by_const): Rename... (vect_handle_widen_op_by_const): ...to this. Handle shifts. Add a new argument, update documentation. (vect_recog_widen_mult_pattern): Assume that only second operand can be constant. Update call to vect_handle_widen_op_by_const. (vect_recog_over_widening_pattern): Fix typo. (vect_recog_widen_shift_pattern): New. * tree-vect-stmts.c (vectorizable_type_promotion): Handle widening shifts. (supportable_widening_operation): Likewise. * tree-inline.c (estimate_operator_cost): Handle new tree codes. * tree-vect-generic.c (expand_vector_operations_1): Likewise. * tree-cfg.c (verify_gimple_assign_binary): Likewise. * config/arm/neon.md (neon_vec_<US>shiftl_<mode>): New. (vec_widen_<US>shiftl_lo_<mode>, neon_vec_<US>shiftl_hi_<mode>, vec_widen_<US>shiftl_hi_<mode>, neon_vec_<US>shift_left_<mode>): Likewise. * config/arm/predicates.md (const_neon_scalar_shift_amount_operand): New. * config/arm/iterators.md (V_innermode): New. * tree-vect-slp.c (vect_build_slp_tree): Require same shift operand for widening shift. From-SVN: r180128
2011-10-17configure.ac: Add --with-native-system-header-dir.Simon Baldwin4-55/+30
* configure.ac: Add --with-native-system-header-dir. Set and substitute NATIVE_SYSTEM_HEADER_DIR. Use native_system_header when setting target_header_dir. * config.gcc: Always set native_system_header_dir. (*-*-gnu*): Set native_system_header_dir. Don't use t-gnu. (i[34567]86-pc-msdosdjgpp*): Set native_system_header_dir. Don't use i386/t-djgpp. (i[34567]86-*-mingw* | x86_64-*-mingw*): Set native_system_header_dir. (spu-*-elf*): Set native_system_header_dir. * Makefile.in (NATIVE_SYSTEM_HEADER_DIR): Set to @NATIVE_SYSTEM_HEADER_DIR@. (PREPROCESSOR_DEFINES): Define NATIVE_SYSTEM_HEADER_DIR. * cppdefault.c (STANDARD_INCLUDE_DIR): Don't define. (NATIVE_SYSTEM_HEADER_COMPONENT): Rename from STANDARD_INCLUDE_COMPONENT. (cpp_include_defaults): Don't use SYSTEM_INCLUDE_DIR. Rename STANDARD_INCLUDE_DIR to NATIVE_SYSTEM_HEADER_DIR. * system.h: Poison SYSTEM_INCLUDE_DIR, STANDARD_INCLUDE_DIR, and STANDARD_INCLUDE_COMPONENT. * config/i386/t-mingw32 (NATIVE_SYSTEM_HEADER_DIR): Remove. * config/i386/t-mingw-w32: Likewise. * config/i386/t-mingw-w64: Likewise. * config/spu/t-spu-elf: Likewise. * config/i386/t-djgpp: Remove. * config/t-gnu: Remove. * config/i386/mingw32.h (STANDARD_INCLUDE_DIR): Don't define. (NATIVE_SYSTEM_HEADER_COMPONENT): Rename from STANDARD_INCLUDE_COMPONENT. * config/i386/djgpp.h (STANDARD_INCLUDE_DIR): Don't define. * config/spu/spu-elf.h: Likewise. * config/vms/xm-vms.h: Likewise. * config/gnu.h: Likewise. * config/openbsd.h (INCLUDE_DEFAULTS): Change STANDARD_INCLUDE_DIR and STANDARD_INCLUDE_COMPONENT to NATIVE_SYSTEM_HEADER_DIR and NATIVE_SYSTME_HEADER_COMPONENT. * doc/install.texi (Configuration): Document --with-native-system-header-dir. Mention it in the documentation for --with-sysroot and --with-build-sysroot. * doc/tm.texi.in (Driver): Don't document SYSTEM_INCLUDE_DIR or STANDARD_INCLUDE_DIR. Rename STANDARD_INCLUDE_COMPONENT to NATIVE_SYSTEM_HEADER_COMPONENT. Rename uses of STANDARD_INCLUDE_DIR to NATIVE_SYSTEM_HEADER_DIR. * doc/fragments.texi (Target Fragment): Don't document NATIVE_SYSTEM_HEADER_DIR. * configure, doc/tm.texi: Rebuild. Co-Authored-By: Ian Lance Taylor <iant@google.com> From-SVN: r180114
2011-10-17re PR c++/50757 (Cannot turn off -Wnonnull when using C++)Paolo Carlini1-1/+1
/gcc 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50757 * c-family/c.opt ([Wnonnull]): Add C++ and Objective-C++. * doc/invoke.texi: Update. /testsuite 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50757 * g++.dg/warn/format7.C: New. * obj-c++.dg/warn7.mm: Likewise. From-SVN: r180101
2011-10-17Support -fdebug-cpp optionTom Tromey2-1/+14
This patch adds -fdebug-cpp option. When used with -E this dumps the relevant macro map before every single token. This clutters the output a lot but has proved to be invaluable in tracking some bugs during the development of the virtual location support. Co-Authored-By: Dodji Seketeli <dodji@redhat.com> From-SVN: r180084
2011-10-17Generate virtual locations for tokensTom Tromey2-3/+21
This second instalment uses the infrastructure of the previous patch to allocate a macro map for each macro expansion and assign a virtual location to each token resulting from the expansion. To date when cpp_get_token comes across a token that happens to be a macro, the macro expander kicks in, expands the macro, pushes the resulting tokens onto a "token context" and returns a dummy padding token. The next call to cpp_get_token goes look into the token context for the next token [which is going to result from the previous macro expansion] and returns it. If the token is a macro, the macro expander kicks in and you know the story. This patch piggy-backs on that macro expansion process, so to speak. First it modifies the macro expander to make it create a macro map for each macro expansion. It then allocates a virtual location for each resulting token. Virtual locations of tokens resulting from macro expansions are then stored on a special kind of context called an "expanded tokens context". In other words, in an expanded tokens context, there are tokens resulting from macro expansion and their associated virtual locations. cpp_get_token_with_location is modified to return the virtual location of tokens resulting from macro expansion. Note that once all tokens from an expanded token context have been consumed and the context and is freed, the memory used to store the virtual locations of the tokens held in that context is freed as well. This helps reducing the overall peak memory consumption. The client code that was getting macro expansion point location from cpp_get_token_with_location now gets virtual location from it. Those virtual locations can in turn be resolved into the different interesting physical locations thanks to the linemap API exposed by the previous patch. Expensive progress. Possibly. So this whole virtual location allocation business is switched off by default. So by default no extended token is created. No extended token context is created either. One has to use -ftrack-macro-expansion to switch this on. This complicates the code but I believe it can be useful as some of our friends found out at http://llvm.org/bugs/show_bug.cgi?id=5610 The patch tries to reduce the memory consumption by freeing some token context memory that was being reused before. I didn't notice any compilation slow down due to this immediate freeing on my GNU/Linux system. As no client code tries to resolve virtual locations to anything but what was being done before, no new test case has been added. Co-Authored-By: Dodji Seketeli <dodji@redhat.com> From-SVN: r180082
2011-10-14* invoke.texi (AVR Options): Avoid \leq{}.Gerald Pfeifer1-1/+1
From-SVN: r180007
2011-10-14re PR target/46278 (avr-gcc 4.5.1 doing suboptimal reloads using X)Georg-Johann Lay1-1/+18
PR target/46278 * doc/invoke.texi (AVR Options): Document -mstrict-X. * config/avr/avr.opt (-mstrict-X): New option. (avr_strict_X): New variable reflecting -mstrict-X. * config/avr/avr.c (avr_reg_ok_for_addr_p): Add parameter outer_code and pass it down to avr_regno_mode_code_ok_for_base_p. (avr_legitimate_address_p): Pass outer_code to avr_reg_ok_for_addr_p and use that function in case PLUS. (avr_mode_code_base_reg_class): Depend on avr_strict_X. (avr_regno_mode_code_ok_for_base_p): Ditto, and depend on outer_code. (avr_option_override): Disable -fcaller-saves if -mstrict-X is on. From-SVN: r179993
2011-10-14invoke.texi ([Wformat-zero-length]): Tidy.Paolo Carlini1-1/+1
2011-10-14 Paolo Carlini <paolo.carlini@oracle.com> * doc/invoke.texi ([Wformat-zero-length]): Tidy. From-SVN: r179978
2011-10-14re PR c++/17212 (-W(no)format-zero-length does not work with C++)Paolo Carlini1-1/+1
/gcc 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com> PR c++/17212 * c-family/c.opt ([Wformat-zero-length]): Add C++ and Objective-C++. * doc/invoke.texi: Update. /testsuite 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com> PR c++/17212 * g++.dg/warn/format6.C: New. * obj-c++.dg/warn6.mm: Likewise. From-SVN: r179963
2011-10-13Expand vector permutation with vec_perm and vec_perm_const.Richard Henderson1-0/+6
From-SVN: r179958
2011-10-13invoke.texi (SPARC options): Document -mfix-at697f.Eric Botcazou1-4/+10
* doc/invoke.texi (SPARC options): Document -mfix-at697f. * config/sparc/sparc.opt (mfix-at697f): New option. * config/sparc/sparc.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sparc_reorg): New function. From-SVN: r179921
2011-10-11New warning -Wvector-operation-performance.Artjoms Sinkarovs1-1/+14
From-SVN: r179807
2011-10-11c.opt: (fallow-parameterless-variadic-functions): New.Tristan Gingold1-1/+8
c-family/ChangeLog 2011-10-11 Tristan Gingold <gingold@adacore.com> * c.opt: (fallow-parameterless-variadic-functions): New. ChangeLog 2011-10-11 Tristan Gingold <gingold@adacore.com> * doc/invoke.texi (C Dialect Options): Document -fallow-parameterless-variadic-functions. * c-parser.c (c_parser_parms_list_declarator): Handle it. testsuite/ChangeLog 2011-10-11 Tristan Gingold <gingold@adacore.com> * gcc.dg/va-arg-4.c: New test. * gcc.dg/va-arg-5.c: Ditto. From-SVN: r179786
2011-10-10* doc/md.texi (vec_perm_const): Fix typo in cindex.Richard Henderson1-1/+1
From-SVN: r179759
2011-10-08In libobjc/: 2011-10-08 Richard Frith-Macdonald <rfm@gnu.org> Nicola Pero ↵Nicola Pero1-1/+2
<nicola.pero@meta-innovation.com> In libobjc/: 2011-10-08 Richard Frith-Macdonald <rfm@gnu.org> Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/50428 * sendmsg.c (__objc_send_initialize): If a class does not have an +initialize method, search for an +initialize method in the superclass and in the ancestor classes and execute the first one that is found. This makes the GNU runtime behave in the same way as the Apple/NeXT runtime with respect to +initialize methods and subclassing. In gcc/: 2011-10-08 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/50428 * doc/objc.texi (Garbage Collection): Updated example to protect +initialize against execution in subclasses. In gcc/testsuite/: 2011-10-08 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/50428 * objc/execute/initialize-1.m: New test. From-SVN: r179711
2011-10-07Rename vshuffle/vec_shuffle to vec_perm.Richard Henderson2-23/+42
* doc/extend.texi (__builtin_shuffle): Improve the description to include the modulus of the selector. Mention OpenCL. * doc/md.texi (vec_perm, vec_perm_const): Document named patterns. * tree.def (VEC_PERM_EXPR): Rename from VEC_SHUFFLE_EXPR. * genopinit.c (optabs): Rename vshuffle to vec_perm. * c-typeck.c (c_build_vec_perm_expr): Rename from c_build_vec_shuffle_expr. Update for name changes. * optabs.c (expand_vec_perm_expr_p): Rename from expand_vec_shuffle_expr_p. (expand_vec_perm_expr): Rename from expand_vec_shuffle_expr. * optabs.h (OTI_vec_perm): Rename from DOI_vshuffle. (vec_perm_optab): Rename from vshuffle_optab. * expr.c, gimple-pretty-print.c, gimple.c, gimplify.c, c-tree.h, c-parser.c, tree-cfg.c, tree-inline.c, tree-pretty-print.c, tree-ssa-operands.c, tree-vect-generic.c: Update for name changes. * config/i386/i386.c (ix86_expand_vec_perm): Rename from ix86_expand_vshuffle. * config/i386/i386-protos.h: Update. * config/i386/sse.md (VEC_PERM_AVX2): Rename from VSHUFFLE_AVX2. (vec_perm<VEC_PERM_AVX2>): Rename from vshuffle<VSHUFFLE_AVX2>. From-SVN: r179701