[PATCH] middle-end/108086 - more operand scanner reduction in inlining

2022-12-16 Thread Richard Biener via Gcc-patches
There's another round of redundant operand scanning in remap_gimple_stmt. The following removes this and also improves one special-case to call a cheaper inline function. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/108086 * tree-inline.cc (remap_gim

[PATCH] loop-invariant: Split preheader edge if the preheader bb ends with jump [PR106751]

2022-12-16 Thread Jakub Jelinek via Gcc-patches
Hi! The RTL loop passes only request simple preheaders, but don't require fallthru preheaders, while move_invariant_reg apparently assumes the latter, that it can just append instruction(s) to the end of the preheader basic block. The following patch fixes that by splitting the preheader edge if

Re: [PATCH] loop-invariant: Split preheader edge if the preheader bb ends with jump [PR106751]

2022-12-16 Thread Richard Biener via Gcc-patches
On Fri, 16 Dec 2022, Jakub Jelinek wrote: > Hi! > > The RTL loop passes only request simple preheaders, but don't require > fallthru preheaders, while move_invariant_reg apparently assumes the > latter, that it can just append instruction(s) to the end of the preheader > basic block. > > The fol

Re: Ping---[V3][PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-12-16 Thread Richard Biener via Gcc-patches
On Thu, 15 Dec 2022, Qing Zhao wrote: > > > > On Dec 15, 2022, at 2:47 AM, Richard Biener wrote: > > > > On Wed, 14 Dec 2022, Qing Zhao wrote: > > > >> Hi, Richard, > >> > >> I guess that we now agreed on the following: > >> > >> “ the information that we ran into a trailing array but didn'

[Patch] gcc-changelog/git_email.py: Support older unidiff.PatchSet

2022-12-16 Thread Tobias Burnus
Another backward compatibility issue - failed here on Ubuntu 20.04 which is old but not ancient. OK for mainline? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heuru

Re: [Patch] gcc-changelog/git_email.py: Support older unidiff.PatchSet

2022-12-16 Thread Martin Liška
On 12/16/22 10:18, Tobias Burnus wrote: > Another backward compatibility issue - failed here on Ubuntu 20.04 which > is old but not ancient. > > OK for mainline? It's fine, thanks for the workaround! Martin > > Tobias > - > Siemens Electronic Design Automation GmbH; Anschrift:

[PATCH] middle-end/108086 - remove PR28238 fix superseeded by PR34018 fix

2022-12-16 Thread Richard Biener via Gcc-patches
There's quite special code in copy_bb that handles inline substitution of a non-invariant address in place of an invariant one that's now handled by more generic handling of this case in remap_gimple_op_r so this removes the special casing that happens in a hot path, providing a small speedup. Boo

Re: [PATCH] gcov: Fix -fprofile-update=atomic

2022-12-16 Thread Richard Biener via Gcc-patches
On Thu, Dec 15, 2022 at 9:34 AM Sebastian Huber wrote: > > On 13/12/2022 15:30, Richard Biener wrote: > > On Fri, Dec 9, 2022 at 2:56 PM Sebastian Huber > > wrote: > >> The code coverage support uses counters to determine which edges in the > >> control > >> flow graph were executed. If a coun

Re: [PATCH V2 1/2] x86: Don't add crtfastmath.o for -shared

2022-12-16 Thread Uros Bizjak via Gcc-patches
On Thu, Dec 15, 2022 at 7:23 AM liuhongt wrote: > > Update in V2: > Split -shared change into a separate commit and add some documentation > for it. > Bootstrapped and regtested on x86_64-pc-linu-gnu{-m32,}. > Ok of trunk? > > Don't add crtfastmath.o for -shared to avoid changing the MXCSR registe

Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity.

2022-12-16 Thread Richard Biener via Gcc-patches
On Thu, Dec 15, 2022 at 4:26 PM Dimitrije Milosevic wrote: > > Hi Richard, > > Sorry for the delayed response, I couldn't find the time to fully focus on > this topic. > > > I'm not sure this is accurate but at least the cost of using an unsupported > > addressing mode should be at least that of

[PATCH v2] gcov: Fix -fprofile-update=atomic

2022-12-16 Thread Sebastian Huber
The code coverage support uses counters to determine which edges in the control flow graph were executed. If a counter overflows, then the code coverage information is invalid. Therefore the counter type should be a 64-bit integer. In multithreaded applications, it is important that the counter i

[PATCH] hwasan: Add libhwasan_preinit.o

2022-12-16 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed an inconsistency with the other sanitizers. For -fsanitize={address,thread,leak} we link into binaries lib*san_preinit.o such that the -lasan, -ltsan or -llsan libraries are initialized as early as possible through .preinit_array. The hwasan library has the same thing, but we stra

Re: [PATCH] gcov: Fix -fprofile-update=atomic

2022-12-16 Thread Sebastian Huber
On 16.12.22 10:47, Richard Biener wrote: No, if you select -fprofile-update=atomic, then the updates shall be atomic from my point of view. If a fallback is acceptable, then you can use -fprofile-update=prefer-atomic. Using the fallback in -fprofile-update=atomic is a bug which prevents the use o

[PATCH (pushed)] gcc-changelog: do not use PatchSet.from_filename

2022-12-16 Thread Martin Liška
Use rather PatchSet constructor where we can pass properly opened file with newline='\n'. contrib/ChangeLog: * gcc-changelog/git_email.py: Use PatchSet constructor as newline argument is not supported with older unidiff library. --- contrib/gcc-changelog/git_email.py | 11

Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity.

2022-12-16 Thread Dimitrije Milosevic
Hi Richard, > The only documentation on complexity I find is > >   int64_t cost; /* The runtime cost.  */ >   unsigned complexity;  /* The estimate of the complexity of the code for >    the computation (in no concrete units -- >    complexi

[OG12][committed] libgomp: Fix USM bugs

2022-12-16 Thread Andrew Stubbs
I've committed this patch to the devel/omp/gcc-12 branch. It fixes some missed cases in the Unified Shared Memory implementation that were especially noticeable in Fortran because the size of arrays are known. This patch will have to be folded into the mainline USM patches that were submitted

Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity.

2022-12-16 Thread Richard Biener via Gcc-patches
On Fri, Dec 16, 2022 at 12:37 PM Dimitrije Milosevic wrote: > > > Hi Richard, > > > The only documentation on complexity I find is > > > > int64_t cost; /* The runtime cost. */ > > unsigned complexity; /* The estimate of the complexity of the code for > >t

[PATCH] middle-end/108086 - avoid unshare_expr when remapping SSA names

2022-12-16 Thread Richard Biener via Gcc-patches
r0-89280-g129a37fc319db8 added unsharing to remap_ssa_name but that wasn't in the version of the patch posted. That has some non-trivial cost through mostly_copy_tree_r and copy_tree_r but more importantly it doesn't seem to be necessary. I've successfully bootstrapped and tested with an assert w

Re: [PATCH] gcov: Fix -fprofile-update=atomic

2022-12-16 Thread Richard Biener via Gcc-patches
On Fri, Dec 16, 2022 at 11:39 AM Sebastian Huber wrote: > > On 16.12.22 10:47, Richard Biener wrote: > >> No, if you select -fprofile-update=atomic, then the updates shall be > >> atomic from my point of view. If a fallback is acceptable, then you can > >> use -fprofile-update=prefer-atomic. Using

[Patch] gcc-changelog: Add warning for auto-added files

2022-12-16 Thread Tobias Burnus
This patch adds a warning for automatically added files. For check_email, it is always printed - for git_check_commit.py only in verbose mode. The './check_email.py' variant that implicitly uses the 'patches' directory does not seem to get used that often, given that I had to remove the ', False'

Re: [PATCH] gcov: Fix -fprofile-update=atomic

2022-12-16 Thread Sebastian Huber
On 16.12.22 13:09, Richard Biener wrote: On Fri, Dec 16, 2022 at 11:39 AM Sebastian Huber wrote: On 16.12.22 10:47, Richard Biener wrote: No, if you select -fprofile-update=atomic, then the updates shall be atomic from my point of view. If a fallback is acceptable, then you can use -fprofi

[PATCH] Simplify gimple_assign_load

2022-12-16 Thread Richard Biener via Gcc-patches
The following simplifies and outlines gimple_assign_load. In particular it is not necessary to get at the base of the possibly loaded expression but just handle the case of a single handled component wrapping a non-memory operand. Bootstrapped and tested on x86_64-unknown-linux-gnu, not yet sure

Re: [Patch] gcc-changelog: Add warning for auto-added files

2022-12-16 Thread Martin Liška
On 12/16/22 13:33, Tobias Burnus wrote: > Thus, the auto-add feature does not seem to be an often used feature -  > neither on > purpose nor accidentally. And glancing at the results, I think it was as  > often used > on purpose as it was used accidentally. Hello. Understood, I do support the new

[PATCH, m2] Add missing m2.stage{profile,feedback} to Make-lang.in

2022-12-16 Thread Gaius Mulley via Gcc-patches
Add missing profile and feedback hooks consistent with all other frontends. gcc/m2/ChangeLog: * Make-lang.in (m2.stageprofile): Added. (m2.stagefeedback) Added. Bootstrapped and tested using configure --with-build-config=bootstrap-lto-lean --enable-languages=m2 make profiledbo

Re: [PATCH, nvptx, 2/2] Reimplement libgomp barriers for nvptx: bar.red instruction support in GCC

2022-12-16 Thread Tom de Vries via Gcc-patches
On 9/21/22 09:45, Chung-Lin Tang wrote: Hi Tom, following the first patch. This new barrier implementation I posted in the first patch uses the 'bar.red' instruction. > Usually this could've been easily done with a single line of inline assembly. However I quickly realized that because the NVP

Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere (was: Make '-frust-incomplete-and-experimental-compiler-do-not-use' a 'Common' option)

2022-12-16 Thread Thomas Schwinge
Hi! On 2022-12-15T16:17:05+0100, Jakub Jelinek wrote: > On Thu, Dec 15, 2022 at 04:01:33PM +0100, Thomas Schwinge wrote: >> Or, options are applicable to just one front end, and can just be a no-op >> for others, for shared-language compilation. For example, '-nostdinc++', >> or '-frust-incomple

[committed] libstdc++: Fix self-move for std::weak_ptr [PR108118]

2022-12-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-lixnu. Pushed to trunk. I'll backport this too. -- >8 -- I think an alternative fix would be something like: _M_ptr = std::exchange(rhs._M_ptr, nullptr); _M_refcount = std::move(rhs._M_refcount); The standard's move-and-swap implementation generates smaller code at all levels

Re: Ping---[V3][PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-12-16 Thread Qing Zhao via Gcc-patches
> On Dec 16, 2022, at 4:17 AM, Richard Biener wrote: > > On Thu, 15 Dec 2022, Qing Zhao wrote: > >> >> >>> On Dec 15, 2022, at 2:47 AM, Richard Biener wrote: >>> >>> On Wed, 14 Dec 2022, Qing Zhao wrote: >>> Hi, Richard, I guess that we now agreed on the following: >

Re: [PATCH, nvptx, 1/2] Reimplement libgomp barriers for nvptx

2022-12-16 Thread Tom de Vries via Gcc-patches
On 9/21/22 09:45, Chung-Lin Tang wrote: Hi Tom, I had a patch submitted earlier, where I reported that the current way of implementing barriers in libgomp on nvptx created a quite significant performance drop on some SPEChpc2021 benchmarks: https://gcc.gnu.org/pipermail/gcc-patches/2022-Septem

[PATCH v2] ipa-cp: Speculatively call specialized functions

2022-12-16 Thread Manolis Tsamis
The IPA CP pass offers a wide range of optimizations, where most of them lead to specialized functions that are called from a call site. This can lead to multiple specialized function clones, if more than one call-site allows such an optimization. If not all call-sites can be optimized, the program

[Patch] nvptx/mkoffload.cc: Add dummy proc for OpenMP rev-offload table [PR108098]

2022-12-16 Thread Tobias Burnus
Seems to be a CUDA JIT issue - which is fixed by adding a dummy procedure. Lightly tested with 4 systems at hand, where 2 failed before. One had 10.2 and the other had some ancient CUDA where 'nvptx-smi' did not print a CUDA version and requires -mptx=3.1. (I did check that offloading indeed happ

Re: [RFC PATCH] ipa-cp: Speculatively call specialized functions

2022-12-16 Thread Manolis Tsamis
On Mon, Nov 14, 2022 at 9:37 AM Richard Biener wrote: > > On Sun, Nov 13, 2022 at 4:38 PM Christoph Muellner > wrote: > > > > From: mtsamis > > > > The IPA CP pass offers a wide range of optimizations, where most of them > > lead to specialized functions that are called from a call site. > > Thi

[PATCH] c++: empty captured var as template argument [PR107437]

2022-12-16 Thread Patrick Palka via Gcc-patches
Here we're rejecting the use of the captured 't' (of empty type) as a template argument ultimately because convert_nontype_argument checks potentiality using is_constant_expression which returns false for captured variables since want_rval=false. But in this case an lvalue-to-rvalue conversion of

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-16 Thread Palmer Dabbelt
On Mon, 28 Nov 2022 10:45:51 PST (-0800), Palmer Dabbelt wrote: On Fri, 18 Nov 2022 09:01:08 PST (-0800), Palmer Dabbelt wrote: On Thu, 17 Nov 2022 22:59:08 PST (-0800), Kito Cheng wrote: Wait, what's Xgnuzihintpausestate??? I just made it up, it's defined right next to the name like those pr

Re: [PATCH] RISC-V: Fix up some wording in the mcpu/mtune comment

2022-12-16 Thread Palmer Dabbelt
On Mon, 28 Nov 2022 13:37:25 PST (-0800), Palmer Dabbelt wrote: gcc/ChangeLog: * config/riscv/riscv.cc (riscv_option_override): Fix comment wording. --- Just stumbled on this one looking at the output of that sed script. The script itself was fine, the original comment was to bl

[PATCH] gccrs: add selftest-rust-gdb and selftest-rust-valgrind "make" targets

2022-12-16 Thread David Malcolm via Gcc-patches
Add "make" targets to make it easy to run the rust selftests under gdb and under valgrind via: make selftest-rust-gdb and make selftest-rust-valgrind respectively, similar to analogous "make" targets in the C and C++ frontends. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK

[PATCH] gccrs: avoid printing to stderr in selftest::rust_flatten_list

2022-12-16 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/rust/ChangeLog: * resolve/rust-ast-resolve-item.cc (selftest::rust_flatten_list): Remove output to stderr. Signed-off-by: David Malcolm --- gcc/rust/resolve/rust-ast-resolve-item.cc | 3 --- 1 file

Re: [PATCH] c++: empty captured var as template argument [PR107437]

2022-12-16 Thread Jason Merrill via Gcc-patches
On 12/16/22 11:45, Patrick Palka wrote: Here we're rejecting the use of the captured 't' (of empty type) as a template argument ultimately because convert_nontype_argument checks potentiality using is_constant_expression which returns false for captured variables since want_rval=false. But in th

Re: Adding a new thread model to GCC

2022-12-16 Thread Jonathan Wakely via Gcc-patches
On Mon, 31 Oct 2022 at 09:19, Eric Botcazou via Libstdc++ wrote: > I have attached a revised version of the original patch at: > https://gcc.gnu.org/legacy-ml/gcc-patches/2019-06/msg01840.html > > This reimplements the GNU threads library on native Windows (except for the > Objective-C specific

Re: [PATCH v2] RISC-V: Produce better code with complex constants [PR95632] [PR106602]

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/9/22 11:25, Raphael Moreira Zinsly wrote: Changes since v1: - Fixed formatting issues. - Added a name to the define_insn_and_split pattern. - Set the target on the 'dg-do compile' in pr106602.c. - Removed the rv32 restriction in pr95632.c. -- >8 -- Due t

Re: [PATCH] initialize fde objects lazily

2022-12-16 Thread Jason Merrill via Gcc-patches
On 12/9/22 12:34, Thomas Neumann wrote: When registering an unwind frame with __register_frame_info_bases we currently initialize that fde object eagerly. This has the advantage that it is immutable afterwards and we can safely access it from multiple threads, but it has the disadvantage that we

Re: Ping---[V3][PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-12-16 Thread Qing Zhao via Gcc-patches
FYI. Committed this last patch as: https://jira.oci.oraclecorp.com/browse/OLDIS-21095 I will come up with the update to gcc-13/changes.html for -fstrict-flex-arrays very soon. Thanks. Qing > On Dec 16, 2022, at 9:49 AM, Qing Zhao via Gcc-patches > wrote: > > > >> On Dec 16, 2022, at 4:17

Re: [PATCH 2/3] Make __float128 use the _Float128 type, PR target/107299

2022-12-16 Thread Segher Boessenkool
Hi! On Thu, Dec 15, 2022 at 07:09:38PM -0500, Michael Meissner wrote: > On Thu, Dec 15, 2022 at 11:59:49AM -0600, Segher Boessenkool wrote: > > On Wed, Dec 14, 2022 at 10:36:03AM +0100, Jakub Jelinek wrote: > > > The hacks with different precisions of powerpc 128-bit floating types are > > > very

Re: [PATCH] speed up end_fde_sort using radix sort

2022-12-16 Thread Jason Merrill via Gcc-patches
On 11/22/22 03:00, Thomas Neumann wrote: When registering a dynamic unwinding frame the fde list is sorted. Previously, we split the list into a sorted and an unsorted part, sorted the later using heap sort, and merged both. That can be quite slow due to the large number of (expensive) comparison

[PATCH] c-family: Fix ICE with -Wsuggest-attribute [PR98487]

2022-12-16 Thread Marek Polacek via Gcc-patches
Here we crash because check_function_format was using TREE_PURPOSE directly rather than using get_attribute_name. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? PR c/98487 gcc/c-family/ChangeLog: * c-format.cc (check_function_format): Use get_attribute_name. gcc/t

Re: [PATCH] c++: empty captured var as template argument [PR107437]

2022-12-16 Thread Patrick Palka via Gcc-patches
On Fri, 16 Dec 2022, Jason Merrill wrote: > On 12/16/22 11:45, Patrick Palka wrote: > > Here we're rejecting the use of the captured 't' (of empty type) as a > > template argument ultimately because convert_nontype_argument checks > > potentiality using is_constant_expression which returns false f

Re: Adding a new thread model to GCC

2022-12-16 Thread Eric Botcazou via Gcc-patches
> The libgcc parts look reasonable to me, but I can't approve them. > Maybe Jonathan Yong can approve those parts as mingw-w64 target > maintainer, or maybe a libgcc approver can do so. OK. > The libstdc++ parts are OK for trunk. IIUC they could go in > separately, they just wouldn't be very much

Re: [PATCH] hwasan: Add libhwasan_preinit.o

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/16/22 03:27, Jakub Jelinek via Gcc-patches wrote: Hi! I've noticed an inconsistency with the other sanitizers. For -fsanitize={address,thread,leak} we link into binaries lib*san_preinit.o such that the -lasan, -ltsan or -llsan libraries are initialized as early as possible through .prei

Re: [PATCH] RISC-V: Change vlmul printing rule

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/13/22 23:57, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong This patch is preparing patch for the following patch (VSETVL PASS) support since the current vlmul printing rule is not appropriate information for VSETVL PASS. I split this fix in a single patch. gcc/ChangeLog: *

Re: [PATCH] RISC-V: Fix annotation

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/14/22 01:39, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc: Fix annotation. Just roll this into the patch that adds riscv-vsetvl.cc. jeff

Re: [PATCH] RISC-V: Remove unused redundant vector attributes

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/14/22 01:51, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong I found that I forgot to remove these redundant attributes. Sorry about that. gcc/ChangeLog: * config/riscv/vector.md (): Remove redundant attributes. OK. jeff

[committed] analyzer: add src_region param to region_model::check_for_poison [PR106479]

2022-12-16 Thread David Malcolm via Gcc-patches
PR analyzer/106479 notes that we don't always show the region-creation event for a memmove from an uninitialized stack region. This occurs when using kf_memcpy_memmove. Fix by passing a src_region hint to region_model::check_for_poison. Successfully bootstrapped & regrtested on x86_64-pc-linux-g

Re: [PATCH] RISC-V: Remove unit-stride store from ta attribute

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/14/22 04:36, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong Since store instructions doesn't care about tail policy, we remove vste from "ta" attribute. Hence, we could have more fusion chances and better optimization. gcc/ChangeLog: * config/riscv/vector.md: Remove vste. Ju

Re: [PATCH] RISC-V: Add testcases for VSETVL PASS

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/14/22 01:09, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/rvv.exp: Adjust to enable tests for VSETVL PASS. * gcc.target/riscv/rvv/vsetvl/dump-1.c: New test. * gcc.target/riscv/rvv/vsetvl/vlmax_single_block-1.

Re: [PATCH] RISC-V: Fix RVV mask mode size

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/13/22 23:48, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong This patch is to fix RVV mask modes size. Since mask mode size are adjust as a whole RVV register size LMUL = 1 which not only make each mask type for example vbool32_t tied to vint8m1_t but also increase memory consuming. I

Re: [PATCH V6] rs6000: Optimize cmp on rotated 16bits constant

2022-12-16 Thread Segher Boessenkool
On Wed, Dec 14, 2022 at 04:26:54PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > On Mon, Aug 29, 2022 at 11:42:16AM +0800, Jiufu Guo wrote: > >> li %r9,-1 > >> rldicr %r9,%r9,0,0 > >> cmpd %cr0,%r3,%r9 > > > > FWIW, I find the winnt assembler syntax very hard to

[committed] libstdc++: Diagnose broken allocator rebind members

2022-12-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This adds a static assertion to std::allocator_traits::rebind_alloc to diagnose violations of the rule that rebinding an allocator to its own value type yields the same allocator type. This helps to catch the easy mistake of deriving from std::alloc

[committed] libstdc++: Fixes for std::expected

2022-12-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. I'll backport to gcc-12 too. -- >8 -- This fixes some bugs in the swap functions for std::expected. It also disables the noexcept-specifiers for equality operators, because those are problematic when querying whether a std::expected is equality comparable. T

[committed] libstdc++: Add monadic operations to std::expected for C++23 (P2505R5)

2022-12-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This was approved for C++23 last month in Kona. libstdc++-v3/ChangeLog: * include/std/expected (expected): Add monadic operations. (expected): Likewise. * include/std/version (__cpp_lib_expected): Bump value. * tests

Re: [PATCH V4 1/2] rs6000: use li;x?oris to build constant

2022-12-16 Thread Segher Boessenkool
On Wed, Dec 14, 2022 at 06:27:57PM +0800, Kewen.Lin wrote: > > +void __attribute__ ((__noipa__)) lixoris (long long *arg) > > Nit: Adding separator "_" to make the name like "li_xoris" or even > "test_li_xoris" seems better to read. Also applied for the other > function names "lioris" and "lisrld

Re: [PATCH V4 1/2] rs6000: use li;x?oris to build constant

2022-12-16 Thread Segher Boessenkool
Hi! On Mon, Dec 12, 2022 at 09:38:28AM +0800, Jiufu Guo wrote: > PR target/106708 > > gcc/ChangeLog: > > * config/rs6000/rs6000.cc (rs6000_emit_set_long_const): Add using > "li; x?oris" to build constant. > > gcc/testsuite/ChangeLog: > > * gcc.target/powerpc/pr106708.c:

Re: Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere (was: Make '-frust-incomplete-and-experimental-compiler-do-not-use' a 'Common' opt

2022-12-16 Thread Iain Buclaw via Gcc-patches
Excerpts from Thomas Schwinge's message of Dezember 16, 2022 3:10 pm: > > In the test suites, a number of existing test cases explicitly match the > "command-line option [...] is valid for [...] but not for [...]" > diagnostic with 'dg-warning'; I've left those alone. On the other hand, > I've ch

[PATCH] libsanitizer: Add __interceptor_sigsetjmp_internal

2022-12-16 Thread H.J. Lu via Gcc-patches
Add an internal alias to __interceptor_sigsetjmp to avoid R_X86_64_PC32 relocation for "jmp __interceptor_sigsetjmp" with old assemblers. PR sanitizer/108106 * hwasan/hwasan_setjmp_x86_64.S (__interceptor_sigsetjmp): Add an internal alias, __interceptor_sigsetjmp_internal.

Re: [PATCH 2/3] Make __float128 use the _Float128 type, PR target/107299

2022-12-16 Thread Michael Meissner via Gcc-patches
On Fri, Dec 16, 2022 at 11:55:27AM -0600, Segher Boessenkool wrote: > Hi! > > On Thu, Dec 15, 2022 at 07:09:38PM -0500, Michael Meissner wrote: > > On Thu, Dec 15, 2022 at 11:59:49AM -0600, Segher Boessenkool wrote: > > > On Wed, Dec 14, 2022 at 10:36:03AM +0100, Jakub Jelinek wrote: > > > > The h

[committed] Suppress warning from -fstack-protector on hppa

2022-12-16 Thread John David Anglin
Committed to trunk. Dave --- Suppress -fstack-protector warning on hppa. Some package builds enable -fstack-protector and -Werror. Since -fstack-protector is not supported on hppa because the stack grows up, these packages must check for the warning generated by -fstack-protector and suppress it

Re: [PATCH] RISC-V: Remove unit-stride store from ta attribute

2022-12-16 Thread Palmer Dabbelt
On Fri, 16 Dec 2022 12:01:04 PST (-0800), jeffreya...@gmail.com wrote: On 12/14/22 04:36, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong Since store instructions doesn't care about tail policy, we remove vste from "ta" attribute. Hence, we could have more fusion chances and better optimizati

Re: [PATCH] RISC-V: Remove unit-stride store from ta attribute

2022-12-16 Thread Andrew Waterman
On Fri, Dec 16, 2022 at 1:59 PM Palmer Dabbelt wrote: > > On Fri, 16 Dec 2022 12:01:04 PST (-0800), jeffreya...@gmail.com wrote: > > > > > > On 12/14/22 04:36, juzhe.zh...@rivai.ai wrote: > >> From: Ju-Zhe Zhong > >> > >> Since store instructions doesn't care about tail policy, we remove > >> vst

Re: [PATCH] c++: empty captured var as template argument [PR107437]

2022-12-16 Thread Jason Merrill via Gcc-patches
On 12/16/22 14:03, Patrick Palka wrote: On Fri, 16 Dec 2022, Jason Merrill wrote: On 12/16/22 11:45, Patrick Palka wrote: Here we're rejecting the use of the captured 't' (of empty type) as a template argument ultimately because convert_nontype_argument checks potentiality using is_constant_ex

Re: [PATCH] c-family: Fix ICE with -Wsuggest-attribute [PR98487]

2022-12-16 Thread Jason Merrill via Gcc-patches
On 12/16/22 13:28, Marek Polacek wrote: Here we crash because check_function_format was using TREE_PURPOSE directly rather than using get_attribute_name. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. PR c/98487 gcc/c-family/ChangeLog: * c-format.cc (check

Re: [PATCH] build: doc: Obsolete Solaris 11.3 support

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/13/22 05:35, Rainer Orth wrote: This patch implements the Solaris 11.[0-3] obsoletion just announced in https://gcc.gnu.org/pipermail/gcc/2022-December/240322.html Bootstrapped without regressions on Solaris 11.3 (i386-pc-solaris2.11, sparc-sun-solaris2.11 without and with --en

Re: [PATCH] tree-optimization/106904 - bogus -Wstringopt-overflow with vectors

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/7/22 06:54, Richard Biener via Gcc-patches wrote: The following avoids CSE of &ps->wp to &ps->wp.hwnd confusing -Wstringopt-overflow by making sure to produce addresses to the biggest container from vectorization. For this I introduce strip_zero_offset_components which turns &ps->wp.hwn

Re: [PATCH RFA] build: add -Wconditionally-supported to strict_warn [PR64867]

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/6/22 06:26, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- The PR (which isn't resolved by this commit) pointed out to me that GCC should build with -Wconditionally-supported to support bootstrapping with a C++11 compiler that makes different ch

Re: Re: [PATCH] RISC-V: Remove unit-stride store from ta attribute

2022-12-16 Thread 钟居哲
Yes, the vector stores doesn't care about policy no matter mask or tail. Removing it can allow VSETVL PASS have more optimization chances since VSETVL PASS has backward demands fusion. For example: vadd tama vse.v VSETVL PASS will choose to set tama for vse.v vadd tumu vse.v VSETVL PASS will choo

Re: Re: [PATCH] RISC-V: Add testcases for VSETVL PASS

2022-12-16 Thread 钟居哲
Register allocation (RA) doesn't affect the assembler checks since I relax the registers in assmebler checks, all assmebler checks have their own goal. For example: The code like this: +void foo2 (void * restrict in, void * restrict out, int n) +{ + for (int i = 0; i < n; i++) +{ + vuin

Re: [PATCH] RISC-V: Add testcases for VSETVL PASS

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/16/22 18:31, 钟居哲 wrote: Register allocation (RA) doesn't affect the assembler checks since I relax the registers in assmebler checks, all assmebler checks have their own goal. For example: The code like this: +void foo2 (void * restrict in, void * restrict out, int n) +{ + for (int i

Re: Re: [PATCH] RISC-V: Fix RVV mask mode size

2022-12-16 Thread 钟居哲
Yes, VNx4DF only has 4 bit in mask mode in case of load and store. For example vlm or vsm we will load store 8-bit ??? (I am not sure hardward can load store 4bit,but I am sure it definetly not load store the whole register size) So ideally it should be model more accurate. However, since GCC ass

Re: [PATCH] RISC-V: Fix RVV machine mode attribute configuration

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/14/22 00:01, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong The attribute configuration of each machine mode are support in the previous patch. I noticed some of them are not correct during VSETVL PASS testsing. Correct them in the single patch now. gcc/ChangeLog: * config/

Re: Re: [PATCH] RISC-V: Fix RVV machine mode attribute configuration

2022-12-16 Thread 钟居哲
Actually, I don't check and test HF carefully since I disable them. Kito ask me to disable all HF modes since zvfhmin is no ratified and GCC doesn't allow any un-ratified ISA. You can see vector-iterator.md that all RVV modes supported including QI HI SI DI SF DF excluding HF and BF. juzhe.zh...

Re: [PATCH] RISC-V: Fix RVV mask mode size

2022-12-16 Thread Jeff Law via Gcc-patches
On 12/16/22 18:44, 钟居哲 wrote: Yes, VNx4DF only has 4 bit in mask mode in case of load and store. For example vlm or vsm we will load store 8-bit ??? (I am not sure hardward can load store 4bit,but I am sure it definetly not load store the whole register size) Most likely than not you end up

Re: Re: [PATCH] RISC-V: Fix RVV mask mode size

2022-12-16 Thread 钟居哲
>> Most likely than not you end up loading a larger quantity with the high >> bits zero'd. Interesting that we're using a packed model. I'd been >> told it was fairly expensive to implement in hardware relative to teh >> cost of implementing the sparse model. >> I'm a bit confused by this. GCC

Re: Add zstd support to libbacktrace

2022-12-16 Thread Ian Lance Taylor via Gcc-patches
Some more tweaks of the libbacktrace zstd decompressor to make decompressing slightly faster: unpack all the literal data into the output buffer, rather than using scratch space. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * elf.c (elf_fetch_backwa