aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
AgeCommit message (Collapse)AuthorFilesLines
2018-10-29GCOV: introduce --json-format.Martin Liska1-65/+128
2018-10-29 Martin Liska <mliska@suse.cz> * Makefile.in: Make dependency to json.o. * doc/gcov.texi: Document new JSON format, remove old intermediate format documentation. * gcov.c (struct function_info): Come up with m_name and m_demangled_name. (function_info::function_info): Initialize it. (function_info::~function_info): Release it. (main): Rename flag_intermediate_format to flag_json_format. (print_usage): Describe --json-format. (process_args): Set flag_json_format. (output_intermediate_line): Remove. (output_intermediate_json_line): Likewise. (get_gcov_intermediate_filename): Return new extension ".gcov.json.gz". (output_intermediate_file): Implement JSON emission. (output_json_intermediate_file): Implement JSON emission. (generate_results): Use ::get_name for function name. Handle JSON output file. (read_graph_file): Use ::get_name instead of cplus_demangle. (read_count_file): Likewise. (solve_flow_graph): Likewise. (add_line_counts): Likewise. (accumulate_line_counts): Use new flag_json_format. (output_function_details): Use ::get_name instead of cplus_demangle. (output_lines): Likewise. * json.cc (test_writing_literals): Add new tests. * json.h (class literal): Add new boolean constructor. 2018-10-29 Martin Liska <mliska@suse.cz> * g++.dg/gcov/gcov-8.C: Do not check intermediate format. * lib/gcov.exp: Remove legacy verify-intermediate. From-SVN: r265587
2018-10-29gimplefe-30.c: New test.Kugan Vivekanandarajah1-0/+6
gcc/testsuite/ChangeLog: 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org> * gcc.dg/gimplefe-30.c: New test. * gcc.dg/gimplefe-31.c: New test. * gcc.dg/gimplefe-32.c: New test. * gcc.dg/gimplefe-33.c: New test. gcc/ChangeLog: 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org> * doc/generic.texi (ABSU_EXPR): Document. * match.pd (absu(x)*absu(x) -> x*x): Handle. (absu(absu(X)) -> absu(X)): Likewise. (absu(-X) -> absu(X)): Likewise. (absu(X) where X is nonnegative -> X): Likewise. From-SVN: r265578
2018-10-28Add D front-end, libphobos library, and D2 testsuite.Iain Buclaw8-6/+81
ChangeLog: * Makefile.def (target_modules): Add libphobos. (flags_to_pass): Add GDC, GDCFLAGS, GDC_FOR_TARGET and GDCFLAGS_FOR_TARGET. (dependencies): Make libphobos depend on libatomic, libbacktrace configure, and zlib configure. (language): Add language d. * Makefile.in: Rebuild. * Makefile.tpl (BUILD_EXPORTS): Add GDC and GDCFLAGS. (HOST_EXPORTS): Add GDC. (POSTSTAGE1_HOST_EXPORTS): Add GDC and GDC_FOR_BUILD. (BASE_TARGET_EXPORTS): Add GDC. (GDC_FOR_BUILD, GDC, GDCFLAGS): New variables. (GDC_FOR_TARGET, GDC_FLAGS_FOR_TARGET): New variables. (EXTRA_HOST_FLAGS): Add GDC. (STAGE1_FLAGS_TO_PASS): Add GDC. (EXTRA_TARGET_FLAGS): Add GDC and GDCFLAGS. * config-ml.in: Treat GDC and GDCFLAGS like other compiler/flag environment variables. * configure: Rebuild. * configure.ac: Add target-libphobos to target_libraries. Set and substitute GDC_FOR_BUILD and GDC_FOR_TARGET. config/ChangeLog: * multi.m4: Set GDC. gcc/ChangeLog: * Makefile.in (tm_d_file_list, tm_d_include_list): New variables. (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables. (tm_d.h, cs-tm_d.h, default-d.o): New rules. (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules. (s-tm-texi): Also check timestamp on d-target.def. (generated_files): Add TM_D_H and d-target-hooks-def.h. (build/genhooks.o): Also depend on D_TARGET_DEF. * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New variables. * config/aarch64/aarch64-d.c: New file. * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE): Define. * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New prototype. * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define. * config/aarch64/t-aarch64 (aarch64-d.o): New rule. * config/arm/arm-d.c: New file. * config/arm/arm-protos.h (arm_d_target_versions): New prototype. * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define. * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define. * config/arm/t-arm (arm-d.o): New rule. * config/default-d.c: New file. * config/glibc-d.c: New file. * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/i386/i386-d.c: New file. * config/i386/i386-protos.h (ix86_d_target_versions): New prototype. * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define. * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define. (GNU_USER_TARGET_D_CRITSEC_SIZE): Define. * config/i386/t-i386 (i386-d.o): New rule. * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define. * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define. * config/mips/mips-d.c: New file. * config/mips/mips-protos.h (mips_d_target_versions): New prototype. * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define. * config/mips/t-mips (mips-d.o): New rule. * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/powerpcspe/powerpcspe-d.c: New file. * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions): New prototype. * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define. * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule. * config/riscv/riscv-d.c: New file. * config/riscv/riscv-protos.h (riscv_d_target_versions): New prototype. * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define. * config/riscv/t-riscv (riscv-d.o): New rule. * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/rs6000/rs6000-d.c: New file. * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New prototype. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define. * config/rs6000/t-rs6000 (rs6000-d.o): New rule. * config/s390/s390-d.c: New file. * config/s390/s390-protos.h (s390_d_target_versions): New prototype. * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define. * config/s390/t-s390 (s390-d.o): New rule. * config/sparc/sparc-d.c: New file. * config/sparc/sparc-protos.h (sparc_d_target_versions): New prototype. * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define. * config/sparc/t-sparc (sparc-d.o): New rule. * config/t-glibc (glibc-d.o): New rule. * configure: Regenerated. * configure.ac (tm_d_file): New variable. (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes. * doc/contrib.texi (Contributors): Add self for the D frontend. * doc/frontends.texi (G++ and GCC): Mention D as a supported language. * doc/install.texi (Configuration): Mention libphobos as an option for --enable-shared. Mention d as an option for --enable-languages. (Testing): Mention check-d as a target. * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file name suffixes. Mention d as a -x option. * doc/sourcebuild.texi (Top Level): Mention libphobos. * doc/standards.texi (Standards): Add section on D language. * doc/tm.texi: Regenerated. * doc/tm.texi.in: Add @node for D language and ABI, and @hook for TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE. * dwarf2out.c (is_dlang): New function. (gen_compile_unit_die): Use DW_LANG_D for D. (declare_in_namespace): Return module die for D, instead of adding extra declarations into the namespace. (gen_namespace_die): Generate DW_TAG_module for D. (gen_decl_die): Handle CONST_DECLSs for D. (dwarf2out_decl): Likewise. (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type. (prune_unused_types_walk): Handle DW_tag_interface_type same as other kinds of aggregates. * gcc.c (default_compilers): Add entries for .d, .dd and .di. * genhooks.c: Include d/d-target.def. gcc/po/ChangeLog: * EXCLUDES: Add sources from d/dmd. gcc/testsuite/ChangeLog: * gcc.misc-tests/help.exp: Add D to option descriptions check. * gdc.dg/asan/asan.exp: New file. * gdc.dg/asan/gdc272.d: New test. * gdc.dg/compilable.d: New test. * gdc.dg/dg.exp: New file. * gdc.dg/gdc254.d: New test. * gdc.dg/gdc260.d: New test. * gdc.dg/gdc270a.d: New test. * gdc.dg/gdc270b.d: New test. * gdc.dg/gdc282.d: New test. * gdc.dg/gdc283.d: New test. * gdc.dg/imports/gdc170.d: New test. * gdc.dg/imports/gdc231.d: New test. * gdc.dg/imports/gdc239.d: New test. * gdc.dg/imports/gdc241a.d: New test. * gdc.dg/imports/gdc241b.d: New test. * gdc.dg/imports/gdc251a.d: New test. * gdc.dg/imports/gdc251b.d: New test. * gdc.dg/imports/gdc253.d: New test. * gdc.dg/imports/gdc254a.d: New test. * gdc.dg/imports/gdc256.d: New test. * gdc.dg/imports/gdc27.d: New test. * gdc.dg/imports/gdcpkg256/package.d: New test. * gdc.dg/imports/runnable.d: New test. * gdc.dg/link.d: New test. * gdc.dg/lto/lto.exp: New file. * gdc.dg/lto/ltotests_0.d: New test. * gdc.dg/lto/ltotests_1.d: New test. * gdc.dg/runnable.d: New test. * gdc.dg/simd.d: New test. * gdc.test/gdc-test.exp: New file. * lib/gdc-dg.exp: New file. * lib/gdc.exp: New file. libphobos/ChangeLog: * Makefile.am: New file. * Makefile.in: New file. * acinclude.m4: New file. * aclocal.m4: New file. * config.h.in: New file. * configure: New file. * configure.ac: New file. * d_rules.am: New file. * libdruntime/Makefile.am: New file. * libdruntime/Makefile.in: New file. * libdruntime/__entrypoint.di: New file. * libdruntime/__main.di: New file. * libdruntime/gcc/attribute.d: New file. * libdruntime/gcc/backtrace.d: New file. * libdruntime/gcc/builtins.d: New file. * libdruntime/gcc/config.d.in: New file. * libdruntime/gcc/deh.d: New file. * libdruntime/gcc/libbacktrace.d.in: New file. * libdruntime/gcc/unwind/arm.d: New file. * libdruntime/gcc/unwind/arm_common.d: New file. * libdruntime/gcc/unwind/c6x.d: New file. * libdruntime/gcc/unwind/generic.d: New file. * libdruntime/gcc/unwind/package.d: New file. * libdruntime/gcc/unwind/pe.d: New file. * m4/autoconf.m4: New file. * m4/druntime.m4: New file. * m4/druntime/cpu.m4: New file. * m4/druntime/libraries.m4: New file. * m4/druntime/os.m4: New file. * m4/gcc_support.m4: New file. * m4/gdc.m4: New file. * m4/libtool.m4: New file. * src/Makefile.am: New file. * src/Makefile.in: New file. * src/libgphobos.spec.in: New file. * testsuite/Makefile.am: New file. * testsuite/Makefile.in: New file. * testsuite/config/default.exp: New file. * testsuite/lib/libphobos-dg.exp: New file. * testsuite/lib/libphobos.exp: New file. * testsuite/testsuite_flags.in: New file. From-SVN: r265573
2018-10-26powerpc: Fix typos in the manualTulio Magno Quites Machado Filho1-3/+3
2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128 return type and other typos. From-SVN: r265548
2018-10-25extend.texi (aligned): Expand attribute description.Martin Sebor1-19/+36
gcc/ChangeLog: * doc/extend.texi (aligned): Expand attribute description. (Alignment): Rename section. Discuss function arguments. From-SVN: r265498
2018-10-25[DOC] Relocate list under Deprecated in options.texi to VarSam Tebbs1-9/+9
gcc/doc 2018-10-25 Sam Tebbs <sam.tebbs@arm.com> * options.texi (Deprecated): Move list to Var section. From-SVN: r265480
2018-10-24extend.texi (nonnull): List no-argument form.Martin Sebor1-5/+11
gcc/ChangeLog: * doc/extend.texi (nonnull): List no-argument form. Reference -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute. From-SVN: r265469
2018-10-20* doc/ux.texi: Move @section directly after @node.Andreas Schwab1-4/+2
From-SVN: r265340
2018-10-19gccint.texi: add user experience guidelinesDavid Malcolm2-0/+602
gcc/ChangeLog: * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi. * doc/gccint.texi: Include ux.texi and use it in top-level menu. * doc/ux.texi: New file. From-SVN: r265322
2018-10-18Improve -dumpversion and -dumpfullversion documentationJonathan Wakely1-5/+5
* doc/invoke.texi (-dumpversion): Improve grammar. (-dumpfullversion): Make more consistent with -dumpversion. From-SVN: r265276
2018-10-18Add -std=c2x, -std=gnu2x, -Wc11-c2x-compat, C2X _Static_assert support.Joseph Myers3-1/+17
Now new features are starting to be added to a C2X draft (in the C2x branch of the C standard git repository, no public WG14 document yet), it's time to add -std=c2x and associated options to GCC for use in enabling C2X features. This patch adds the expected set of options: -std=c2x, -std=gnu2x, -Wc11-c2x-compat. A first C2X feature is added (the only one so far in the repository that's obviously relevant to GCC): support (as in C++) for the string constant to be omitted in _Static_assert. This feature is duly also supported as an extension in earlier standard modes (diagnosed with -pedantic, unless -Wno-c11-c2x-compat is given, or with -Wc11-c2x-compat even in C2X mode). Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc/ * doc/cpp.texi (__STDC_VERSION__): Document C2X handling. * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options. * doc/standards.texi (C Language): Document C2X. * dwarf2out.c (highest_c_language), config/rl78/rl78.c (rl78_option_override): Handle "GNU C2X" language name. gcc/c/ * c-errors.c (pedwarn_c11): New function. * c-parser.c (disable_extension_diagnostics): Save warn_c11_c2x_compat and set it to 0. (restore_extension_diagnostics): Restore warn_c11_c2x_compat. (c_parser_static_assert_declaration_no_semi): Handle _Static_assert without string constant. * c-tree.h (pedwarn_c11): New prototype. gcc/c-family/ * c-common.c (flag_isoc2x): New variable. * c-common.h (clk_c): Update comment to reference C2X. (flag_isoc99, flag_isoc11): Update comments to reference future standard versions in general. (flag_isoc2x): Declare. * c-opts.c (set_std_c2x): New function. (c_common_handle_option): Handle -std=c2x and -std=gnu2x. (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set flag_isoc2x to 0. * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options. gcc/testsuite/ * gcc.dg/c11-static-assert-7.c, gcc.dg/c11-static-assert-8.c, gcc.dg/c11-static-assert-9.c, gcc.dg/c2x-static-assert-1.c, gcc.dg/c2x-static-assert-2.c, gcc.dg/c99-static-assert-2.c, gcc.dg/gnu2x-static-assert-1.c: New tests. * gcc.dg/missing-symbol-3.c: Update expected fix-it text. libcpp/ * include/cpplib.h (enum c_lang): Add CLK_GNUC2X and CLK_STDC2X. * init.c (lang_defaults): Add GNUC2X and STDC2X entries. (cpp_init_builtins): Define __STDC_VERSION__ to 202000L for C2X. From-SVN: r265251
2018-10-17Update manual references for C17 having been published.Joseph Myers2-3/+4
This patch makes references in the manual to C17 reflect it having been published in July 2018. (For the reasons it took so long to get to ballot and publication, see the WG14 convenor's report to the last SC22 plenary - SC22 N5297 - where it references "A troubling new trend where ISO CS has begun enforcing undocumented rules that are approved neither by the TMB nor by the WG 14 editors, leading to a decrease in the usefulness of standards documents.".) Tested with "make info html pdf". * doc/invoke.texi (-std=c17), doc/standards.texi (C Language): Document C17 as published in 2018. From-SVN: r265249
2018-10-16Obsolete Solaris 10 supportRainer Orth1-3/+5
contrib: * config-list.mk (LIST): Switch to i686-solaris2.11, sparc64-sun-solaris2.11. gcc: * config.gcc: Obsolete *-*-solaris2.10*. * doc/install.texi (Specific, *-*-solaris2*): Document it. From-SVN: r265186
2018-10-15diagnostics: add minimum width to left margin for line numbersDavid Malcolm1-0/+6
This patch adds a minimum width to the left margin used for printing line numbers. I set the default to 6. Hence rather than: some-filename:9:1: some message 9 | some source text | ^~~~~~~~~~~~~~~~ some-filename:10:1: another message 10 | more source text | ^~~~~~~~~~~~~~~~ we now print: some-filename:9:42: some message 9 | some source text | ^~~~~~~~~~~~~~~~ some-filename:10:42: another message 10 | more source text | ^~~~~~~~~~~~~~~~ This implicitly fixes issues with margins failing to line up due to different lengths of the number when we haven't read the full file yet and so don't know the highest possible line number, for line numbers up to 99999. Doing so adds some whitespace on the left-hand side, for non-huge files, at least. I believe that this makes it easier to see where each diagnostic starts, by visually breaking things up at the leftmost column; my hope is to make it easier for the eye to see the different diagnostics as if they were different "paragraphs". gcc/ChangeLog: * common.opt (fdiagnostics-minimum-margin-width=): New option. * diagnostic-show-locus.c (layout::layout): Apply the minimum margin width. (layout::start_annotation_line): Only print up to 3 of the margin character, to avoid touching the left-hand side. (selftest::test_diagnostic_show_locus_fixit_lines): Update for minimum margin width, as set by test_diagnostic_context's ctor. (selftest::test_fixit_insert_containing_newline): Likewise. (selftest::test_fixit_insert_containing_newline_2): Likewise. (selftest::test_line_numbers_multiline_range): Clear dc.min_margin_width. * diagnostic.c (diagnostic_initialize): Initialize min_margin_width. * diagnostic.h (struct diagnostic_context): Add field "min_margin_width". * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=. * opts.c (common_handle_option): Handle OPT_fdiagnostics_minimum_margin_width_. * selftest-diagnostic.c (selftest::test_diagnostic_context::test_diagnostic_context): Initialize min_margin_width to 6. * toplev.c (general_init): Initialize global_dc->min_margin_width. gcc/testsuite/ChangeLog: * gcc.dg/missing-header-fixit-3.c: Update expected indentation to reflect minimum margin width. * gcc.dg/missing-header-fixit-4.c: Likewise. * gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c: Likewise. * gcc.dg/plugin/diagnostic-test-show-locus-color-line-numbers.c: Likewise. * gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers-2.c: New test. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add it. From-SVN: r265178
2018-10-12introduce --enable-large-address-awareAlexandre Oliva1-0/+8
Add a configure knob for mingw32 and 64 toolchains to default passing --large-address-aware to the linker, when creating 32-bit binaries. -Wl,--disable-large-address-aware can still reverse its effects. for gcc/ChangeLog * configure.ac: Introduce --enable-large-address-aware to define MINGW_DEFAULT_LARGE_ADDR_AWARE. * doc/install.texi: Document it. * configure, config.in: Rebuilt. * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define, based on MINGW_DEFAULT_LARGE_ADDR_AWARE. (LINK_SPEC): Insert it. * config/i386/mingw-264.h: Likewise. From-SVN: r265130
2018-10-12md.texi (doloop_end): Document that the pattern code may need to check ↵Paul Koning1-4/+33
operand mode. * doc/md.texi (doloop_end): Document that the pattern code may need to check operand mode. From-SVN: r265102
2018-10-11extend.texi (attribute packed): Correct typos.Martin Sebor1-6/+6
gcc/ChangeLog: * doc/extend.texi (attribute packed): Correct typos. From-SVN: r265076
2018-10-11extend.texi (attribute flatten): Mention interaction with noinline.Martin Sebor1-2/+3
gcc/ChangeLog: * doc/extend.texi (attribute flatten): Mention interaction with noinline. From-SVN: r265075
2018-10-11PR middle-end/87593 - conflicting format_arg attributes on a declaration ↵Martin Sebor1-3/+11
accepted gcc/ChangeLog: * doc/extend.texi (attribute format_arg): Discuss using multiple attributes on a single function. From-SVN: r265073
2018-10-05Remove -mfloat32, -mfloat64 switches from pdp11 target.Paul Koning1-13/+0
* config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32. * config/pdp11/pdp11.opt (mfloat32): Remove. (mfloat64): Remove. * doc/invoke.texi (pdp11 -mfloat32): Remove: (pdp11 -mfloat64): Remove. From-SVN: r264881
2018-10-04invoke.texi (-Wno-prio-ctor-dtor): Document new warning -Wno-prio-ctor-dtor.Vinay Kumar1-1/+12
* doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning -Wno-prio-ctor-dtor. * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor to generate constructor destructor priority warning. * c.opt (-Wprio-ctor-dtor): New option. * c-c++-common/Wprio-ctor-dtor.c: New test. From-SVN: r264853
2018-10-04Add -fopt-info-internalsDavid Malcolm1-7/+24
This patch introduces a verbosity level to dump messages: "user-facing" vs "internals". By default, messages at the top-level dump scope are "user-facing", whereas those that are in nested scopes are implicitly "internals", and are filtered out by -fopt-info unless a new "-internals" sub-option of "-fopt-info" is supplied (intended purely for use by GCC developers). Dumpfiles are unaffected by the change. Given that the vectorizer is the only subsystem using AUTO_DUMP_SCOPE (via DUMP_VECT_SCOPE), this only affects the vectorizer. Filtering out these implementation-detail messages goes a long way towards making -fopt-info-vec-all more accessible to advanced end-users; the follow-up patch restores the most pertinent missing details. gcc/ChangeLog: * doc/invoke.texi (-fopt-info): Document new "internals" sub-option. * dump-context.h (dump_context::apply_dump_filter_p): New decl. * dumpfile.c (dump_options): Update for renaming of MSG_ALL to MSG_ALL_KINDS. (optinfo_verbosity_options): Add "internals". (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS. (dump_context::apply_dump_filter_p): New member function. (dump_context::dump_loc): Use apply_dump_filter_p rather than explicitly masking the dump_kind. (dump_context::begin_scope): Increment the scope depth first. Use apply_dump_filter_p rather than explicitly masking the dump_kind. (dump_context::emit_item): Use apply_dump_filter_p rather than explicitly masking the dump_kind. (dump_dec): Likewise. (dump_hex): Likewise. (dump_switch_p_1): Default to MSG_ALL_PRIORITIES. (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING. (opt_info_switch_p): Update handling of default MSG_OPTIMIZED_LOCATIONS to cope with default of MSG_PRIORITY_USER_FACING. (dump_basic_block): Use apply_dump_filter_p rather than explicitly masking the dump_kind. (selftest::test_capture_of_dump_calls): Update test_dump_context instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather than MSG_ALL. Generalize scope test to be run at all four combinations of with/without MSG_PRIORITY_USER_FACING and MSG_PRIORITY_INTERNALS, adding examples of explicit priority for each of the two values. * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags. Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING, MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES. (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction with MSG_PRIORITY_*. * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning dump messages as MSG_PRIORITY_USER_FACING. * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment about the interaction with MSG_PRIORITY_*. gcc/testsuite/ChangeLog: * gcc.dg/plugin/dump-1.c: Update expected output for test_scopes due to "-internals" not being selected. * gcc.dg/plugin/dump-2.c: New test, based on dump-1.c, with "-internals" added to re-enable the output from test_scopes. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add dump-2.c. From-SVN: r264851
2018-10-04re PR rtl-optimization/87466 (IRA and LRA spill all pseudos that are live ↵Peter Bergner2-0/+15
across setjmp calls) gcc/ PR rtl-optimization/87466 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook. * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook. * doc/tm.texi: Regenerate. * ira-lives.c (process_bb_node_lives): Use the new target hook. * lra-lives.c (process_bb_lives): Likewise. * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): Define. gcc/testsuite/ PR rtl-optimization/87466 * gcc.target/powerpc/pr87466.c: New test. From-SVN: r264842
2018-10-03Enable LRA register allocator for PDP11.Paul Koning1-1/+6
* config/pdp11/constraints.md (Q): Use define_memory_constraints. (R): Likewise. (D): Likewise. * config/pdp11/pdp11.c (pdp11_lra_p): New function. * config/pdp11/pdp11.opt (-mlra): New option. * doc/invoke.texi (PDP-11 Options): Document -mlra. From-SVN: r264819
2018-10-01rs6000-builtin.def (__builtin_mffsl): New.Carl Love1-1/+37
gcc/ChangeLog: 2018-10-01 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New. (__builtin_mtfsb0): New. (__builtin_mtfsb1): New. ( __builtin_set_fpscr_rn): New. (__builtin_set_fpscr_drn): New. * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add. (rs6000_expand_set_fpscr_rn_builtin): Add. (rs6000_expand_set_fpscr_drn_builtin): Add. (rs6000_expand_builtin): Add case statement entries for RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1, RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN, RS6000_BUILTIN_MFFSL. (rs6000_init_builtins): Add ftype initialization and def_builtin calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1, __builtin_set_fpscr_rn, __builtin_set_fpscr_drn. * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn, rs6000_mffscdrn): Add define_insn. (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand. * doc/extend.texi: Add documentation for the builtins. gcc/testsuite/ChangeLog: 2018-10-01 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/test_mffsl-p9.c: New file. * gcc.target/powerpc/test_fpscr_rn_builtin.c: New file. * gcc.target/powerpc/test_fpscr_drn_builtin.c: New file. * gcc.target/powerpc/test_fpscr_rn_builtin_error.c: New file. * gcc.target/powerpc/test_fpscr_drn_builtin_error.c: New file. From-SVN: r264762
2018-10-01Allow back-ends to be able to do custom validations on params. Tamar Christina2-0/+6
This patch adds the ability for backends to add custom constrains to the param values by defining a new hook option_validate_param. This hook is invoked on every set_param_value which allows the back-end to ensure that the parameters are always within it's desired state. gcc/ * params.c (set_param_value): Add index of parameter being validated. * common/common-target.def (option_validate_param): New. * common/common-targhooks.h (default_option_validate_param): New. * common/common-targhooks.c (default_option_validate_param): New. * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New. * doc/tm.texi: Regenerate. From-SVN: r264755
2018-10-01Allow setting of stack-clash via configure options.Tamar Christina1-0/+5
This patch defines a configure option to allow the setting of the default guard size via configure flags when building the target. The new flag is: * --with-stack-clash-protection-guard-size=<num> The patch defines a new macro DEFAULT_STK_CLASH_GUARD_SIZE which targets need to use explicitly is they want to support this configure flag and values that users may have set. gcc/ PR target/86486 * configure.ac: Add stack-clash-protection-guard-size. * doc/install.texi: Document it. * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New. * params.def: Update comment for guard-size. (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE, PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description. * configure: Regenerate. From-SVN: r264752
2018-10-01Add a hook to support telling the mid-end when to probe the stack.Tamar Christina2-3/+7
This patch adds a hook to tell the mid-end about the probing requirements of the target. On AArch64 we allow a specific range for which no probing needs to be done. This same range is also the amount that will have to be probed up when a probe is needed after dropping the stack. Defining this probe comes with the extra requirement that the outgoing arguments size of any function that uses alloca and stack clash be at the very least 8 bytes. With this invariant we can skip doing the zero checks for alloca and save some code. A simplified version of the AArch64 stack frame is: +-----------------------+ | | | | | | +-----------------------+ |LR | +-----------------------+ |FP | +-----------------------+ |dynamic allocations | -\ probe range hook effects these +-----------------------+ --\ and ensures that outgoing stack |padding | -- args is always > 8 when alloca. +-----------------------+ ---/ Which means it's always safe to probe |outgoing stack args |-/ at SP +-----------------------+ This allows us to generate better code than without the hook without affecting other targets. With this patch I am also removing the stack_clash_protection_final_dynamic_probe hook which was added specifically for AArch64 but that is no longer needed. gcc/ PR target/86486 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom probe ranges. * target.def (stack_clash_protection_alloca_probe_range): New. (stack_clash_protection_final_dynamic_probe): Remove. * targhooks.h (default_stack_clash_protection_alloca_probe_range) New. (default_stack_clash_protection_final_dynamic_probe): Remove. * targhooks.c: Likewise. * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New. (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove. * doc/tm.texi: Regenerate. From-SVN: r264750
2018-09-26re PR gcov-profile/86957 (gcc should warn about missing profiles for a ↵Indu Bhagat1-5/+23
compilation unit or a new function with -fprofile-use) 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com> PR gcov-profile/86957 * common.opt: New warning option -Wmissing-profile. * coverage.c (get_coverage_counts): Add warning for missing .gcda file. * doc/invoke.texi: Document -Wmissing-profile. From-SVN: r264657
2018-09-25Remove Pascal-related entries in code and comments.Martin Liska5-12/+3
2018-09-25 Martin Liska <mliska@suse.cz> * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue): Do not handle "GNU Pascal". * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Likewise. * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal from documentation. Likewise. * dbxout.c (dbxout_range_type): Likewise. * doc/cpp.texi: Likewise. * doc/extend.texi: Likewise. * doc/frontends.texi: Likewise. * doc/invoke.texi: Remove Pascal entry. * tree.def (CLEANUP_POINT_EXPR): Likewise. * doc/rtl.texi (MODE_FUNCTION): Remove not used entry. 2018-09-25 Martin Liska <mliska@suse.cz> * c-common.c (c_common_truthvalue_conversion): Remove Pascal from documentation. From-SVN: r264559
2018-09-25Document all param values and remove defaults (PR middle-end/86078).Martin Liska1-118/+209
2018-09-25 Martin Liska <mliska@suse.cz> PR middle-end/86078 * doc/invoke.texi: Document all parameters and remove default of the parameters. 2018-09-25 Martin Liska <mliska@suse.cz> PR middle-end/86078 * check-params-in-docs.py: New file. From-SVN: r264558
2018-09-23* doc/service.texi (Service): Switch the fsf.org link to https.Gerald Pfeifer1-1/+1
From-SVN: r264514
2018-09-21Document that attribute noreturn inhibits tail call optimizationFlorian Weimer1-0/+3
PR middle-end/81035 * doc/extend.texi (Common Function Attributes): Mention that noreturn suppresses tail call optimization. From-SVN: r264490
2018-09-21[aarch64] Add HiSilicon tsv110 CPU supportShaokun Zhang1-1/+1
This patch adds HiSilicon's an mcpu: tsv110, which supports v8_4A. It has been tested on aarch64 and no regressions from this patch. 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com> Bo Zhou <zbo.zhou@hisilicon.com> * config/aarch64/aarch64-cores.def (tsv110): New CPU. * config/aarch64/aarch64-tune.md: Regenerated. * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110". * config/aarch64/aarch64.c (tsv110_tunings): New tuning table. * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs. Co-Authored-By: Bo Zhou <zbo.zhou@hisilicon.com> From-SVN: r264470
2018-09-21Remove arc profile histogram in non-LTO mode.Martin Liska1-5/+1
2018-09-21 Martin Liska <mliska@suse.cz> * auto-profile.c (autofdo_source_profile::read): Do not set sum_all. (read_profile): Do not add working sets. (read_autofdo_file): Remove sum_all. (afdo_callsite_hot_enough_for_early_inline): Remove const qualifier. * coverage.c (struct counts_entry): Remove gcov_summary. (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY, do not support GCOV_TAG_PROGRAM_SUMMARY. (get_coverage_counts): Remove summary and expected arguments. * coverage.h (get_coverage_counts): Likewise. * doc/gcov-dump.texi: Remove -w option. * gcov-dump.c (dump_working_sets): Remove. (main): Do not support '-w' option. (print_usage): Likewise. (tag_summary): Likewise. * gcov-io.c (gcov_write_summary): Do not dump histogram. (gcov_read_summary): Likewise. (gcov_histo_index): Remove. (gcov_histogram_merge): Likewise. (compute_working_sets): Likewise. * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark it not obsolete. (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete. (GCOV_TAG_SUMMARY_LENGTH): Adjust. (GCOV_HISTOGRAM_SIZE): Remove. (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise. (struct gcov_summary): Simplify rapidly just to runs and sum_max fields. (gcov_histo_index): Remove. (NUM_GCOV_WORKING_SETS): Likewise. (compute_working_sets): Likewise. * gcov-tool.c (print_overlap_usage_message): Remove trailing empty line. * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY. (output_lines): Remove program related line. * ipa-profile.c (ipa_profile): Do not consider GCOV histogram. * lto-cgraph.c (output_profile_summary): Do not stream GCOV histogram. (input_profile_summary): Do not read it. (merge_profile_summaries): And do not merge it. (input_symtab): Do not call removed function. * modulo-sched.c (sms_schedule): Do not print sum_max. * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was removed when histogram method was invented. (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO mode. * postreload-gcse.c (eliminate_partially_redundant_load): Fix GCOV coding style. * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION and dump selected value. * profile.c (add_working_set): Remove. (get_working_sets): Likewise. (find_working_set): Likewise. (get_exec_counts): Do not work with working sets. (read_profile_edge_counts): Do not inform as sum_max is removed. (compute_branch_probabilities): Likewise. (compute_value_histograms): Remove argument for call of get_coverage_counts. * profile.h: Do not make gcov_summary const. 2018-09-21 Martin Liska <mliska@suse.cz> * libgcov-driver.c (crc32_unsigned): Remove. (gcov_histogram_insert): Likewise. (gcov_compute_histogram): Likewise. (compute_summary): Simplify rapidly. (merge_one_data): Do not handle PROGRAM_SUMMARY tag. (merge_summary): Rapidly simplify. (dump_one_gcov): Ignore gcov_summary. (gcov_do_dump): Do not handle program summary, it's not used. * libgcov-util.c (tag_summary): Remove. (read_gcda_finalize): Fix coding style. (read_gcda_file): Initialize curr_object_summary. (compute_summary): Remove. (calculate_overlap): Remove settings of run_max. From-SVN: r264462
2018-09-20Fix and document -r optionAllan Sandfeld Jensen1-1/+6
The option has existed and been working for years, make sure it implies the right extra options, and list it in the documentation. 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io> gcc/ * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib. (VTABLE_VERIFICATION_SPEC): Likewise. (SANITIZER_EARLY_SPEC): Likewise. (SANITIZER_SPEC): Likewise. * config/darwin.h (LINK_COMMAND_SPEC): Likewise. * doc/invoke.texi (Link Options): Document -r. gcc/cp/ * g++spec.c (lang_specific_driver): Handle -r like -nostdlib. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib. gcc/go/ * gospec.c (lang_specific_driver): Handle -r like -nostdlib. gcc/testsuite/ * g++.dg/ipa/pr64059.C: Removed now redundant -nostdlib. * g++.dg/lto/20081109-1_0.C: Likewise. * g++.dg/lto/20090302_0.C: Likewise. * g++.dg/lto/pr45621_0.C: Likewise. * g++.dg/lto/pr60567_0.C: Likewise. * g++.dg/lto/pr62026.C: Likewise. * gcc.dg/lto/pr45736_0.c: Likewise. * gcc.dg/lto/pr52634_0.c: Likewise. * gfortran.dg/lto/20091016-1_0.f90: Likewise. * gfortran.dg/lto/pr79108_0.f90: Likewise. From-SVN: r264451
2018-09-20rs6000: Remove -misel={yes,no}Segher Boessenkool1-5/+0
These options have been deprecated for many years, supplanted by -misel and -mno-isel. This patch finally removes them. * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete. * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and -misel=no. From-SVN: r264447
2018-09-20* doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.Marek Polacek1-1/+1
From-SVN: r264441
2018-09-20Add -Wclass-conversion.Marek Polacek1-0/+8
* c.opt (Wclass-conversion): New. * decl.c (grok_op_properties): Change a warning from -Wconversion to -Wclass-conversion. Make it print the types. * doc/invoke.texi: Document -Wclass-conversion. * g++.dg/conversion/op4.C: Add dg-warning. * g++.dg/warn/Wclass-conversion1.C: New test. * g++.dg/warn/Wclass-conversion2.C: New test. * g++.dg/warn/Wconversion5.C: Remove file. * g++.dg/warn/conversion-function-1.C: Use -Wno-class-converison. * g++.old-deja/g++.bugs/900215_01.C: Adjust dg-warning. * g++.old-deja/g++.jason/conversion5.C: Likewise. From-SVN: r264438
2018-09-19Remove constant vec_select restriction.Andrew Stubbs1-5/+6
The vec_select operator is documented to require a const_int for the lane selector operand, but GCN has an instruction that can select the lane at runtime, so it seems reasonable to remove this restriction. This patch simply replaces assertions that the operand is constant with early exits from the optimizers. I think it's reasonable that vec_select with a non-constant operand cannot be optimized, yet. Also included is the necessary documentation tweak. 2018-09-19 Andrew Stubbs <ams@codesourcery.com> gcc/ * doc/rtl.texi: Adjust vec_select description. * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use non-constant selectors. From-SVN: r264423
2018-09-18PR other/87353 fix formatting and grammar in manualJonathan Wakely1-5/+4
The changes to invoke.texi in r242433 left some unwanted spaces that texi2pod.pl interprets as verbatim formatting. There are also some grammatical errors due to the removal of references to GCJ, where the G++ driver is referred to in the plural. PR other/87353 * doc/invoke.texi (Link Options): Fix formatting and grammar. From-SVN: r264395
2018-09-17Add -Wabsolute-valueMartin Jambor1-0/+8
2018-09-17 Martin Jambor <mjambor@suse.cz> gcc/ * doc/invoke.texi (Warning Options): Likewise. gcc/c-family/ * c.opt (Wabsolute-value): New. gcc/c/ * c-parser.c: (warn_for_abs): New function. (c_parser_postfix_expression_after_primary): Call it. testsuite/ * gcc.dg/warn-abs-1.c: New test. * gcc.dg/dfp/warn-abs-2.c: Likewise. From-SVN: r264368
2018-09-17gcov: emit hotness colors to easily find hot code.Martin Liska1-1/+7
2018-09-17 Martin Liska <mliska@suse.cz> * doc/gcov.texi: Document new option --use-hotness-colors. * gcov.c (struct source_info): Declare new field. (source_info::source_info): Set default for maximum_count. (print_usage): Add new -q option. (process_args): Process it. (accumulate_line_info): Save src->maximum_count. (output_line_beginning): Make color line number if flag_use_hotness_colors is set. (output_line_details): Pass default argument value. (output_lines): Pass src->maximum_count. From-SVN: r264360
2018-09-12[debug] Add -gdescribe-diesTom de Vries1-1/+7
This patch adds option -gdescribe-dies. It sets the DW_AT_description attribute of dies that do not get a DW_AT_name attribute, to make it easier to figure out what the die is describing. The option exports the names of artificial variables: ... DIE 0: DW_TAG_variable (0x7fa934dd54b0) + DW_AT_description: "D.1922" DW_AT_type: die -> 0 (0x7fa934dd0d70) DW_AT_artificial: 1 ... which can be traced back to gimple dumps: ... char a[0:D.1922] [value-expr: *a.0]; ... Furthermore, it adds names to external references: ... DIE 0: DW_TAG_subprogram (0x7fa88b9650f0) +DW_AT_description: "main" DW_AT_abstract_origin: die -> label: vla_1.c.6719312a + 29 (0x7fa88b965140) ... and likewise to DW_TAG_call_site_parameter DIEs. Bootstrapped and reg-tested on x86_64. 2018-09-12 Tom de Vries <tdevries@suse.de> * common.opt (gdescribe-dies): Add option. * dwarf2out.c (add_name_and_src_coords_attributes): Add description attribute for artifical and nameless decls. (dwarf2out_register_external_die): Add description attribute to external reference die. (add_desc_attribute): New functions. (gen_subprogram_die): Add description attribute to DW_TAG_call_site_parameter. * tree-pretty-print.c (print_generic_expr_to_str): New function. * tree-pretty-print.h (print_generic_expr_to_str): Declare. * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and -gno-describe-dies. (@item -gdescribe-dies): Add. From-SVN: r264229
2018-09-05[nvptx] Basic -misa support for nvptxCesar Philippidis1-0/+6
gcc/ * config/nvptx/nvptx-opts.h: New file. * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target. * config/nvptx/nvptx.h: Include "nvptx-opts.h". (ASM_SPEC): Define. (TARGET_SM35): New macro. * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the correct predicate. * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its values. (misa=): New option. * doc/invoke.texi (Nvidia PTX Options): Document -misa. gcc/testsuite/ * gcc.target/nvptx/atomic_fetch-1.c: New test. * gcc.target/nvptx/atomic_fetch-1.c: New test. Co-Authored-By: Bernd Schmidt <bernds_cb1@t-online.de> From-SVN: r264133
2018-09-05GCOV: Print one decimal place in human readable mode.Martin Liska1-1/+1
2018-09-05 Martin Liska <mliska@suse.cz> * doc/gcov.texi: Update documentation of humar readable mode. * gcov.c (format_count): Print one decimal place, it provides more fine number of situations like '1G' vs. '1.4G'. 2018-09-05 Martin Liska <mliska@suse.cz> * g++.dg/gcov/loop.C: Update test to support new format. From-SVN: r264112
2018-09-04Add whitespace before warning option added in previous commmitJonathan Wakely1-1/+1
* doc/invoke.texi (Option Summary): Add whitespace. From-SVN: r264083
2018-09-04Add -Waligned-new to Option SummaryJonathan Wakely1-1/+1
* doc/invoke.texi (Option Summary): Add -Waligned-new. From-SVN: r264080
2018-09-04Update C Extensions docs for support in latest C++Jonathan Wakely1-5/+5
* doc/extend.texi (Long Long, Hex Floats): Document support for long long and hex floats in more recent versions of ISO C++. From-SVN: r264076
2018-09-03Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).Martin Liska2-0/+6
2018-09-03 Martin Liska <mliska@suse.cz> PR driver/83193 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES. * common/common-targhooks.c (default_get_valid_option_values): New function. * common/common-targhooks.h (default_get_valid_option_values): Likewise. * common/config/i386/i386-common.c: Move processor_target_table from i386.c. (ix86_get_valid_option_values): New function. (TARGET_GET_VALID_OPTION_VALUES): New macro. * config/i386/i386.c (struct ptt): Move to i386-common.c. (PTA_*): Move all defined masks into i386-common.c. (ix86_function_specific_restore): Use new processor_cost_table. * config/i386/i386.h (struct ptt): Moved from i386.c. (struct pta): Likewise. * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES. * doc/tm.texi.in: Likewise. * opt-suggestions.c (option_proposer::suggest_option): Pass prefix to build_option_suggestions. (option_proposer::get_completions): Likewise. (option_proposer::build_option_suggestions): Use the new target hook. * opts.c (struct option_help_tuple): New struct. (print_filtered_help): Use the new target hook. 2018-09-03 Martin Liska <mliska@suse.cz> PR driver/83193 * gcc.dg/completion-4.c: New test. From-SVN: r264052