Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-02 Thread Alexandre Oliva via Gcc-patches
On Aug 2, 2022, Eric Gallager wrote: > On Tue, Aug 2, 2022 at 1:24 AM Alexandre Oliva wrote: >> -elif test -x as$build_exeext; then >> +elif test -x as$build_exeext \ >> + && { test "x$build_exeext" != "x" \ >> +|| test "x`grep '^# Invoke as, ld or nm from the build tree' \ >

Re: [PATCH v5] LoongArch: add movable attribute

2022-08-02 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-08-03 at 10:59 +0800, WANG Xuerui wrote: > I don't think mindlessly caring for vendor forks is always correct. In > fact I find the name "movable" too generic, and something like > "force_got_access" could be better. The problem is "what will this behave *if* we later add some code

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-02 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-08-03 at 10:55 +0800, chengl...@loongson.cn wrote: > I think there is no problem with this patch。But I have a question. The > visibility attribute works, so is it necessary to add the moveable > attribute? 1. My use of -fPIC and visibility is not in the way ELF visibility has been des

Re: [PATCH v5] LoongArch: add movable attribute

2022-08-02 Thread WANG Xuerui
On 2022/8/3 09:36, Xi Ruoyao wrote: Is it OK for trunk or I need to change something? By the way, I'm seeking a possibility to include this into 12.2. Then we leaves only 12.1 without this attribute, and we can just say "building the kernel needs GCC 12.2 or later". On Mon, 2022-08-01 at 18:07

[PATCH] lower-subreg, expr: Mitigate inefficiencies derived from "(clobber (reg X))" followed by "(set (subreg (reg X)) (...))"

2022-08-02 Thread Takayuki 'January June' Suwa via Gcc-patches
Emitting "(clobber (reg X))" before "(set (subreg (reg X)) (...))" keeps data flow consistent, but it also increases register allocation pressure and thus often creates many unwanted register-to-register moves that cannot be optimized away. It seems just analogous to partial register stall which i

Re: [PATCH v5] LoongArch: add movable attribute

2022-08-02 Thread Xi Ruoyao via Gcc-patches
Is it OK for trunk or I need to change something? By the way, I'm seeking a possibility to include this into 12.2. Then we leaves only 12.1 without this attribute, and we can just say "building the kernel needs GCC 12.2 or later". On Mon, 2022-08-01 at 18:07 +0800, Xi Ruoyao wrote: > Changes v4

Re: [PATCH] Mips: Fix the ASAN shadow offset hook for the n32 ABI

2022-08-02 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-07-30 at 14:22 +0100, Maciej W. Rozycki wrote: > On Mon, 6 Jun 2022, Dimitrije Milosevic wrote: > > >     * config/mips/mips.cc (mips_asan_shadow_offset): Reformat > >     to handle the N32 ABI. > >  That's not what the change does. > > >     * config/mips/mips.h (SUBTAR

Re: [PATCH v2] cselib: add function to check if SET is redundant [PR106187]

2022-08-02 Thread Jeff Law via Gcc-patches
On 8/2/2022 10:06 AM, Richard Earnshaw wrote: On 01/08/2022 11:38, Richard Earnshaw via Gcc-patches wrote: On 30/07/2022 20:57, Jeff Law via Gcc-patches wrote: On 7/29/2022 7:52 AM, Richard Earnshaw via Gcc-patches wrote: A SET operation that writes memory may have the same value as an

Re: [PATCH] stack-protector: Check stack canary for noreturn function

2022-08-02 Thread Jeff Law via Gcc-patches
On 8/2/2022 11:43 AM, H.J. Lu wrote: On Sat, Jul 30, 2022 at 1:30 PM Jeff Law via Gcc-patches wrote: On 7/14/2022 3:55 PM, H.J. Lu via Gcc-patches wrote: Check stack canary for noreturn function to catch stack corruption before calling noreturn function. For C++, check stack canary when

[COMMITTED] tree-optimization/106510 - Do not register edges for statements not understood.

2022-08-02 Thread Andrew MacLeod via Gcc-patches
When only interger ranges were supported, we knew all gimple COND statements were supported.  this is no longer true with float support, so gracefully do nothing when they are encountered. You can choose to remove the "unsupported relational" range-ops if you so wish.  we shouldn't need those.

[PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-02 Thread Marek Polacek via Gcc-patches
In my recent patch which enhanced -Wpessimizing-move so that it warns about class prvalues too I said that I'd like to extend it so that it warns in more contexts where a std::move can prevent copy elision, such as: T t = std::move(T()); T t(std::move(T())); T t{std::move(T())}; T t = {std

Re: [COMMITTED,gcc12] c: Fix location for _Pragma tokens [PR97498]

2022-08-02 Thread Lewis Hyatt via Gcc-patches
On Mon, Aug 01, 2022 at 07:15:48PM -0400, Lewis Hyatt wrote: > Hello- > > This backport from r13-1596 to GCC 12 has been committed after > pre-approval. This was a straightforward cherry-pick from master with no > adjustments needed. I would like to note that subsequent to r13-1596, Thomas > m

Re: [PATCH v4 2/2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-08-02 Thread Joseph Myers
On Tue, 2 Aug 2022, Tom Honermann via Gcc-patches wrote: > This patch corrects handling of UTF-8 character literals in preprocessing > directives so that they are treated as unsigned types in char8_t enabled > C++ modes (C++17 with -fchar8_t or C++20 without -fno-char8_t). Previously, > UTF-8 char

Re: [PATCH v4 1/2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-08-02 Thread Joseph Myers
On Tue, 2 Aug 2022, Tom Honermann via Gcc-patches wrote: > This patch implements the core language and compiler dependent library > changes adopted for C2X via WG14 N2653. The changes include: > - Change of type for UTF-8 string literals from array of const char to > array of const char8_t (uns

Re: [PATCH] Some additional zero-extension related optimizations in simplify-rtx.

2022-08-02 Thread Segher Boessenkool
Hi! On Fri, Jul 29, 2022 at 07:57:51AM +0100, Roger Sayle wrote: > > On Wed, Jul 27, 2022 at 02:42:25PM +0100, Roger Sayle wrote: > > > This patch implements some additional zero-extension and > > > sign-extension related optimizations in simplify-rtx.cc. The original > > > motivation comes from

[COMMITTED] Adjust testsuite/gcc.dg/tree-ssa/vrp-float-1.c

2022-08-02 Thread Aldy Hernandez via Gcc-patches
I missed the -details dump flag, plus I wasn't checking the actual folding. As a bonus I had flipped the dump file name and the count, so the test was coming out as unresolved, which I missed because I was only checking for failures and passes. Whooops. gcc/testsuite/ChangeLog: * gcc.dg/

[PATCH v4 2/2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-08-02 Thread Tom Honermann via Gcc-patches
This patch corrects handling of UTF-8 character literals in preprocessing directives so that they are treated as unsigned types in char8_t enabled C++ modes (C++17 with -fchar8_t or C++20 without -fno-char8_t). Previously, UTF-8 character literals were always treated as having the same type as ordi

[PATCH v4 1/2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-08-02 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes adopted for C2X via WG14 N2653. The changes include: - Change of type for UTF-8 string literals from array of const char to array of const char8_t (unsigned char). - A new atomic_char8_t typedef. - A new ATOMIC_CHAR8_

[PATCH v4 0/2] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++

2022-08-02 Thread Tom Honermann via Gcc-patches
This patch series provides an implementation and tests for the WG14 N2653 paper as adopted for C2X. Additionally, a fix is included for the C++ preprocessor to treat UTF-8 character literals in preprocessor directives as an unsigned type in char8_t enabled modes (in C++17 and earlier with -fchar8_

[COMMITTED] PR tree-optimization/106474 - Check equivalencies when calculating range on entry.

2022-08-02 Thread Andrew MacLeod via Gcc-patches
This PR demonstrates a case where evaluating equivalencies can assist VRP in refining values. Previous revisions did not do this due to the expense of calculating or checking for equivalencies everytime we process a use. Earlier change to range_from_dom provided modes for the cache to query,

Re: [PATCH] Fix ICE when multiple speculative targets are expanded in different ltrans unit [PR93318]

2022-08-02 Thread Martin Jambor
Hi, On Thu, Jun 23 2022, Xionghu Luo via Gcc-patches wrote: > There is a corner case for speculative multiple targets, that if speculative > edges are streamed to different ltrans units, and then edges are expanded > in one ltrans unit but the speculative property is not cleared by > resolve_specu

Re: [PATCH 2/3 v3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-02 Thread Tom Honermann via Gcc-patches
On 8/2/22 12:53 PM, Joseph Myers wrote: On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. Could you please send a complete patch series? I'm not sure what the mat

Re: [PATCH] stack-protector: Check stack canary for noreturn function

2022-08-02 Thread H.J. Lu via Gcc-patches
On Sat, Jul 30, 2022 at 1:30 PM Jeff Law via Gcc-patches wrote: > > > > On 7/14/2022 3:55 PM, H.J. Lu via Gcc-patches wrote: > > Check stack canary for noreturn function to catch stack corruption > > before calling noreturn function. For C++, check stack canary when > > throwing exception or resu

Re: [PATCH] analyzer: support for creat, dup, dup2 and dup3 [PR106298]

2022-08-02 Thread David Malcolm via Gcc-patches
On Tue, 2022-08-02 at 22:08 +0530, Mir Immad wrote: > The above patch is bootstrapped, lightly tested (on x86_64 Linux) and > approved for trunk by David. For reference, Immad sent that version to me off-list to me for review, and I approved it. He's committed it to trunk now (as r13-1936-g6a11f2

Re: [x86 PATCH] PR target/47949: Use xchg to move from/to AX_REG with -Oz.

2022-08-02 Thread Uros Bizjak via Gcc-patches
On Tue, Aug 2, 2022 at 4:59 PM Roger Sayle wrote: > > > This patch adds a peephole2 to i386.md to implement the suggestion in > PR target/47949, of using xchg instead of mov for moving values to/from > the %rax/%eax register, controlled by -Oz, as the xchg instruction is > one byte shorter than th

Re: [PATCH] btf: do not use the CHAR `encoding' bit for BTF

2022-08-02 Thread Jose E. Marchesi via Gcc-patches
> On 8/2/22 08:42, Jose E. Marchesi wrote: >> >>> On 7/26/22 14:58, Indu Bhagat wrote: On 7/22/22 4:23 AM, Jose E. Marchesi via Gcc-patches wrote: > > Contrary to CTF and our previous expectations, as per [1], turns out > that in BTF: > > 1) The `encoding' field in integ

Re: [x86 PATCH] Improved pre-reload split of double word comparison against -1.

2022-08-02 Thread Uros Bizjak via Gcc-patches
On Tue, Aug 2, 2022 at 1:31 PM Roger Sayle wrote: > > > This patch adds an extra optimization to *cmp_doubleword to improve > the code generated for comparisons against -1. Hypothetically, if a > comparison against -1 reached this splitter we'd currently generate code > that looks like: > >

Re: [x86 PATCH] Support logical shifts by (some) integer constants in TImode STV.

2022-08-02 Thread Uros Bizjak via Gcc-patches
On Tue, Aug 2, 2022 at 7:02 PM Roger Sayle wrote: > > > Hi Uros, > > > From: Uros Bizjak > > Sent: 31 July 2022 18:23 > > To: Roger Sayle > > On Fri, Jul 29, 2022 at 12:18 AM Roger Sayle > > wrote: > > > > > > This patch improves TImode STV by adding support for logical shifts by > > > integer

RE: [x86 PATCH] Support logical shifts by (some) integer constants in TImode STV.

2022-08-02 Thread Roger Sayle
Hi Uros, > From: Uros Bizjak > Sent: 31 July 2022 18:23 > To: Roger Sayle > On Fri, Jul 29, 2022 at 12:18 AM Roger Sayle > wrote: > > > > This patch improves TImode STV by adding support for logical shifts by > > integer constants that are multiples of 8. For the test case: > > > > __int128

Re: How to check -std=c89 or -std=gnu89 is set in C FE?

2022-08-02 Thread Qing Zhao via Gcc-patches
> On Aug 2, 2022, at 12:34 PM, Marek Polacek wrote: > > On Tue, Aug 02, 2022 at 04:19:56PM +, Qing Zhao via Gcc-patches wrote: >> Hi, Joseph, >> >> When -std=c89 or -std=gnu89 present in the command line, in C FE, which >> flags should be >> checked to decide it’s -std=c89 or -std=gnu89?

Re: [PATCH 2/3 v3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-02 Thread Joseph Myers
On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: > This change provides new tests for the core language and compiler > dependent library changes adopted for C2X via WG14 N2653. Could you please send a complete patch series? I'm not sure what the matching patches 1 and 3 are. Also, I do

Re: [PATCH take #2] Some additional zero-extension related optimizations in simplify-rtx.

2022-08-02 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > "Roger Sayle" writes: >> Many thanks to Segher and Richard for pointing out that my removal >> of optimizations of ABS(ABS(x)) and ABS(FFS(x)) in the original version >> of this patch was incorrect, and my assumption that these would be >> subsumed by

Re: [PATCH] analyzer: support for creat, dup, dup2 and dup3 [PR106298]

2022-08-02 Thread Mir Immad via Gcc-patches
The above patch is bootstrapped, lightly tested (on x86_64 Linux) and approved for trunk by David. On Tue, Aug 2, 2022 at 10:04 PM Immad Mir wrote: > This patch extends the state machine in sm-fd.cc to support > creat, dup, dup2 and dup3 functions. > > Lightly tested on x86_64 Linux. > > gcc/ana

Re: How to check -std=c89 or -std=gnu89 is set in C FE?

2022-08-02 Thread Marek Polacek via Gcc-patches
On Tue, Aug 02, 2022 at 04:19:56PM +, Qing Zhao via Gcc-patches wrote: > Hi, Joseph, > > When -std=c89 or -std=gnu89 present in the command line, in C FE, which flags > should be > checked to decide it’s -std=c89 or -std=gnu89? You should be able to check flag_iso and related. Marek

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Jan Hubicka via Gcc-patches
> On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > On Tue, Aug 2, 2022 at 1:45 PM Richard Biener wrote: > > > > > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > > > > > Unfortunately, this was before my time, so I don't know. > > > > > > > > That being said, thanks for tackling these issues tha

Re: [PATCH] IPA: reduce what we dump in normal mode

2022-08-02 Thread Jan Hubicka via Gcc-patches
> gcc/ChangeLog: > > * profile.cc (compute_branch_probabilities): Dump details only > if TDF_DETAILS. > * symtab.cc (symtab_node::dump_base): Do not dump pointer unless > TDF_ADDRESS is used, it makes comparison harder. > --- > gcc/profile.cc | 2 +- > gcc/symtab.cc | 3 +

How to check -std=c89 or -std=gnu89 is set in C FE?

2022-08-02 Thread Qing Zhao via Gcc-patches
Hi, Joseph, When -std=c89 or -std=gnu89 present in the command line, in C FE, which flags should be checked to decide it’s -std=c89 or -std=gnu89? Thanks a lot for your help. Qing

Re: [PATCH v2] cselib: add function to check if SET is redundant [PR106187]

2022-08-02 Thread Richard Earnshaw via Gcc-patches
On 01/08/2022 11:38, Richard Earnshaw via Gcc-patches wrote: On 30/07/2022 20:57, Jeff Law via Gcc-patches wrote: On 7/29/2022 7:52 AM, Richard Earnshaw via Gcc-patches wrote: A SET operation that writes memory may have the same value as an earlier store but if the alias sets of the new

Re: [PATCH] btf: do not use the CHAR `encoding' bit for BTF

2022-08-02 Thread David Faust via Gcc-patches
On 8/2/22 08:42, Jose E. Marchesi wrote: > >> On 7/26/22 14:58, Indu Bhagat wrote: >>> On 7/22/22 4:23 AM, Jose E. Marchesi via Gcc-patches wrote: Contrary to CTF and our previous expectations, as per [1], turns out that in BTF: 1) The `encoding' field in integer types

Re: [PATCH] btf: do not use the CHAR `encoding' bit for BTF

2022-08-02 Thread Jose E. Marchesi via Gcc-patches
> On 7/26/22 14:58, Indu Bhagat wrote: >> On 7/22/22 4:23 AM, Jose E. Marchesi via Gcc-patches wrote: >>> >>> Contrary to CTF and our previous expectations, as per [1], turns out >>> that in BTF: >>> >>> 1) The `encoding' field in integer types shall not be treated as a >>> bitmap, but as an

Re: [GCC13][Patch][V2][2/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-02 Thread Qing Zhao via Gcc-patches
Thanks a lot for your testing on Linux Kernel. Will work on the version 3 of this patch soon. Qing > On Aug 2, 2022, at 11:30 AM, Kees Cook wrote: > > On Tue, Jul 19, 2022 at 02:11:19PM +, Qing Zhao wrote: >> From a09f39ded462611286a44d9e8273de8342673ba2 Mon Sep 17 00:00:00 2001 >> From: Qi

Re: [GCC13][Patch][V2][2/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-02 Thread Kees Cook via Gcc-patches
On Tue, Jul 19, 2022 at 02:11:19PM +, Qing Zhao wrote: > From a09f39ded462611286a44d9e8273de8342673ba2 Mon Sep 17 00:00:00 2001 > From: Qing Zhao > Date: Mon, 18 Jul 2022 18:12:26 + > Subject: [PATCH 2/2] Use new flag DECL_NOT_FLEXARRAY in __builtin_object_size > [PR101836] > > Use new fl

[x86 PATCH] PR target/47949: Use xchg to move from/to AX_REG with -Oz.

2022-08-02 Thread Roger Sayle
This patch adds a peephole2 to i386.md to implement the suggestion in PR target/47949, of using xchg instead of mov for moving values to/from the %rax/%eax register, controlled by -Oz, as the xchg instruction is one byte shorter than the move it is replacing. The new test case is taken from the P

Where in C++ module streaming to handle a new bitfield added in "tree_decl_common"

2022-08-02 Thread Qing Zhao via Gcc-patches
Hi, Nathan, I am adding a new bitfield “decl_not_flexarray” in “tree_decl_common” (gcc/tree-core.h) for the new gcc feature -fstrict-flex-arrays. diff --git a/gcc/tree-core.h b/gcc/tree-core.h index ea9f281f1cc..458c6e6ceea 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -1813,7 +18

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Aldy Hernandez via Gcc-patches
Feel free to blame me for everything except the profitability code and the generic block copier. That stuff was all there before and I mostly avoided it. :-) Thanks for the work in this space. Aldy On Tue, Aug 2, 2022, 15:29 Richard Biener wrote: > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > >

Re: [GCC13][Patch][V2][1/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-02 Thread Qing Zhao via Gcc-patches
> On Aug 2, 2022, at 3:03 AM, Richard Biener wrote: > > On Mon, 1 Aug 2022, Qing Zhao wrote: > >> >> >>> On Aug 1, 2022, at 3:38 AM, Richard Biener wrote: >>> >>> On Fri, 29 Jul 2022, Qing Zhao wrote: >>> Hi, Richard, Thanks a lot for your comments and suggestions. (And so

Re: [RFA configure parts] aarch64: Make cc1 &co handle --with options

2022-08-02 Thread Richard Earnshaw via Gcc-patches
On 13/06/2022 15:33, Richard Sandiford via Gcc-patches wrote: On aarch64, --with-arch, --with-cpu and --with-tune only have an effect on the driver, so “./xgcc -B./ -O3” can give significantly different results from “./cc1 -O3”. --with-arch did have a limited effect on ./cc1 in previous relea

Re: [PATCH take #2] Some additional zero-extension related optimizations in simplify-rtx.

2022-08-02 Thread Richard Sandiford via Gcc-patches
"Roger Sayle" writes: > Many thanks to Segher and Richard for pointing out that my removal > of optimizations of ABS(ABS(x)) and ABS(FFS(x)) in the original version > of this patch was incorrect, and my assumption that these would be > subsumed by val_signbit_known_clear_p was mistaken. That the

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, 2 Aug 2022, Aldy Hernandez wrote: > On Tue, Aug 2, 2022 at 1:59 PM Richard Biener wrote: > > > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > > > On Tue, Aug 2, 2022 at 1:45 PM Richard Biener wrote: > > > > > > > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > > > > > > > Unfortunat

[PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Richard Biener via Gcc-patches
I am trying to make sense of back_threader_profitability::profitable_path_p and the first thing I notice is that we do /* Threading is profitable if the path duplicated is hot but also in a case we separate cold path from hot path and permit optimization of the hot path later. Be on t

Re: [RFA] Implement basic range operators to enable floating point VRP.

2022-08-02 Thread Aldy Hernandez via Gcc-patches
Alright, I know everyon'es pretty busy and I am blocking myself here, so I hereby approve my own patch, since I am the maintainer ;-). After all, I'd like to have 5-6 days to field any possible fallout before I disappear off to a tropical island to drink mojitos and beer. Ok, not really-- just cha

Re: Porting the Docs to Sphinx - project status

2022-08-02 Thread Martin Liška
On 1/31/22 15:06, Martin Liška wrote: > Hello. > > It's about 5 months since the last project status update: > https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577108.html > Now it's pretty clear that it won't be merged before GCC 12.1 gets released. > > So where we are? I contacted document

[PATCH] Implement streamer for frange.

2022-08-02 Thread Aldy Hernandez via Gcc-patches
This patch Allows us to export floating point ranges into the SSA name (SSA_NAME_RANGE_INFO). [Richi, in PR24021 you suggested that match.pd could use global float ranges, because it would generally not invoke ranger. This patch implements the boiler plate to save the frange globally.] [Jeff, we

[PATCH] More frange::set cleanups.

2022-08-02 Thread Aldy Hernandez via Gcc-patches
Will commit pending a final round of tests. gcc/ChangeLog: * value-range.cc (frange::set): Initialize m_props and cleanup. --- gcc/value-range.cc | 47 +++--- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/gcc/value-range.cc b/gcc/

[PATCH] Limit ranger query in ipa-prop.cc to integrals.

2022-08-02 Thread Aldy Hernandez via Gcc-patches
ipa-* still works on legacy value_range's which only support integrals. This patch limits the query to integrals, as to not get a floating point range that can't exist in an irange. Will commit pending a final round of tests. gcc/ChangeLog: * ipa-prop.cc (ipa_compute_jump_functions_for_

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-02 Thread Eric Gallager via Gcc-patches
On Tue, Aug 2, 2022 at 1:24 AM Alexandre Oliva wrote: > > Hello, Eric, > > Thanks for looking into this. > > On Aug 1, 2022, Eric Gallager via Gcc-patches > wrote: > > >> This just reassigns the value that was retrieved a couple of lines > >> above from the very same variable. > > > Oh, ok, so

Re: [COMMITTED] Make irange dependency explicit for range_of_ssa_name_with_loop_info.

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, Aug 2, 2022 at 2:11 PM Aldy Hernandez wrote: > > On Tue, Aug 2, 2022 at 2:07 PM Richard Biener > wrote: > > > > On Tue, Aug 2, 2022 at 1:41 PM Aldy Hernandez wrote: > > > > > > On Tue, Aug 2, 2022 at 9:19 AM Richard Biener > > > wrote: > > > > > > > > On Mon, Aug 1, 2022 at 8:17 AM Aldy

Re: [COMMITTED] Make irange dependency explicit for range_of_ssa_name_with_loop_info.

2022-08-02 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 2, 2022 at 2:07 PM Richard Biener wrote: > > On Tue, Aug 2, 2022 at 1:41 PM Aldy Hernandez wrote: > > > > On Tue, Aug 2, 2022 at 9:19 AM Richard Biener > > wrote: > > > > > > On Mon, Aug 1, 2022 at 8:17 AM Aldy Hernandez via Gcc-patches > > > wrote: > > > > > > > > Even though range

Re: [COMMITTED] Make irange dependency explicit for range_of_ssa_name_with_loop_info.

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, Aug 2, 2022 at 1:41 PM Aldy Hernandez wrote: > > On Tue, Aug 2, 2022 at 9:19 AM Richard Biener > wrote: > > > > On Mon, Aug 1, 2022 at 8:17 AM Aldy Hernandez via Gcc-patches > > wrote: > > > > > > Even though ranger is type agnostic, SCEV seems to only work with > > > integers. This pat

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 2, 2022 at 1:59 PM Richard Biener wrote: > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > On Tue, Aug 2, 2022 at 1:45 PM Richard Biener wrote: > > > > > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > > > > > Unfortunately, this was before my time, so I don't know. > > > > > > >

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, 2 Aug 2022, Aldy Hernandez wrote: > On Tue, Aug 2, 2022 at 1:45 PM Richard Biener wrote: > > > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > > > Unfortunately, this was before my time, so I don't know. > > > > > > That being said, thanks for tackling these issues that my work > > > tr

[PATCH take #2] Some additional zero-extension related optimizations in simplify-rtx.

2022-08-02 Thread Roger Sayle
Many thanks to Segher and Richard for pointing out that my removal of optimizations of ABS(ABS(x)) and ABS(FFS(x)) in the original version of this patch was incorrect, and my assumption that these would be subsumed by val_signbit_known_clear_p was mistaken. That the tests for ABS and FFS looked

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 2, 2022 at 1:45 PM Richard Biener wrote: > > On Tue, 2 Aug 2022, Aldy Hernandez wrote: > > > Unfortunately, this was before my time, so I don't know. > > > > That being said, thanks for tackling these issues that my work > > triggered last release. Much appreciated. > > Ah. But it wa

[PATCH] autopar TLC

2022-08-02 Thread Richard Biener via Gcc-patches
The following removes all excessive update_ssa calls from OMP expansion, thereby rewriting the atomic load and store cases to GIMPLE code generation. I don't think autopar ever exercises the atomics code though. There's not much test coverage overall so I've built SPEC 2k17 with -floop-paralleliz

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, 2 Aug 2022, Aldy Hernandez wrote: > Unfortunately, this was before my time, so I don't know. > > That being said, thanks for tackling these issues that my work > triggered last release. Much appreciated. Ah. But it was your r12-324-g69e5544210e3c0 that did - else if (n_insns > 1) +

Re: [COMMITTED] Make irange dependency explicit for range_of_ssa_name_with_loop_info.

2022-08-02 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 2, 2022 at 9:19 AM Richard Biener wrote: > > On Mon, Aug 1, 2022 at 8:17 AM Aldy Hernandez via Gcc-patches > wrote: > > > > Even though ranger is type agnostic, SCEV seems to only work with > > integers. This patch removes some FIXME notes making it explicit that > > bounds_of_var_in

[x86 PATCH] Improved pre-reload split of double word comparison against -1.

2022-08-02 Thread Roger Sayle
This patch adds an extra optimization to *cmp_doubleword to improve the code generated for comparisons against -1. Hypothetically, if a comparison against -1 reached this splitter we'd currently generate code that looks like: notq%rdx; 3 bytes notq%rax

[PATCH] tree-optimization/106497 - more forward threader can-copy-bb

2022-08-02 Thread Richard Biener via Gcc-patches
This adds EDGE_COPY_SRC_JOINER_BLOCK sources to the set of blocks we need to check we can duplicate. Bootstrapped and tested on x86-64-unknown-linux-gnu, pushed. PR tree-optimization/106497 * tree-ssa-threadupdate.cc (fwd_jt_path_registry::update_cfg): Also verify we can c

[PATCH] MIPS: improve -march=native arch detection

2022-08-02 Thread YunQiang Su
If we cannot get info from options and cpuinfo, we try to get from: 1. getauxval(AT_BASE_PLATFORM), introduced since Linux 5.7 2. _MIPS_ARCH from host compiler. This can fix the wrong loader usage on r5/r6 platform with -march=native. gcc/ChangeLog: * config/mips/driver-native.cc (ho

Re: [PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Aldy Hernandez via Gcc-patches
Unfortunately, this was before my time, so I don't know. That being said, thanks for tackling these issues that my work triggered last release. Much appreciated. Aldy On Tue, Aug 2, 2022 at 10:41 AM Richard Biener wrote: > > I am trying to make sense of back_threader_profitability::profitable_

Re: [PATCH][pushed] gcc-changelog: do not run extra deduction

2022-08-02 Thread Jonathan Wakely via Gcc-patches
On Tue, 2 Aug 2022 at 09:51, Martin Liška wrote: > > Do not deduce changelog for root ChangeLog (''). > > Small cleanup, pushed. > > @Jonathan: Please update the server hook. Done. It looks like several recent changes to the hook had not been committed to the gcc-hooks repo, so I've done that now.

Re: [PATCH] IPA: reduce what we dump in normal mode

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, Aug 2, 2022 at 10:46 AM Martin Liška wrote: OK > gcc/ChangeLog: > > * profile.cc (compute_branch_probabilities): Dump details only > if TDF_DETAILS. > * symtab.cc (symtab_node::dump_base): Do not dump pointer unless > TDF_ADDRESS is used, it makes comparis

Re: [PATCH] Some additional zero-extension related optimizations in simplify-rtx.

2022-08-02 Thread Richard Sandiford via Gcc-patches
"Roger Sayle" writes: > This patch implements some additional zero-extension and sign-extension > related optimizations in simplify-rtx.cc. The original motivation comes > from PR rtl-optimization/71775, where in comment #2 Andrew Pinski sees: > > Failed to match this instruction: > (set (reg:DI

Re: [PATCH 2/2]middle-end: Support recognition of three-way max/min.

2022-08-02 Thread Richard Biener via Gcc-patches
On Tue, Aug 2, 2022 at 10:33 AM Tamar Christina via Gcc-patches wrote: > > > > > > When this function replaces the edge it doesn't seem to update the > > > > dominators. > > > > > Since It's replacing the middle BB we then end up with an error > > > > > > > > > > gcc/testsuite/gcc.dg/tree-ssa/minm

[PATCH][pushed] gcc-changelog: do not run extra deduction

2022-08-02 Thread Martin Liška
Do not deduce changelog for root ChangeLog (''). Small cleanup, pushed. @Jonathan: Please update the server hook. Martin contrib/ChangeLog: * gcc-changelog/git_commit.py: Do not deduce changelog for root ChangeLog. --- contrib/gcc-changelog/git_commit.py | 2 +- 1 file changed, 1 ins

[PATCH] IPA: reduce what we dump in normal mode

2022-08-02 Thread Martin Liška
gcc/ChangeLog: * profile.cc (compute_branch_probabilities): Dump details only if TDF_DETAILS. * symtab.cc (symtab_node::dump_base): Do not dump pointer unless TDF_ADDRESS is used, it makes comparison harder. --- gcc/profile.cc | 2 +- gcc/symtab.cc | 3 ++- 2 file

[PATCH] Properly honor param_max_fsm_thread_path_insns in backwards threader

2022-08-02 Thread Richard Biener via Gcc-patches
I am trying to make sense of back_threader_profitability::profitable_path_p and the first thing I notice is that we do /* Threading is profitable if the path duplicated is hot but also in a case we separate cold path from hot path and permit optimization of the hot path later. Be on t

RE: [PATCH 2/2]middle-end: Support recognition of three-way max/min.

2022-08-02 Thread Tamar Christina via Gcc-patches
> > > > When this function replaces the edge it doesn't seem to update the > > > dominators. > > > > Since It's replacing the middle BB we then end up with an error > > > > > > > > gcc/testsuite/gcc.dg/tree-ssa/minmax-14.c:17:1: error: dominator > > > > of 5 should be 4, not 2 > > > > > > > > durin

Re: [PATCH] Teach VN about masked/len stores

2022-08-02 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > The following teaches VN to handle reads from .MASK_STORE and > .LEN_STORE. For this push_partial_def is extended first for > convenience so we don't have to handle the full def case in the > caller (possibly other paths can be simplified then). Also > the partial defini

[PATCH] gcov-dump: add --stable option

2022-08-02 Thread Martin Liška
The option prints TOP N counters in a stable format usage for comparison (diff). Will install the patch if there are no objections. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Martin gcc/ChangeLog: * doc/gcov-dump.texi: Document the new option. * gcov

Ping^3: [RFA configure parts] aarch64: Make cc1 &co handle --with options

2022-08-02 Thread Richard Sandiford via Gcc-patches
Ping^3 for the configure bits. Richard Sandiford via Gcc-patches writes: > On aarch64, --with-arch, --with-cpu and --with-tune only have an > effect on the driver, so “./xgcc -B./ -O3” can give significantly > different results from “./cc1 -O3”. --with-arch did have a limited > effect on ./cc1 i

Re: [PATCH] Add condition coverage profiling

2022-08-02 Thread Jørgen Kvalsvik via Gcc-patches
On 15/07/2022 15:47, Jørgen Kvalsvik wrote: > On 15/07/2022 15:31, Sebastian Huber wrote: >> On 15.07.22 13:47, Jørgen Kvalsvik via Gcc-patches wrote: >>> 2. New vocabulary for the output - decisions for, well, the decisions. It >>> also >>> writes at most one line per condition: >>> >>> decis

[PATCH] RFC: Extend SLP permutation optimisations

2022-08-02 Thread Richard Sandiford via Gcc-patches
Currently SLP tries to force permute operations "down" the graph from loads in the hope of reducing the total number of permutes needed or (in the best case) removing the need for the permutes entirely. This patch tries to extend it as follows: - Allow loads to take a different permutation from t

Re: [COMMITTED] Make irange dependency explicit for range_of_ssa_name_with_loop_info.

2022-08-02 Thread Richard Biener via Gcc-patches
On Mon, Aug 1, 2022 at 8:17 AM Aldy Hernandez via Gcc-patches wrote: > > Even though ranger is type agnostic, SCEV seems to only work with > integers. This patch removes some FIXME notes making it explicit that > bounds_of_var_in_loop only works with iranges. SCEV also handles floats, where do y

Re: [GCC13][Patch][V2][1/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-02 Thread Richard Biener via Gcc-patches
On Mon, 1 Aug 2022, Qing Zhao wrote: > > > > On Aug 1, 2022, at 3:38 AM, Richard Biener wrote: > > > > On Fri, 29 Jul 2022, Qing Zhao wrote: > > > >> Hi, Richard, > >> > >> Thanks a lot for your comments and suggestions. (And sorry for my late > >> reply). > >> > >>> On Jul 28, 2022, at 3: