Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 7:31 AM dianhong.xu--- via Gcc-patches wrote: > > From: dianhong xu > > Add -muse-unaligned-vector-move option to emit unaligned vector move > instaructions. Why would you ever want to have such option?! Should the documentation at least read "emit unaligned vector moves

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 9:02 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 7:31 AM dianhong.xu--- via Gcc-patches > wrote: > > > > From: dianhong xu > > > > Add -muse-unaligned-vector-move option to emit unaligned vector move > > instaructions. > > Why would you ever want to have such opt

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-20 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 19:58, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch emits a more verbose diagnostic for target attribute that > > is an architecture extension needing a leading '+'. > > > > For the following test, > > void calculate(void) __attrib

Re: [PATCH] gcc-changelog: Add libffi/ to ignored_prefixes

2021-10-20 Thread Martin Liška
On 10/20/21 01:23, H.J. Lu wrote: Add libffi/ to ignored_prefixes for syncing with libffi upstream: Sure, please push it. Martin

[PATCH] Restore --param=max-fsm-thread-length

2021-10-20 Thread Aldy Hernandez via Gcc-patches
The removal of --param=max-fsm-thread-length is causing code explosion. I thought that --param=max-fsm-thread-path-insns was a better gague for path profitability than raw BB length, but it turns out that we don't take into account PHIs when estimating the number of statements. In this PR, we hav

