aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
AgeCommit message (Collapse)AuthorFilesLines
2023-04-26RISCV: Inline subword atomic opsPatrick O'Neill1-1/+9
RISC-V has no support for subword atomic operations; code currently generates libatomic library calls. This patch changes the default behavior to inline subword atomic calls (using the same logic as the existing library call). Behavior can be specified using the -minline-atomics and -mno-inline-atomics command line flags. gcc/libgcc/config/riscv/atomic.c has the same logic implemented in asm. This will need to stay for backwards compatibility and the -mno-inline-atomics flag. 2023-04-18 Patrick O'Neill <patrick@rivosinc.com> gcc/ChangeLog: PR target/104338 * config/riscv/riscv-protos.h: Add helper function stubs. * config/riscv/riscv.cc: Add helper functions for subword masking. * config/riscv/riscv.opt: Add command-line flag. * config/riscv/sync.md: Add masking logic and inline asm for fetch_and_op, fetch_and_nand, CAS, and exchange ops. * doc/invoke.texi: Add blurb regarding command-line flag. libgcc/ChangeLog: PR target/104338 * config/riscv/atomic.c: Add reference to duplicate logic. gcc/testsuite/ChangeLog: PR target/104338 * gcc.target/riscv/inline-atomics-1.c: New test. * gcc.target/riscv/inline-atomics-2.c: New test. * gcc.target/riscv/inline-atomics-3.c: New test. * gcc.target/riscv/inline-atomics-4.c: New test. * gcc.target/riscv/inline-atomics-5.c: New test. * gcc.target/riscv/inline-atomics-6.c: New test. * gcc.target/riscv/inline-atomics-7.c: New test. * gcc.target/riscv/inline-atomics-8.c: New test. Signed-off-by: Patrick O'Neill <patrick@rivosinc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-04-25gcov: add info about "calls" to JSON output formatMartin Liska1-2/+45
gcc/ChangeLog: * doc/gcov.texi: Document the new "calls" field and document the API bump. Mention also "block_ids" for lines. * gcov.cc (output_intermediate_json_line): Output info about calls and extend branches as well. (generate_results): Bump version to 2. (output_line_details): Use block ID instead of a non-sensual index. gcc/testsuite/ChangeLog: * g++.dg/gcov/gcov-17.C: Add call to a noreturn function. * g++.dg/gcov/test-gcov-17.py: Cover new format. * lib/gcov.exp: Add options for gcov that emit the extra info.
2023-04-24Docs, OpenMP: Small fixes to internal OMP_FOR doc.Frederik Harwath1-2/+2
gcc/ChangeLog: * doc/generic.texi (OpenMP): Add != to allowed conditions and state that vars can be unsigned. * tree.def (OMP_FOR): Likewise.
2023-04-24doc: Update install.texi for GCC 13Rainer Orth1-109/+78
install.texi needs some updates for GCC 13 and trunk: * We used a mixture of Solaris 2 and Solaris references. Since Solaris 1/SunOS 4 is ancient history by now, consistently use Solaris everywhere. Likewise, explicit references to Solaris 11 can go in many places since Solaris 11.3 and 11.4 is all GCC supports. * Some caveats apply to both Solaris/SPARC and x86, like the difference between as and gas. * Some specifics are obsolete, like the /usr/ccs/bin path whose contents was merged into /usr/bin in Solaris 11.0 already. Likewise, /bin/sh is ksh93 since Solaris 11.0, so there's no need to explicitly use /bin/ksh. * I've removed the reference to OpenCSW: there's barely a need for external sites to get additional packages. OpenCSW is mostly unmaintained these days and has been found to be rather harmful then helping. * The section on assembler and linker to use was partially duplicated. Better keep the info in one place. * GNAT is bundled in recent Solaris 11.4 updates, so recommend that. Tested on i386-pc-solaris2.11 with make doc/gccinstall.{info,pdf} and inspection of the latter. 2023-04-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc: * doc/install.texi: Consistently use Solaris rather than Solaris 2. Remove explicit Solaris 11 references. Markup fixes. (Options specification, --with-gnu-as): as and gas always differ on Solaris. Remove /usr/ccs/bin reference. (Installing GCC: Binaries, Solaris (SPARC, Intel)): Remove. (i?86-*-solaris2*): Merge assembler, linker recommendations ... (*-*-solaris2*): ... here. Update bundled GCC versions. Don't refer to pre-built binaries. Remove /bin/sh warning. Update assembler, linker recommendations. Document GNAT bootstrap compiler. (sparc-sun-solaris2*): Remove non-UltraSPARC reference. (sparc64-*-solaris2*): Move content... (sparcv9-*-solaris2*): ...here. Add GDC for 64-bit bootstrap compilers.
2023-04-21PR target/108779 aarch64: Implement -mtp= optionKyrylo Tkachov1-0/+10
A user has requested that we support the -mtp= option in aarch64 GCC for changing the TPIDR register to read for TLS accesses. I'm not a big fan of the option name, but we already support it in the arm port and Clang supports it for AArch64 already, where it accepts the 'el0', 'el1', 'el2', 'el3' values. This patch implements the same functionality in GCC. Bootstrapped and tested on aarch64-none-linux-gnu. Confirmed with godbolt that the sequences and options are the same as what Clang accepts/generates. gcc/ChangeLog: PR target/108779 * config/aarch64/aarch64-opts.h (enum aarch64_tp_reg): Define. * config/aarch64/aarch64-protos.h (aarch64_output_load_tp): Define prototype. * config/aarch64/aarch64.cc (aarch64_tpidr_register): Declare. (aarch64_override_options_internal): Handle the above. (aarch64_output_load_tp): New function. * config/aarch64/aarch64.md (aarch64_load_tp_hard): Call aarch64_output_load_tp. * config/aarch64/aarch64.opt (aarch64_tp_reg): Define enum. (mtp=): New option. * doc/invoke.texi (AArch64 Options): Document -mtp=. gcc/testsuite/ChangeLog: PR target/108779 * gcc.target/aarch64/mtp.c: New test. * gcc.target/aarch64/mtp_1.c: New test. * gcc.target/aarch64/mtp_2.c: New test. * gcc.target/aarch64/mtp_3.c: New test. * gcc.target/aarch64/mtp_4.c: New test.
2023-04-20doc: Remove repeated word (typo)Alejandro Colomar1-1/+1
gcc/ChangeLog: * doc/extend.texi (Common Function Attributes): Remove duplicate word. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-04-19gcc: xtensa: add -m[no-]strict-align optionMax Filippov1-1/+13
gcc/ * config/xtensa/xtensa-opts.h: New header. * config/xtensa/xtensa.h (STRICT_ALIGNMENT): Redefine as xtensa_strict_align. * config/xtensa/xtensa.cc (xtensa_option_override): When -m[no-]strict-align is not specified in the command line set xtensa_strict_align to 0 if the hardware supports both unaligned loads and stores or to 1 otherwise. * config/xtensa/xtensa.opt (mstrict-align): New option. * doc/invoke.texi (Xtensa Options): Document -m[no-]strict-align.
2023-04-19install.texi: Document --enable-decimal-float for AArch64Christophe Lyon1-7/+8
When I committed the patches to enable support for DFP on AArch64, I forgot to update the installation documentation. This patch adds AArch64 as needed (same as i386/x86_64). 2023-04-17 Christophe Lyon <christophe.lyon@arm.com> gcc/ * doc/install.texi (enable-decimal-float): Add AArch64.
2023-04-18doc: remove stray @golJason Merrill1-1/+1
@gol was removed in r13-6778, new doc additions can't use it. gcc/ChangeLog: * doc/invoke.texi: Remove stray @gol.
2023-04-18Add -gcodeview optionMark Harmstone1-0/+7
gcc/ * common.opt (gcodeview): Add new option. * gcc.cc (driver_handle_option); Handle OPT_gcodeview. * opts.cc (command_handle_option): Similarly. * doc/invoke.texi: Add documentation for -gcodeview.
2023-04-18Docs: Add doc for RISC-V vector intrinsicsKito Cheng1-0/+9
Document which version of RISC-V vector intrinsics has implemented in GCC. gcc/ChangeLog: * doc/extend.texi (Target Builtins): Add RISC-V Vector Intrinsics. (RISC-V Vector Intrinsics): Document GCC implemented which version of RISC-V vector intrinsics and its reference.
2023-04-18LoongArch: Add built-in functions description of LoongArch Base instruction ↵Lulu Cheng1-0/+129
set instructions. gcc/ChangeLog: * doc/extend.texi: Add section for LoongArch Base Built-in functions.
2023-04-10Support Intel AMX-COMPLEXHaochen Jiang3-4/+15
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect AMX-COMPLEX. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AMX_COMPLEX_SET, OPTION_MASK_ISA2_AMX_COMPLEX_UNSET): New. (ix86_handle_option): Handle -mamx-complex. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AMX_COMPLEX. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for amx-complex. * config.gcc: Add amxcomplexintrin.h. * config/i386/cpuid.h (bit_AMX_COMPLEX): New. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __AMX_COMPLEX__. * config/i386/i386-isa.def (AMX_COMPLEX): Add DEF_PTA(AMX_COMPLEX). * config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p): Handle amx-complex. * config/i386/i386.opt: Add option -mamx-complex. * config/i386/immintrin.h: Include amxcomplexintrin.h. * doc/extend.texi: Document amx-complex. * doc/invoke.texi: Document -mamx-complex. * doc/sourcebuild.texi: Document target amx-complex. * config/i386/amxcomplexintrin.h: New file. gcc/testsuite/ChangeLog: * g++.dg/other/i386-2.C: Add -mamx-complex. * g++.dg/other/i386-3.C: Ditto. * gcc.target/i386/amx-check.h: Add cpu check for AMX-COMPLEX. * gcc.target/i386/amx-helper.h: Add amx-complex support. * gcc.target/i386/funcspec-56.inc: Add new target attribute. * gcc.target/i386/sse-12.c: Add -mamx-complex. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Add amx-complex. * gcc.target/i386/sse-23.c: Ditto. * lib/target-supports.exp (check_effective_target_amx_complex): New. * gcc.target/i386/amxcomplex-asmatt-1.c: New test. * gcc.target/i386/amxcomplex-asmintel-1.c: Ditto. * gcc.target/i386/amxcomplex-cmmimfp16ps-2.c: Ditto. * gcc.target/i386/amxcomplex-cmmrlfp16ps-2.c: Ditto.
2023-04-05doc: md.texi (Including Patterns): Fix page breakHans-Peter Nilsson1-2/+1
The line-break in the example looked odd, even more so with a page-break in the middle of it, due to recently added text in preceding pages. * doc/md.texi (Including Patterns): Fix page break.
2023-04-04doc: md.texi (Insn Splitting): Tweak wording for readability.Hans-Peter Nilsson1-15/+15
I needed to check what was allowed in a define_split, but had problems understanding what was meant by "Splitting of jump instruction into sequence that over by another jump instruction". * doc/md.texi (Insn Splitting): Tweak wording for readability. Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>
2023-04-03param: document ranger-recompute-depthMartin Liska1-0/+4
gcc/ChangeLog: * doc/invoke.texi: Document new param.
2023-04-02Added item entry in docs for the new check_effective_target.Cupertino Miranda1-0/+3
gcc/ * doc/sourcebuild.texi (const_volatile_readonly_section): Document new check_effective_target function.
2023-04-03Document signbitm2.liuhongt1-0/+11
gcc/ChangeLog: * doc/md.texi: Document signbitm2.
2023-04-01aarch64, builtins: Include PR registers in FUNCTION_ARG_REGNO_P etc. [PR109254]Jakub Jelinek1-2/+4
The following testcase is miscompiled on aarch64-linux in the regname pass, because while the function takes arguments in the p0 register, FUNCTION_ARG_REGNO_P doesn't reflect that, so DF doesn't know the register is used in register passing. It sees 2 chains with p1 register and wants to replace the second one and as DF doesn't know p0 is live at the start of the function, it will happily use p0 register even when it is used in subsequent instructions. The following patch fixes that. FUNCTION_ARG_REGNO_P returns non-zero for p0-p3 (unconditionally, seems for the floating/vector registers it doesn't conditionalize them on TARGET_FLOAT either, but if you want, I can conditionalize p0-p3 on TARGET_SVE), similarly targetm.calls.function_value_regno_p returns true for p0-p3 registers if TARGET_SVE (again for consistency, that function conditionalizes the float/vector on TARGET_FLOAT). Now, that change broke bootstrap in libobjc and some __builtin_apply_args/__builtin_apply/__builtin_return tests. The aarch64_get_reg_raw_mode hook already documents that SVE scalable arg/return passing is fundamentally incompatible with those builtins, but unlike the floating/vector regs where it forces a fixed vector mode, I think there is no fixed mode which could be used for p0-p3. So, I have tweaked the generic code so that it uses VOIDmode return from that hook to signal that a register shouldn't be touched by __builtin_apply_args/__builtin_apply/__builtin_return despite being mentioned in FUNCTION_ARG_REGNO_P or targetm.calls.function_value_regno_p. gcc/ 2023-04-01 Jakub Jelinek <jakub@redhat.com> PR target/109254 * builtins.cc (apply_args_size): If targetm.calls.get_raw_arg_mode returns VOIDmode, handle it like if the register isn't used for passing arguments at all. (apply_result_size): If targetm.calls.get_raw_result_mode returns VOIDmode, handle it like if the register isn't used for returning results at all. * target.def (get_raw_result_mode, get_raw_arg_mode): Document what it means to return VOIDmode. * doc/tm.texi: Regenerated. * config/aarch64/aarch64.cc (aarch64_function_value_regno_p): Return TARGET_SVE for P0_REGNUM. (aarch64_function_arg_regno_p): Also return true for p0-p3. (aarch64_get_reg_raw_mode): Return VOIDmode for PR_REGNUM_P regs. gcc/testsuite/ 2023-04-01 Jakub Jelinek <jakub@redhat.com> Richard Sandiford <richard.sandiford@arm.com> PR target/109254 * gcc.target/aarch64/sve/pr109254.c: New test.
2023-03-28Modula-2: fix documentation layout againEric Botcazou1-6/+6
Nothing really serious this time. gcc/ * doc/gm2.texi: Add missing Next, Previous and Top fields to most top-level sections.
2023-03-27Docs, OpenMP: Correct internal documentation of OMP_FOR.Sandra Loosemore1-16/+54
gcc/ChangeLog: * doc/generic.texi (OpenMP): Document OMP_SIMD, OMP_DISTRIBUTE, OMP_TASKLOOP, and OMP_LOOP with OMP_FOR. Document how collapsed loops are represented and which fields are vectors. Add documentation for OMP_FOR_PRE_BODY field. Document internal form of non-rectangular loops and OMP_FOR_NON_RECTANGULAR. * tree.def (OMP_FOR): Make documentation consistent with the Texinfo manual, to fill some gaps and correct errors.
2023-03-26doc: Remove anachronistic note related to languages builtGerald Pfeifer1-7/+0
This is another instance of what ce51e8439a49 (and originally 05432288d4e5) addressed in a different part. We stopped shipping granular tarballs years ago. gcc/ChangeLog: * doc/install.texi: Remove anachronistic note related to languages built and separate source tarballs.
2023-03-24docs, analyzer: improvements to "Debugging the Analyzer"David Malcolm1-9/+116
gcc/ChangeLog: * doc/analyzer.texi (Debugging the Analyzer): Add notes on useful debugging options. (Special Functions for Debugging the Analyzer): Convert to a table, and rewrite in places. (Other Debugging Techniques): Add notes on how to compare two different exploded graphs. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2023-03-24[testsuite] test for weak_undefined support and add optionsAlexandre Oliva1-0/+9
A number of tests that depend on weak undefined symbols fail to require that support, and arrange to skip some targets and add special options to others on a test-by-test basis. Fix this by stating the requirement explicitly, and adding a proc to return any required options. Others rely on weak undefined symbols only to test for the availability of posix_memalign. Drop that in favor of dg effective target support for posix_memalign. for gcc/ChangeLog * doc/sourcebuild.texi (weak_undefined, posix_memalign): Document options and effective targets. for gcc/testsuite/ChangeLog * lib/target-supports.exp (add_options_for_weak_undefined): New. (check_effective_target_weak_undefined): Use it. (check_effective_target_posix_memalign): New. * gcc.dg/torture/pr53922.c: Drop skips and custom options in favor of effective target requirement and added options for weak_undefined symbols. * gcc.dg/torture/pr90020.c: Likewise. * gcc.dg/addr_equal-1.c: Likewise. * gcc.target/aarch64/aapcs64/aapcs64.exp: Likewise, for abitest.S-using tests. * gcc.dg/torture/pr60092.c: Likewise, but in favor of posix_memalign tests. * gcc.dg/vect/vect-tail-nomask-1.c: Likewise.
2023-03-23Remove TARGET_GEN_MEMSET_SCRATCH_RTX since it's not used anymore.liuhongt2-9/+0
The target hook is only used by i386, and the current definition is same as default gen_reg_rtx. gcc/ChangeLog: * builtins.cc (builtin_memset_read_str): Replace targetm.gen_memset_scratch_rtx with gen_reg_rtx. (builtin_memset_gen_str): Ditto. * config/i386/i386-expand.cc (ix86_convert_const_wide_int_to_broadcast): Replace ix86_gen_scratch_sse_rtx with gen_reg_rtx. (ix86_expand_vector_move): Ditto. * config/i386/i386-protos.h (ix86_gen_scratch_sse_rtx): Removed. * config/i386/i386.cc (ix86_gen_scratch_sse_rtx): Removed. (TARGET_GEN_MEMSET_SCRATCH_RTX): Removed. * doc/tm.texi: Remove TARGET_GEN_MEMSET_SCRATCH_RTX. * doc/tm.texi.in: Ditto. * target.def: Ditto.
2023-03-21docs: Fix up new instances of index reorderingArsen Arsenović2-3/+3
This commit fixes up an instance of the index entry mis-ordering that occurred between the formulation and application of commit r13-6310-gf33d7a88d069d1. gcc/ChangeLog: * doc/extend.texi: Associate use_hazard_barrier_return index entry with its attribute. * doc/invoke.texi: Associate -fcanon-prefix-map index entry with its attribute
2023-03-21doc: Remove the @gol macro/aliasArsen Arsenović4-1369/+1355
The @gol macro appears to have existed as a workaround for a bug in old versions of makeinfo and/or texinfo.tex, where they would, in some types of output, fail to emit line breaks in @gccoptlists. After updating texinfo.tex, I noticed that this behavior appears to no longer be exhibited, instead, both acted correctly and inserted newlines. The (groff) manual output also appears unaffected. gcc/ChangeLog: * doc/implement-c.texi: Remove usage of @gol. * doc/invoke.texi: Ditto. * doc/sourcebuild.texi: Ditto. * doc/include/gcc-common.texi: Remove @gol. In new Makeinfo and texinfo.tex versions, the bug it was working around appears to be gone. gcc/fortran/ChangeLog: * invoke.texi: Remove usages of @gol. * intrinsic.texi: Ditto.
2023-03-21doc: Update texinfo.texArsen Arsenović1-2925/+4688
gcc/ChangeLog: * doc/include/texinfo.tex: Update to 2023-01-17.19.
2023-03-21docs: Add @defbuiltin family of helpersArsen Arsenović2-781/+793
The @defbuiltin{,x} macros are convenience macros for the often-repeated task of defining a built-in function in extend.texi. Usage of this macro should lead to a higher degree of consistency across pieces of text written by different people, and provide a better reading experience, as they prevent easy-to-make errors, like forgetting index entries for these functions. gcc/ChangeLog: * doc/include/gcc-common.texi: Add @defbuiltin{,x} and @enddefbuiltin for defining built-in functions. * doc/extend.texi: Apply @defbuiltin{,x} to many, but not all, places where it should be used.
2023-03-21doc: Fix a few minor errors spotted by testersArsen Arsenović2-2/+9
This commit addresses a few minor errors that were spotted while testing the GCC manual with a few people, and while working on wider changes. gcc/ChangeLog: * doc/extend.texi (Formatted Output Function Checking): New subsection for grouping together printf et al. (Exception handling) Fix missing @ sign before copyright header, which lead to the copyright line leaking into '(gcc)Exception handling'. * doc/gcc.texi: Set document language to en_US. (@copying): Wrap front cover texts in quotations, move in manual description text.
2023-03-21docs: Create Indices appendixArsen Arsenović1-10/+18
The GCC manual has multiple indices. By creating an appendix which lists them, we help makeinfo present a more accessible way for the reader to see all the indices. gcc/ChangeLog: * doc/gcc.texi: Add the Indices appendix, to make texinfo generate nice indices overview page.
2023-03-19Docs: correct typo in nonnull function attribute description.Jonny Grant1-1/+1
gcc/ChangeLog: * doc/extend.texi (Common Function Attributes) <nonnull>: Correct typo.
2023-03-17Docs: Fix formatting issues in BPF built-ins documentation.Sandra Loosemore1-28/+32
gcc/ChangeLog: * doc/extend.texi (BPF Built-in Functions): Fix numerous markup issues. Add more line breaks to example so it doesn't overflow the margins.
2023-03-17Docs: Fix some too-long lines in Texinfo manual.Sandra Loosemore2-44/+66
gcc/ChangeLog: * doc/extend.texi (Common Function Attributes) <access>: Fix bad line breaks in examples. <malloc>: Fix bad line breaks in running text, also copy-edit for consistency. (Extended Asm) <Generic Operand Modifiers>: Fix @multitable width. * doc/invoke.texi (Option Summary) <Developer Options>: Fix misplaced @gol. (C++ Dialect Options) <-fcontracts>: Add line break in example. <-Wctad-maybe-unsupported>: Likewise. <-Winvalid-constexpr>: Likewise. (Warning Options) <-Wdangling-pointer>: Likewise. <-Winterference-size>: Likewise. <-Wvla-parameter>: Likewise. (Static Analyzer Options): Fix bad line breaks in running text, plus add some missing markup. (Optimize Options) <openacc-privatization>: Fix more bad line breaks in running text.
2023-03-13Docs: Fix double 'See' in zero-length-bounds docs.Sean Bright1-1/+1
gcc/ChangeLog: * doc/invoke.texi (Warning Options): Remove errant 'See' before @xref.
2023-03-12middle-end: Implement preferred_div_as_shifts_over_mult [PR108583]Tamar Christina2-0/+7
This now implements a hook preferred_div_as_shifts_over_mult that indicates whether a target prefers that the vectorizer decomposes division as shifts rather than multiplication when possible. In order to be able to use this we need to check whether the current precision has enough bits to do the operation without any of the additions overflowing. We use range information to determine this and only do the operation if we're sure am overflow won't occur. This now uses ranger to do this range check. This seems to work better than vect_get_range_info which uses range_query, but I have not switched the interface of vect_get_range_info over in this PR fix. As Andy said before initializing a ranger instance is cheap but not free, and if the intention is to call it often during a pass it should be instantiated at pass startup and passed along to the places that need it. This is a big refactoring and doesn't seem right to do in this PR. But we should in GCC 14. Currently we only instantiate it after a long series of much cheaper checks. gcc/ChangeLog: PR target/108583 * target.def (preferred_div_as_shifts_over_mult): New. * doc/tm.texi.in: Document it. * doc/tm.texi: Regenerate. * targhooks.cc (default_preferred_div_as_shifts_over_mult): New. * targhooks.h (default_preferred_div_as_shifts_over_mult): New. * tree-vect-patterns.cc (vect_recog_divmod_pattern): Use it. gcc/testsuite/ChangeLog: PR target/108583 * gcc.dg/vect/vect-div-bitmask-4.c: New test. * gcc.dg/vect/vect-div-bitmask-5.c: New test.
2023-03-12middle-end: Revert can_special_div_by_const changes [PR108583]Tamar Christina2-15/+0
This reverts the changes for the CAN_SPECIAL_DIV_BY_CONST hook. gcc/ChangeLog: PR target/108583 * doc/tm.texi (TARGET_VECTORIZE_CAN_SPECIAL_DIV_BY_CONST): Remove. * doc/tm.texi.in: Likewise. * explow.cc (round_push, align_dynamic_address): Revert previous patch. * expmed.cc (expand_divmod): Likewise. * expmed.h (expand_divmod): Likewise. * expr.cc (force_operand, expand_expr_divmod): Likewise. * optabs.cc (expand_doubleword_mod, expand_doubleword_divmod): Likewise. * target.def (can_special_div_by_const): Remove. * target.h: Remove tree-core.h include * targhooks.cc (default_can_special_div_by_const): Remove. * targhooks.h (default_can_special_div_by_const): Remove. * tree-vect-generic.cc (expand_vector_operation): Remove hook. * tree-vect-patterns.cc (vect_recog_divmod_pattern): Remove hook. * tree-vect-stmts.cc (vectorizable_operation): Remove hook.
2023-03-12Docs: Fix typo in previous commitSandra Loosemore1-1/+1
gcc/ChangeLog: * doc/install.texi2html: Fix issue number typo in comment.
2023-03-12[PR modula2/109089] implementation of boolean should be C++/C boolGaius Mulley1-1/+1
[PR modula2/109089]. This patch implements BOOLEAN using bool (boolean_type_node) thoughout cc1gm2. The patch also includes a patched version of the bootstrap tool mc. gcc/ChangeLog: * doc/gm2.texi (Elementary data types): Equivalence BOOLEAN with bool. gcc/m2/ChangeLog: PR modula2/109089 * gm2-compiler/M2GCCDeclare.mod (DeclareKnownType): Import. * gm2-gcc/gcc-consolidation.h (stdbool.h): Include. * gm2-gcc/init.h (defined): Change block start. * gm2-gcc/m2block.cc: Change FALSE to false, change TRUE to true. * gm2-gcc/m2block.h: Change int to bool. * gm2-gcc/m2builtins.cc: Ditto. * gm2-gcc/m2builtins.h: Ditto. * gm2-gcc/m2convert.cc: Change FALSE to false, TRUE to true and int to bool. * gm2-gcc/m2convert.h: Change int to bool. * gm2-gcc/m2decl.cc: Change int to bool. * gm2-gcc/m2decl.h: Change int to bool. * gm2-gcc/m2expr.cc: Change FALSE to false, TRUE to true and int to bool. * gm2-gcc/m2expr.h: Change int to bool. * gm2-gcc/m2statement.cc: Change FALSE to false, TRUE to true and int to bool. * gm2-gcc/m2statement.h: Change int to bool. * gm2-gcc/m2top.cc: Change int to bool. * gm2-gcc/m2top.h: Change int to bool. * gm2-gcc/m2tree.cc: Change int to bool. * gm2-gcc/m2tree.h: Change int to bool. * gm2-gcc/m2type.cc: Change int to bool. * gm2-gcc/m2type.h: Change int to bool. * gm2-lang.cc (convert_loc): Call convert_to_integer for BOOLEAN_TYPE. * gm2-libs/Builtins.def (isfinitef): Change return value from BOOLEAN to INTEGER. (isfinite): Ditto. (isfinitel): Ditto. * gm2-libs/Builtins.mod (isfinitef): Change return value from BOOLEAN to INTEGER. (isfinite): Ditto. (isfinitel): Ditto. * mc-boot/GASCII.cc: Rebuild. * mc-boot/GASCII.h: Rebuild. * mc-boot/GArgs.cc: Rebuild. * mc-boot/GArgs.h: Rebuild. * mc-boot/GAssertion.cc: Rebuild. * mc-boot/GAssertion.h: Rebuild. * mc-boot/GBreak.cc: Rebuild. * mc-boot/GBreak.h: Rebuild. * mc-boot/GCOROUTINES.h: Rebuild. * mc-boot/GCmdArgs.cc: Rebuild. * mc-boot/GCmdArgs.h: Rebuild. * mc-boot/GDebug.cc: Rebuild. * mc-boot/GDebug.h: Rebuild. * mc-boot/GDynamicStrings.cc: Rebuild. * mc-boot/GDynamicStrings.h: Rebuild. * mc-boot/GEnvironment.cc: Rebuild. * mc-boot/GEnvironment.h: Rebuild. * mc-boot/GFIO.cc: Rebuild. * mc-boot/GFIO.h: Rebuild. * mc-boot/GFormatStrings.cc: Rebuild. * mc-boot/GFormatStrings.h: Rebuild. * mc-boot/GFpuIO.cc: Rebuild. * mc-boot/GFpuIO.h: Rebuild. * mc-boot/GIO.cc: Rebuild. * mc-boot/GIO.h: Rebuild. * mc-boot/GIndexing.cc: Rebuild. * mc-boot/GIndexing.h: Rebuild. * mc-boot/GM2Dependent.cc: Rebuild. * mc-boot/GM2Dependent.h: Rebuild. * mc-boot/GM2EXCEPTION.cc: Rebuild. * mc-boot/GM2EXCEPTION.h: Rebuild. * mc-boot/GM2LINK.h: Rebuild. * mc-boot/GM2RTS.cc: Rebuild. * mc-boot/GM2RTS.h: Rebuild. * mc-boot/GMemUtils.cc: Rebuild. * mc-boot/GMemUtils.h: Rebuild. * mc-boot/GNumberIO.cc: Rebuild. * mc-boot/GNumberIO.h: Rebuild. * mc-boot/GPushBackInput.cc: Rebuild. * mc-boot/GPushBackInput.h: Rebuild. * mc-boot/GRTExceptions.cc: Rebuild. * mc-boot/GRTExceptions.h: Rebuild. * mc-boot/GRTco.h: Rebuild. * mc-boot/GRTentity.h: Rebuild. * mc-boot/GRTint.cc: Rebuild. * mc-boot/GRTint.h: Rebuild. * mc-boot/GSArgs.cc: Rebuild. * mc-boot/GSArgs.h: Rebuild. * mc-boot/GSFIO.cc: Rebuild. * mc-boot/GSFIO.h: Rebuild. * mc-boot/GSYSTEM.h: Rebuild. * mc-boot/GSelective.h: Rebuild. * mc-boot/GStdIO.cc: Rebuild. * mc-boot/GStdIO.h: Rebuild. * mc-boot/GStorage.cc: Rebuild. * mc-boot/GStorage.h: Rebuild. * mc-boot/GStrCase.cc: Rebuild. * mc-boot/GStrCase.h: Rebuild. * mc-boot/GStrIO.cc: Rebuild. * mc-boot/GStrIO.h: Rebuild. * mc-boot/GStrLib.cc: Rebuild. * mc-boot/GStrLib.h: Rebuild. * mc-boot/GStringConvert.cc: Rebuild. * mc-boot/GStringConvert.h: Rebuild. * mc-boot/GSysExceptions.h: Rebuild. * mc-boot/GSysStorage.cc: Rebuild. * mc-boot/GSysStorage.h: Rebuild. * mc-boot/GTimeString.cc: Rebuild. * mc-boot/GTimeString.h: Rebuild. * mc-boot/GUnixArgs.h: Rebuild. * mc-boot/Galists.cc: Rebuild. * mc-boot/Galists.h: Rebuild. * mc-boot/Gdecl.cc: Rebuild. * mc-boot/Gdecl.h: Rebuild. * mc-boot/Gdtoa.h: Rebuild. * mc-boot/Gerrno.h: Rebuild. * mc-boot/Gkeyc.cc: Rebuild. * mc-boot/Gkeyc.h: Rebuild. * mc-boot/Gldtoa.h: Rebuild. * mc-boot/Glibc.h: Rebuild. * mc-boot/Glibm.h: Rebuild. * mc-boot/Glists.cc: Rebuild. * mc-boot/Glists.h: Rebuild. * mc-boot/GmcComment.cc: Rebuild. * mc-boot/GmcComment.h: Rebuild. * mc-boot/GmcComp.cc: Rebuild. * mc-boot/GmcComp.h: Rebuild. * mc-boot/GmcDebug.cc: Rebuild. * mc-boot/GmcDebug.h: Rebuild. * mc-boot/GmcError.cc: Rebuild. * mc-boot/GmcError.h: Rebuild. * mc-boot/GmcFileName.cc: Rebuild. * mc-boot/GmcFileName.h: Rebuild. * mc-boot/GmcLexBuf.cc: Rebuild. * mc-boot/GmcLexBuf.h: Rebuild. * mc-boot/GmcMetaError.cc: Rebuild. * mc-boot/GmcMetaError.h: Rebuild. * mc-boot/GmcOptions.cc: Rebuild. * mc-boot/GmcOptions.h: Rebuild. * mc-boot/GmcPreprocess.cc: Rebuild. * mc-boot/GmcPreprocess.h: Rebuild. * mc-boot/GmcPretty.cc: Rebuild. * mc-boot/GmcPretty.h: Rebuild. * mc-boot/GmcPrintf.cc: Rebuild. * mc-boot/GmcPrintf.h: Rebuild. * mc-boot/GmcQuiet.cc: Rebuild. * mc-boot/GmcQuiet.h: Rebuild. * mc-boot/GmcReserved.cc: Rebuild. * mc-boot/GmcReserved.h: Rebuild. * mc-boot/GmcSearch.cc: Rebuild. * mc-boot/GmcSearch.h: Rebuild. * mc-boot/GmcStack.cc: Rebuild. * mc-boot/GmcStack.h: Rebuild. * mc-boot/GmcStream.cc: Rebuild. * mc-boot/GmcStream.h: Rebuild. * mc-boot/Gmcflex.h: Rebuild. * mc-boot/Gmcp1.cc: Rebuild. * mc-boot/Gmcp1.h: Rebuild. * mc-boot/Gmcp2.cc: Rebuild. * mc-boot/Gmcp2.h: Rebuild. * mc-boot/Gmcp3.cc: Rebuild. * mc-boot/Gmcp3.h: Rebuild. * mc-boot/Gmcp4.cc: Rebuild. * mc-boot/Gmcp4.h: Rebuild. * mc-boot/Gmcp5.cc: Rebuild. * mc-boot/Gmcp5.h: Rebuild. * mc-boot/GnameKey.cc: Rebuild. * mc-boot/GnameKey.h: Rebuild. * mc-boot/GsymbolKey.cc: Rebuild. * mc-boot/GsymbolKey.h: Rebuild. * mc-boot/Gtermios.h: Rebuild. * mc-boot/Gtop.cc: Rebuild. * mc-boot/Gvarargs.cc: Rebuild. * mc-boot/Gvarargs.h: Rebuild. * mc-boot/Gwlists.cc: Rebuild. * mc-boot/Gwlists.h: Rebuild. * mc-boot/Gwrapc.h: Rebuild. * mc/decl.mod (doBoolC): New procedure. (doBaseC): Call doBoolC. * mc/keyc.mod: Import useBool. (genBool): New procedure. (genDefs): Call genBool. * mc/mcOptions.def (useBool): New procedure. * mc/mcOptions.mod (useBool): New procedure. (useBoolType): New variable. (optionIs): Assign useBoolType to TRUE. gcc/testsuite/ChangeLog: PR modula2/109089 * gm2/pimlib/run/pass/limittests.mod: Rewritten to reflect the external definitions of isfinite. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-03-12Docs: Clean up description of asan-kernel-mem-intrinsic-prefix.Sandra Loosemore1-2/+4
gcc/ChangeLog: * doc/invoke.texi (Optimize Options): Add markup to description of asan-kernel-mem-intrinsic-prefix, and clarify wording slightly.
2023-03-12doc: Drop a redundant link to AVR-LibCGerald Pfeifer1-1/+1
gcc/ChangeLog: * doc/extend.texi (Named Address Spaces): Drop a redundant link to AVR-LibC.
2023-03-11Fwd: [PATCHJ]: Bugzilla 88860 - Clarify online manual infelicitiesJeff Law1-1/+1
gcc/ PR web/88860 * doc/extend.texi: Clarify Attribute Syntax a bit.
2023-03-11Docs: Update documentation of Texinfo versions for building manuals.Sandra Loosemore2-22/+39
There has been recent discussion on updating the minimum required version of Texinfo from the current version 4.7. This patch does not do that, but it suggests that people use a more recent version to get better output. It also removes some other references to Texinfo 4.7 and fixes some related bit-rot in the installation manual. (Nobody really wants to print the GCC manual any more, and the GCC web site is a better place to get prebuilt manuals than the FSF store.) gcc/ChangeLog: * doc/install.texi (Prerequisites): Suggest using newer versions of Texinfo. (Final install): Clean up and modernize discussion of how to build or obtain the GCC manuals. * doc/install.texi2html: Update comment to point to the PR instead of "makeinfo 4.7 brokenness" (it's not specific to that version).
2023-03-10file-prefix-map: Fix up -f*-prefix-map= [PR108464]Jakub Jelinek2-7/+19
On Tue, Nov 01, 2022 at 01:46:20PM -0600, Jeff Law via Gcc-patches wrote: > > This does cause a change of behaviour if users were previously relying upon > > symlinks or absolute paths not being resolved. > > I'm not too worried about this scenario. As mentioned in the PR, this patch breaks e.g. ccache testsuite. I strongly doubt most of the users want such a behavior, because it makes all filenames absolute when -f*-prefix-map= options remap one absolute path to another one. Say if I'm in /tmp and /tmp is the canonical path and there is src/test.c file, with -fdebug-prefix-map=/tmp=/blah previously there would be DW_AT_comp_dir "/blah" and it is still there, but DW_AT_name which was previouly "src/test.c" (relative against DW_AT_comp_dir) is now "/blah/src/test.c" instead. Even worse, the canonicalization is only done on the remap_filename argument, but not on the old_prefix side. That is e.g. what breaks ccache. If there is /tmp/foobar1 directory and ln -sf foobar1 /tmp/foobar2 cd /tmp/foobar2 then -fdebug-prefix-map=`pwd`:/blah will just not work, while src/test.c will be canonicalized to /tmp/foobar1/src/test.c, old_prefix is still what the user provided which is /tmp/foobar2. User would need to change their uses to use -fdebug-prefix-map=`realpath $(pwd)`=/blah I've created 3 patches for this. The first patch just reverts the patch (and its follow-up patch). The second introduces a new option, -f{,no}-canon-prefix-map which affects the behavior of -f{file,macro,debug,profile}-prefix-map=, if on it canonicalizes the old path of the prefix map option and compares that against the canonicalized filename for absolute paths but not relative. And last is like the second, but does that also for relative paths except for filenames with no / (or / or \ on DOS based fs). So, the third patch gets an optional behavior of what has been on the trunk lately with the difference that the old_prefix is canonicalized by the compiler. Initially I've thought I'd just add some magic syntax to the OLD=NEW argument of those options (because there are 4 of them), but as noted in the comments, = is valid char in OLD (just not new), so it would be hard to figure out some syntax. So instead a new option, which one can turn on and off for different -f*-prefix-map= options if needed. -fdebug-prefix-map=/path1=/mypath1 -fcanon-prefix-map \ -fdebug-prefix-map=/path2=/mypath2 -fno-canon-prefix-map \ -fdebug-prefix-map=/path3=/mypath3 will use the old behavior for the /path1 and /path3 handling and the new one only for /path2 handling. This commit is the third patch described above. 2023-03-10 Jakub Jelinek <jakub@redhat.com> PR other/108464 * common.opt (fcanon-prefix-map): New option. * opts.cc: Include file-prefix-map.h. (flag_canon_prefix_map): New variable. (common_handle_option): Handle OPT_fcanon_prefix_map. (gen_command_line_string): Ignore OPT_fcanon_prefix_map. * file-prefix-map.h (flag_canon_prefix_map): Declare. * file-prefix-map.cc (struct file_prefix_map): Add canonicalize member. (add_prefix_map): Initialize canonicalize member from flag_canon_prefix_map, and if true canonicalize it using lrealpath. (remap_filename): Revert 2022-11-01 and 2022-11-07 changes, use lrealpath result only for map->canonicalize map entries. * lto-opts.cc (lto_write_options): Ignore OPT_fcanon_prefix_map. * opts-global.cc (handle_common_deferred_options): Clear flag_canon_prefix_map at the start and handle OPT_fcanon_prefix_map. * doc/invoke.texi (-fcanon-prefix-map): Document. (-ffile-prefix-map, -fdebug-prefix-map, -fprofile-prefix-map): Add see also for -fcanon-prefix-map. * doc/cppopts.texi (-fmacro-prefix-map): Likewise.
2023-03-09c++: hide __is_deducible for GCC 13Jason Merrill1-3/+4
I want to have more discussion about the interface before claiming the __is_deducible name, so for GCC 13 make it internal-only. gcc/ChangeLog: * doc/extend.texi: Comment out __is_deducible docs. gcc/cp/ChangeLog: * cp-trait.def (IS_DEDUCIBLE): Add space to name. gcc/testsuite/ChangeLog: * g++.dg/ext/is_deducible1.C: Guard with __has_builtin (__is_deducible).
2023-03-09c++: add __is_deducible trait [PR105841]Jason Merrill1-0/+4
C++20 class template argument deduction for an alias template involves adding a constraint that the template arguments for the alias template can be deduced from the return type of the deduction guide for the underlying class template. In the standard, this is modeled as defining a class template with a partial specialization, but it's much more efficient to implement with a trait that directly tries to perform the deduction. The first argument to the trait is a template rather than a type, so various places needed to be adjusted to accommodate that. PR c++/105841 gcc/ChangeLog: * doc/extend.texi (Type Traits):: Document __is_deducible. gcc/cp/ChangeLog: * cp-trait.def (IS_DEDUCIBLE): New. * cxx-pretty-print.cc (pp_cxx_trait): Handle non-type. * parser.cc (cp_parser_trait): Likewise. * tree.cc (cp_tree_equal): Likewise. * pt.cc (tsubst_copy_and_build): Likewise. (type_targs_deducible_from): New. (alias_ctad_tweaks): Use it. * semantics.cc (trait_expr_value): Handle CPTK_IS_DEDUCIBLE. (finish_trait_expr): Likewise. * constraint.cc (diagnose_trait_expr): Likewise. * cp-tree.h (type_targs_deducible_from): Declare. gcc/testsuite/ChangeLog: * g++.dg/ext/is_deducible1.C: New test.
2023-03-07docs: Clarify LeakSanitizer in documentation [PR81649]Jonathan Grant1-2/+2
gcc/ChangeLog PR sanitizer/81649 * doc/invoke.texi (Instrumentation Options): Clarify LeakSanitizer behavior.
2023-03-07docs: Add link to gmplib.org.Benson Muite1-1/+2
gcc/ChangeLog * doc/install.texi (Prerequisites): Add link to gmplib.org.
2023-03-07doc: Document testsuite check_effective_target_tail_callHans-Peter Nilsson1-0/+3
Spot-checked the PDF output for sanity. * doc/sourcebuild.texi: Document check_effective_target_tail_call.
2023-03-03target/108738 - limit STV chain discoveryRichard Biener1-0/+4
The following puts a hard limit on the inherently quadratic STV chain discovery. Without a limit for the compiler.i testcase in PR26854 we see at -O2 machine dep reorg : 574.45 ( 53%) with release checking while with the proposed limit it's machine dep reorg : 2.86 ( 1%) PR target/108738 * config/i386/i386.opt (--param x86-stv-max-visits): New param. * doc/invoke.texi (--param x86-stv-max-visits): Document it. * config/i386/i386-features.h (scalar_chain::max_visits): New. (scalar_chain::build): Add bitmap parameter, return boolean. (scalar_chain::add_insn): Likewise. (scalar_chain::analyze_register_chain): Likewise. * config/i386/i386-features.cc (scalar_chain::scalar_chain): Initialize max_visits. (scalar_chain::analyze_register_chain): When we exhaust max_visits, abort. Also abort when running into any disallowed insn. (scalar_chain::add_insn): Propagate abort. (scalar_chain::build): Likewise. When aborting amend the set of disallowed insn with the insns set. (convert_scalars_to_vector): Adjust. Do not convert aborted chains.