[COMMITTED] Remove unused back_threader_registry::m_threaded_paths.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
Tested on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader_registry::back_threader_registry): Remove. (back_threader_registry::register_path): Remove m_threaded_paths. --- gcc/tree-ssa-threadbackward.c | 11 +-- 1 file changed, 1 insertion(

[committed] openmp: Fix up struct gomp_work_share handling [PR102838]

2021-10-20 Thread Jakub Jelinek via Gcc-patches
Hi! If GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is not defined, the intent was to treat the split of the structure between first cacheline (64 bytes) as mostly write-once, use afterwards and second cacheline as rw just as an optimization. But as has been reported, with vectorization enabled at -O2 it ca

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Xu Dianhong via Gcc-patches
Thanks for the comments. > And does it even work? It works, I checked it in the test case, and when using this option, it can emit an unaligned vector move. >I fail to see adjustments to memory operands of SSE/AVX instructions that have to be aligned I changed all vector move in "get_ssemov" witho

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Xu Dianhong via Gcc-patches
Thanks for the comments. >Why would you ever want to have such option?! I need to ask @H. J. Lu for help to answer this question. He knows more about the background. I may not explain it clearly. >Should the documentation at least read "emit unaligned vector moves even for aligned storage or when

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 9:48 AM Xu Dianhong wrote: > > Thanks for the comments. > > > And does it even work? > It works, I checked it in the test case, and when using this option, it can > emit an unaligned vector move. > >I fail to see adjustments to memory operands of > SSE/AVX instructions tha

[RFC] Partial vectors for s390

2021-10-20 Thread Robin Dapp via Gcc-patches
Hi, I have been playing around with making Kewen's partial vector changes workable with s390: We have a vll instruction that can be passed the highest byte to load. The rather unfortunate consequence of this is that a length of zero cannot be specified. The partial vector framework, however

[PATCH] Add new replace script.

2021-10-20 Thread Martin Liška
Hello. Sometimes, one needs a more complex replacement in source files and an editor can be a weak tool. That has happened to me in the recent time and so I made the replacement in Python. The script provides simple API: - handle_file_p - return True if you want to touch the file - modify_line -

Re: [committed] libstdc++: Implement monadic operations for std::optional (P0798R8)

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 06:48, Tim Song wrote: > > On Tue, Oct 19, 2021 at 9:05 AM Jonathan Wakely via Gcc-patches > wrote: > > > > +constexpr bool > > +test_copy_elision() > > +{ > > + return true; > > +} > > + > > +static_assert( test_copy_elision() ); > > + > > This isn't much of a test :) The

Fix PR middle-end/102764

2021-10-20 Thread Eric Botcazou via Gcc-patches
This is a regression present on the mainline in the form of a -fcompare-debug failure at -O3 on a compiler-generated testcase. Fixed by disregarding a debug statement in the last position of a basic block to reset the current location for the outgoing edges. Bootstrapped/regtested on x86-64/Li

[Ada] Avoid exception propagation during bootstrap

2021-10-20 Thread Eric Botcazou via Gcc-patches
This addresses PR ada/100486, which is the bootstrap failure of GCC 11 for 32- bit Windows in the MSYS setup. The PR shows that we cannot rely on exception propagation being operational during the bootstrap, at least on the 11 branch, so fix this by removing the problematic raise statement. Tes

Re: [PATCH] hardened conditionals

2021-10-20 Thread Alexandre Oliva via Gcc-patches
On Oct 18, 2021, Richard Biener wrote: > Yes, it is (just having had a quick look most of the functions in the > pass lack function-level comments). Oh my, I'm so sorry, please accept my apologies. I stepped away from this patch for a few weeks, and when I got back to it, I did not realize it w

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-20 Thread Martin Liška
On 10/19/21 12:53, Richard Biener wrote: Meh ... :/ Well, move the target override hook call down (try to shuffle things so diagnostics happen after but "inits" happen before). Not so easy. There are direct usages of the hooks (influences dwarf2out_as_loc_support and dwarf2out_as_locview_suppo

[PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-10-20 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch disables gimple folding for float or double vec_min/max when  fast-math is not set. It makes vec_min/max conform with the guide. Bootstrapped and tested on powerpc64le-linux with no regressions. Is this okay  for trunk? Any recommendations? Thanks a lot.   I refined the patch acc

Re: [RFC] Partial vectors for s390

2021-10-20 Thread Richard Sandiford via Gcc-patches
Robin Dapp via Gcc-patches writes: > Hi, > > I have been playing around with making Kewen's partial vector changes > workable with s390: > > We have a vll instruction that can be passed the highest byte to load. > The rather unfortunate consequence of this is that a length of zero > cannot be s

Re: [PATCH] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On 19/10/21 17:47 +0100, Jonathan Wakely wrote: The ISA-3.0 instruction set includes DARN ("deliver a random number") which can be used similar to the existing support for RDRAND and RDSEED. libstdc++-v3/ChangeLog: * src/c++11/random.cc (USE_DARN): Define. (__ppc_darn): New func

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
On Wed, Oct 20, 2021 at 1:00 AM Jeff Law wrote: > > > > On 10/18/2021 8:03 AM, Aldy Hernandez wrote: > > > > > > On 10/18/21 3:41 PM, Aldy Hernandez wrote: > > > >> I've been experimenting with reducing the total number of threading > >> passes, and I'd like to see if there's consensus/stomach for

PING^5 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen > on 2021/6/11 下午9:16, Kewen.Lin via Gcc-patches wrote: > Hi Segher, > > Thanks for the review! > > on 2021/6/10 上午4:17, Segher Boessenkool wrote: >> Hi! >> >> O

PING^2 [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580358.html BR, Kewen > on 2021/9/28 下午4:16, Kewen.Lin via Gcc-patches wrote: >> Hi, >> >> This patch follows the discussions here[1][2], where Segher >> pointed out the existing way to guard the extra penalized >> c

PING^4 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html One related patch [1] is ready to commit, whose test cases rely on this patch if no changes are applied to them. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579658.html BR, Kewen

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-20 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Tue, 19 Oct 2021 at 19:58, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > Hi, >> > The attached patch emits a more verbose diagnostic for target attribute >> > that >> > is an architecture extension needing a leading '+'. >> > >> > For the fol

PING^1 [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, As the discussions and the testing result under the main thread, this patch would be safe. Ping for this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580357.html BR, Kewen on 2021/9/28 下午4:13, Kewen.Lin via Gcc-patches wrote: > Hi, > > As the discussion in PR102347, currently

Re: [Patch][GCC][middle-end] - Lower store and load neon builtins to gimple

2021-10-20 Thread Andre Vieira (lists) via Gcc-patches
On 27/09/2021 12:54, Richard Biener via Gcc-patches wrote: On Mon, 27 Sep 2021, Jirui Wu wrote: Hi all, I now use the type based on the specification of the intrinsic instead of type based on formal argument. I use signed Int vector types because the outputs of the neon builtins that I am low

Re: FW: [PING] Re: [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-10-20 Thread Andre Vieira (lists) via Gcc-patches
On 19/10/2021 00:22, Joseph Myers wrote: On Fri, 15 Oct 2021, Richard Biener via Gcc-patches wrote: On Fri, Sep 24, 2021 at 2:59 PM Jirui Wu via Gcc-patches wrote: Hi, Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577846.html The patch is attached as text for ease of use. Is

Re: [Patch][GCC][middle-end] - Lower store and load neon builtins to gimple

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, 20 Oct 2021, Andre Vieira (lists) wrote: > On 27/09/2021 12:54, Richard Biener via Gcc-patches wrote: > > On Mon, 27 Sep 2021, Jirui Wu wrote: > > > >> Hi all, > >> > >> I now use the type based on the specification of the intrinsic > >> instead of type based on formal argument. > >> > >>

Re: FW: [PING] Re: [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, 20 Oct 2021, Andre Vieira (lists) wrote: > > On 19/10/2021 00:22, Joseph Myers wrote: > > On Fri, 15 Oct 2021, Richard Biener via Gcc-patches wrote: > > > >> On Fri, Sep 24, 2021 at 2:59 PM Jirui Wu via Gcc-patches > >> wrote: > >>> Hi, > >>> > >>> Ping: https://gcc.gnu.org/pipermail/gcc

[COMMITTED] Remove superflous debugging messages from the threading registry.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
These are some random obvious cleanups to the threading dumps, since it seems I'm not the only one looking at dumps these days. The "just threaded" debugging message is redundant since there's already an equivalent "Registering jump thread" message. The "about to thread" message is actually confu

[COMMITTED] Remove unused back_threader destructor.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
Tested on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader::~back_threader): Remove. --- gcc/tree-ssa-threadbackward.c | 5 - 1 file changed, 5 deletions(-) diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index 96422a1390e..d94e3b962

[PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
Sometimes we can solve a candidate path without having to recurse further back. This can mostly happen in fully resolving mode, because we can ask the ranger what the range on entry to the path is, but there's no reason this can't always apply. This one-liner removes the fully-resolving restricti

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Xu Dianhong via Gcc-patches
Many thanks for your explanation. I got the meaning of operands. The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it will rise a "Real-Address Mode Exceptions". I haven't considered this situation "b(%rip)" has an address dependence of "a(%rip)" before. I think this situati

Re: [Patch] libgomp.texi: Update OMP_PLACES

2021-10-20 Thread Tobias Burnus
On 18.10.21 09:52, Jakub Jelinek wrote: On Mon, Oct 18, 2021 at 09:22:51AM +0200, Tobias Burnus wrote: This patch updates the OMP_PLACES description for the recent OpenMP 5.1 changes. I actually wonder when/whether the spec reference should be updated to OpenMP 5.1 or an additional reference to

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > > Many thanks for your explanation. I got the meaning of operands. > The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it > will rise a "Real-Address Mode Exceptions". > I haven't considered this situation "b(%rip)" has

Re: [PATCH] AArch64: Tune case-values-threshold

2021-10-20 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >> The problem is that you're effectively asking for these values to be >> taken on faith without providing any analysis and without describing >> how you arrived at the new numbers. Did you try other values too? >> If so, how did they compare with the numbe

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-20 Thread Christophe Lyon via Gcc-patches
Hi, On Tue, Oct 19, 2021 at 11:03 AM liuhongt via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > updated patch: > 1. Add documents in doc/sourcebuild.texi (Effective-Target Keywords). > 2. Reduce -novec.c testcases to contain only new failed parted which > is caused by O2 vectorization. >

[PATCH] tree-optimization/102853 - avoid trapping types in split_constant_offset

2021-10-20 Thread Richard Biener via Gcc-patches
This avoids running into the assert in compute_distributive_range when starting the analysis with operations in a trapping type. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-20 Richard Biener PR tree-optimization/102853 * tree-data-ref.c (split_constant

Re: [PATCH 1/N] Rename asm_out_file function arguments.

2021-10-20 Thread Martin Liška
On 9/16/21 12:00, Martin Liška wrote: As preparation for a new global object that will encapsulate asm_out_file, we would need to live with a macro that will define asm_out_file as casm->out_file and thus the name can't be used in function arguments. I've built all cross compilers with the chang

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-20 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 16:55, Richard Biener wrote: > > On Tue, 19 Oct 2021, Prathamesh Kulkarni wrote: > > > On Tue, 19 Oct 2021 at 13:02, Richard Biener > > wrote: > > > > > > On Tue, Oct 19, 2021 at 9:03 AM Prathamesh Kulkarni via Gcc-patches > > > wrote: > > > > > > > > On Mon, 18 Oct 2021

Re: [PATCH 1/N] Rename asm_out_file function arguments.

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 1:58 PM Martin Liška wrote: > > On 9/16/21 12:00, Martin Liška wrote: > > As preparation for a new global object that will encapsulate > > asm_out_file, we would need to live with a macro that will > > define asm_out_file as casm->out_file and thus the name > > can't be use

[PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jonathan Wakely via Gcc-patches
The documentation on asm statements suggests asm is always a GNU extension, but it's been part of ISO C++ since the first standard. The documentation of -fno-asm is wrong for C++ as it states that it only affects typeof, but actually it affects typeof and asm (despite asm being part of ISO C++).

Re: [PATCH] gcc-changelog: Add libffi/ to ignored_prefixes

2021-10-20 Thread Martin Liška
On 10/20/21 09:15, Martin Liška wrote: On 10/20/21 01:23, H.J. Lu wrote: Add libffi/ to ignored_prefixes for syncing with libffi upstream: Sure, please push it. Martin Hello H.J. Note the server hook is updated after you installed the patch. Martin

[PATCH, v2, OpenMP 5.2, Fortran] Strictly-structured block support for OpenMP directives

2021-10-20 Thread Chung-Lin Tang
Hi Jakub, this version adjusts the patch to let sections/parallel sections also use strictly-structured blocks, making it more towards 5.2. Because of this change, some of the testcases using the sections-construct need a bit of adjustment too, since "block; end block" at the start of the constru

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/20/21 5:27 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 1:00 AM Jeff Law wrote: On 10/18/2021 8:03 AM, Aldy Hernandez wrote: On 10/18/21 3:41 PM, Aldy Hernandez wrote: I've been experimenting with reducing the total number of threading passes, and I'd like to see if there's con

[PATCH] Attempt to resolve all incoming paths to a PHI.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
The code that threads incoming paths to a PHI is duplicating what we do generically in find_paths_to_names. This shortcoming is actually one of the reasons we aren't threading all possible paths into a PHI. For example, we give up after finding one threadable path, but some PHIs have multiple thre

Re: [PATCH] C, C++, OpenMP: Add 'has_device_addr' clause to 'target' construct

2021-10-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 06:17:20PM +0200, Marcel Vollweiler wrote: > @@ -14255,6 +14257,16 @@ c_parser_omp_clause_use_device_addr (c_parser > *parser, tree list) > list); > } > > +/* OpenMP 5.1: > + has_device_addr ( variable-list ) */ > + > +static tree >

[committed][PATCH] libffi: Add LOCAL_PATCHES

2021-10-20 Thread H.J. Lu via Gcc-patches
* LOCAL_PATCHES: New file. --- libffi/LOCAL_PATCHES | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 libffi/LOCAL_PATCHES diff --git a/libffi/LOCAL_PATCHES b/libffi/LOCAL_PATCHES new file mode 100644 index 000..a377c28ce8d --- /dev/null +++ b/libffi/LOCAL_PATCHES @@ -0,

[PATCH] libffi: Add --enable-cet to configure

2021-10-20 Thread H.J. Lu via Gcc-patches
When --enable-cet is used to configure GCC, enable Intel CET in libffi. * Makefile.am (AM_CFLAGS): Add $(CET_FLAGS). (AM_CCASFLAGS): Likewise. * configure.ac (CET_FLAGS): Add GCC_CET_FLAGS and AC_SUBST. * Makefile.in: Regenerate. * aclocal.m4: Likewise.

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, 20 Oct 2021, Prathamesh Kulkarni wrote: > On Tue, 19 Oct 2021 at 16:55, Richard Biener wrote: > > > > On Tue, 19 Oct 2021, Prathamesh Kulkarni wrote: > > > > > On Tue, 19 Oct 2021 at 13:02, Richard Biener > > > wrote: > > > > > > > > On Tue, Oct 19, 2021 at 9:03 AM Prathamesh Kulkarni v

Re: [PATCH] gcc-changelog: Add libffi/ to ignored_prefixes

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 5:30 AM Martin Liška wrote: > > On 10/20/21 09:15, Martin Liška wrote: > > On 10/20/21 01:23, H.J. Lu wrote: > >> Add libffi/ to ignored_prefixes for syncing with libffi upstream: > > > > Sure, please push it. > > > > Martin > > Hello H.J. > > Note the server hook is update

[PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On 20/10/21 10:12 +0100, Jonathan Wakely wrote: On 19/10/21 17:47 +0100, Jonathan Wakely wrote: The ISA-3.0 instruction set includes DARN ("deliver a random number") which can be used similar to the existing support for RDRAND and RDSEED. libstdc++-v3/ChangeLog: * src/c++11/random.cc (

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
On Wed, Oct 20, 2021 at 2:32 PM Andrew MacLeod wrote: > > On 10/20/21 5:27 AM, Aldy Hernandez wrote: > Oh? the float stuff isn't range related, just relations? you can > certainly register those and query/fold them See? I knew you'd get a bright idea. No. There's no time in this release

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 4:18 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > > > > Many thanks for your explanation. I got the meaning of operands. > > The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it > > will rise a "Real-Address Mod

[PATCH][RFC] Map -ftrapv to -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error

2021-10-20 Thread Richard Biener via Gcc-patches
This maps -ftrapv to -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error, effectively removing flag_trapv (or rather making it always false). This has implications on language support - while -ftrapv was formerly universally available the mapping restricts it to the C family of f

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-20 Thread Andre Vieira (lists) via Gcc-patches
On 15/10/2021 09:48, Richard Biener wrote: On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: Hi Richi, I think this is what you meant, I now hide all the unrolling cost calculations in the existing target hooks for costs. I did need to adjust 'finish_cost' to take the loop_vinfo so the target's

[PATCH] calls.c: Remove some dead code and target hooks

2021-10-20 Thread Alex Coplan via Gcc-patches
Hi all, Looking at calls.c:initialize_argument_information, I spotted some dead code that seems to have been left behind from when MPX support was removed. This patch removes that code as well as the associated target hooks (which appear to be unused). Bootstrapped and regtested on aarch64-linux

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Martin Sebor via Gcc-patches
On 10/20/21 4:28 AM, Aldy Hernandez via Gcc-patches wrote: Sometimes we can solve a candidate path without having to recurse further back. This can mostly happen in fully resolving mode, because we can ask the ranger what the range on entry to the path is, but there's no reason this can't always

Re: [PATCH] AArch64: Improve address rematerialization costs

2021-10-20 Thread Wilco Dijkstra via Gcc-patches
ping From: Wilco Dijkstra Sent: 02 June 2021 11:21 To: GCC Patches Cc: Kyrylo Tkachov ; Richard Sandiford Subject: [PATCH] AArch64: Improve address rematerialization costs   Hi, Given the large improvements from better register allocation of GOT accesses, I decided to generalize it to get la

Re: [PATCH v3] AArch64: Improve GOT addressing

2021-10-20 Thread Wilco Dijkstra via Gcc-patches
ping From: Wilco Dijkstra Sent: 04 June 2021 14:44 To: Richard Sandiford Cc: Kyrylo Tkachov ; GCC Patches Subject: [PATCH v3] AArch64: Improve GOT addressing   Hi Richard, This merges the v1 and v2 patches and removes the spurious MEM from ldr_got_small_si/di. This has been rebased after [1]

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
On Wed, Oct 20, 2021 at 4:35 PM Martin Sebor wrote: > I appreciate the heads up. I'm happy that the threader has > improved. I'm obviously not pleased that it has led to regressions > in warnings but I understand that in some cases they might be due > to limitations in the warning code. I thin

(!HELP NEEDED) Where is the doc for the format strings in gcc (for example, %q+D, ...)

2021-10-20 Thread Qing Zhao via Gcc-patches
Hi, In GCC, there are many utility routines for reporting error, warning, or information, for example: warning (0, "weak declaration of %q+D not supported", decl); warning_at (stmtloc, OPT_Wmaybe_uninitialized, "%qE may be used uninitialized", ptr)); inform (loc, "in a call to %qT declared wit

Re: [PATCH] Restore --param=max-fsm-thread-length

2021-10-20 Thread Jan-Benedict Glaw
On Wed, 2021-10-20 09:43:42 +0200, Aldy Hernandez via Gcc-patches wrote: > The removal of --param=max-fsm-thread-length is causing code > explosion. I thought that --param=max-fsm-thread-path-insns was a > better gague for path profitability than raw BB length, but it turns > out that we don't t

Re: [PATCH, v2, OpenMP 5.2, Fortran] Strictly-structured block support for OpenMP directives

2021-10-20 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 20, 2021 at 08:30:34PM +0800, Chung-Lin Tang wrote: > 2021-10-20 Chung-Lin Tang > > gcc/fortran/ChangeLog: > > * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case > together with COMP_BLOCK. > * parse.c (parse_omp_structured_block): Change return

Re: [PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-10-20 Thread Segher Boessenkool
Hi! On Wed, Oct 20, 2021 at 05:04:56PM +0800, HAO CHEN GUI wrote: > This patch disables gimple folding for float or double vec_min/max when  > fast-math is not set. It makes vec_min/max conform with the guide. > > Bootstrapped and tested on powerpc64le-linux with no regressions. Is this  > okay f

Re: [Version 2][Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers

2021-10-20 Thread Qing Zhao via Gcc-patches
> On Oct 18, 2021, at 2:26 PM, Qing Zhao via Gcc-patches > wrote: > > Hi, Jakub, > > This is the 2nd version of the patch based on your comment. > > Bootstrapped on both x86 and aarch64. Regression testings are ongoing. The regression testing was done. Looks good. Okay for committing? Tha

Re: [PATCH 6/8] tree-dynamic-object-size: Handle function parameters

2021-10-20 Thread Martin Sebor via Gcc-patches
On 10/7/21 4:14 PM, Siddhesh Poyarekar wrote: Handle either static sizes in function parameters or hints provided by __attribute__ ((access (...))) to compute sizes for objects. It's been my hope to eventually teach __builtin_object_size about attribute access but implementing it in the new bui

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" wrote: >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > wrote: >> >> On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: >> > >> > Many thanks for your explanation. I got the meaning of operands. >> > The "addpd b(%rip), %xmm0" instruction need

[PATCH] libstdc++: Implement LWG 3481 change to ranges::viewable_range

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches after a while? libstdc++-v3/ChangeLog: * include/bits/ranges_base.h (viewable_range): Adjust as per LWG 3481. * testsuite/std/ranges/adaptors/all.cc (test07): New test. --- libstdc++-v3/include/bits/

[PATCH] libstdc++: Implement LWG 3535 changes to ranges::join_view

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches after a while? libstdc++-v3/ChangeLog: * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust criteria for returning bidirectional_iterator_tag as per LWG3535. (join_view::_Iterator::_S_ite

[PATCH] libstdc++: Implement LWG 3595 changes to common_iterator

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk and branches? libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (common_iterator::__arrow_proxy): Make fully constexpr. (common_iterator::__postfix_proxy): Likewise. --- libstdc++-v3/include/bits/stl_iterator.

Re: [PATCH 6/8] tree-dynamic-object-size: Handle function parameters

2021-10-20 Thread Siddhesh Poyarekar
On 10/20/21 22:26, Martin Sebor wrote: On 10/7/21 4:14 PM, Siddhesh Poyarekar wrote: Handle either static sizes in function parameters or hints provided by __attribute__ ((access (...))) to compute sizes for objects. It's been my hope to eventually teach __builtin_object_size about attribute a

Re: [PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 6:28 AM, Jonathan Wakely via Gcc-patches wrote: The documentation on asm statements suggests asm is always a GNU extension, but it's been part of ISO C++ since the first standard. The documentation of -fno-asm is wrong for C++ as it states that it only affects typeof, but actual

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 3:27 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 1:00 AM Jeff Law wrote: On 10/18/2021 8:03 AM, Aldy Hernandez wrote: On 10/18/21 3:41 PM, Aldy Hernandez wrote: I've been experimenting with reducing the total number of threading passes, and I'd like to see if there'

Re: (!HELP NEEDED) Where is the doc for the format strings in gcc (for example, %q+D, ...)

2021-10-20 Thread Marek Polacek via Gcc-patches
On Wed, Oct 20, 2021 at 03:49:09PM +, Qing Zhao via Gcc-patches wrote: > Hi, > > In GCC, there are many utility routines for reporting error, warning, or > information, for example: > > warning (0, "weak declaration of %q+D not supported", decl); > warning_at (stmtloc, OPT_Wmaybe_uninitializ

Re: [PATCH] Attempt to resolve all incoming paths to a PHI.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 6:37 AM, Aldy Hernandez wrote: The code that threads incoming paths to a PHI is duplicating what we do generically in find_paths_to_names. This shortcoming is actually one of the reasons we aren't threading all possible paths into a PHI. For example, we give up after finding one

Re: [PATCH] Attempt to resolve all incoming paths to a PHI.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
Thanks. I'm going to wait until/if you approve the previous patch in the series before I commit: [PATCH] Try to resolve paths in threader without looking further back. ..because otherwise I'll have to test again and twiddle tests in a different order. Aldy On Wed, Oct 20, 2021 at 8:04 PM Jeff

[PATCH] libstdc++: Implement LWG 3590-3592 changes to split_view/lazy_split_view

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and 11 after a while? libstdc++-v3/ChangeLog: * include/std/ranges (lazy_split_view::base): Add forward_range constraint as per LWG 3591. (lazy_split_view::begin, lazy_split_view::end): Also check simplene

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 9:58 AM Richard Biener wrote: > > On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" > wrote: > >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > > wrote: > >> > >> On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > >> > > >> > Many thanks for your explanation. I got

Re: Old installation docs

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:10, Martin Liška wrote: > On 10/20/21 18:59, Jonathan Wakely via Gcc wrote: > > On Wed, 20 Oct 2021 at 17:40, Joseph Myers wrote: > > > >> On Wed, 20 Oct 2021, Jonathan Wakely via Gcc wrote: > >> > >>> https://gcc.gnu.org/install/ says: > >>> > >>> "There are also some ol

Re: [PATCH] libstdc++: Implement LWG 3590-3592 changes to split_view/lazy_split_view

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 19:17, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and 11 after > a while? Yes for both, thanks.

Re: [PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:44, Jeff Law wrote: > On 10/20/2021 6:28 AM, Jonathan Wakely via Gcc-patches wrote: > > The documentation on asm statements suggests asm is always a GNU > > extension, but it's been part of ISO C++ since the first standard. > > > > The documentation of -fno-asm is wrong fo

Re: [PATCH] libstdc++: Implement LWG 3481 change to ranges::viewable_range

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:01, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches > after a while? Yes for all. > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_base.h (viewable_range): Adjust as per > LWG 3481. > * testsu

Re: [PATCH] libstdc++: Implement LWG 3535 changes to ranges::join_view

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:03, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches > after a while? Yes for all. > > libstdc++-v3/ChangeLog: > > * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust > criteri

Re: [PATCH] libstdc++: Implement LWG 3595 changes to common_iterator

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:04, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and branches? I thought I'd already done this one, maybe I have it in a local Git stash. OK for all branches, thanks. > > libstdc++-v3/ChangeLog: > > * include

Re: [PATCH][WIP] Add install-dvi Makefile targets

2021-10-20 Thread Eric Gallager via Gcc-patches
On Tue, Oct 19, 2021 at 1:41 AM Thomas Koenig wrote: > > Hi Eric, > > > Hi, I have updated this patch and tested it with more languages now; I > > can now confirm that it works with ada, d, and fortran now. The only > > languages that remain untested now are go (since I'm building on > > darwin an

gcc-patches@gcc.gnu.org

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 09:42, Jonathan Wakely wrote: > > On Wed, 20 Oct 2021 at 06:48, Tim Song wrote: > > > > On Tue, Oct 19, 2021 at 9:05 AM Jonathan Wakely via Gcc-patches > > wrote: > > > > > > +constexpr bool > > > +test_copy_elision() > > > +{ > > > + return true; > > > +} > > > + > > > +st

Re: (!HELP NEEDED) Where is the doc for the format strings in gcc (for example, %q+D, ...)

2021-10-20 Thread Qing Zhao via Gcc-patches
Hi, Marek, Thanks a lot for the information. Really helpful. Qing > On Oct 20, 2021, at 12:57 PM, Marek Polacek wrote: > > On Wed, Oct 20, 2021 at 03:49:09PM +, Qing Zhao via Gcc-patches wrote: >> Hi, >> >> In GCC, there are many utility routines for reporting error, warning, or >> inf

[Ada] Fix type conversion handling in validity checks

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
In case of a checked type conversion, correctly update Typ to match the expression being validated and call Analyze_And_Resolve on the modified expression. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Insert_Valid_Check): in case of checked type conver

[Ada] Issue warning on unused quantified expression

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
It is common that a quantified expression takes the form of a conjunction or disjunction. In such a case, it is expected that all conjuncts/ disjuncts reference the quantified variable. Not doing so can be either the symptom of an error, or of a non-optimal expression, as that sub-expression could

[Ada] Get rid of Frontend_Exceptions refs

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Cleanup and remove some unused system specs and references to same. These are specs that set Frontend_Exceptions, which is no longer used in GNAT. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl: Remove references to system-vxworks-ppc.ads and system-vxw

[Ada] Small cleanup in Eval_Integer_Literal

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This removes an unreachable case in a nested predicate function as well as trims down a verbose condition. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.ads (Check_Non_Static_Context): Update documentation. * sem_eval.adb (In_Any_In

[Ada] Rewrite tests on Convention_Intrinsic

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Testing for Convention_Intrinsic is not the proper way in order to spot intrinsic subprograms, calling the predicate Is_Intrinsic_Subprogram is. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) : Replace test on Convention_Int

[Ada] Expose and use type-generic GCC atomic builtins

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This exposes the newly added support for type-generic GCC atomic builtins to the user through the System.Atomic_Primitives package, where a generic version of the existing routines is added. This also uses this support in the implementation of the System.Atomic_Operations packages. Tested on x86_

[Ada] Prevent use of an uninitialized AST field with universal integer

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
A temporary workaround needed by GNATprove after cleaning up the handling of AST fields with universal integers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Guard against equality of an uninitialized RM_Size fie

[Ada] Warning on nonmatching subtypes in fully conforming subprogram specs and bodies

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
When corresponding parameter subtypes or result subtypes denote different declarations between the declaration and body of a subprogram, but those are fully conforming, a warning will be issued indicating that the subtypes come from different declarations. In the case of anonymous access subtypes,

[Ada] tech debt: Clean up Uint fields, such as Esize

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Use No_Uint to indicate "unknown" or "not yet known" for various fields whose type is Uint, instead of using Uint_0. Otherwise Uint_0 could be ambiguous -- it could also mean "value is known, and is zero". This patch does not fix all bugs in this area, but fixes most of them, and adds assertions th

[Ada] Refine type of a counter function for record delta aggregate

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Distance of a variant in the enclosing type declaration is never negative. Code cleanup related to fix for boxes in record delta aggregates; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Variant_Depth): Refine type from Integer to

[Ada] Crash on object of protected type with defaulted access component

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects issues in the compiler whereby default initializing a protected type component of an access type containing controlled parts with an allocator causes a crash at compile-time at the point of an object declaration of such protected type. Tested on x86_64-pc-linux-gnu, committed o

  1   2   >