Re: [RFC/RFA] [PATCH 08/12] Add a new pass for naive CRC loops detection

2024-05-28 Thread Richard Biener
On Fri, May 24, 2024 at 10:46 AM Mariam Arutunian wrote: > > This patch adds a new compiler pass aimed at identifying naive CRC > implementations, > characterized by the presence of a loop calculating a CRC (polynomial long > division). > Upon detection of a potential CRC, the pass prints an inf

Re: [PATCHv4] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Richard Biener
On Tue, May 28, 2024 at 8:36 AM HAO CHEN GUI wrote: > > Hi, > This patch adds an optab for __builtin_isfinite. The finite check can be > implemented on rs6000 by a single instruction. It needs an optab to be > expanded to the certain sequence of instructions. > > The subsequent patches will im

Re: [PATCHv4] Optab: add isnormal_optab for __builtin_isnormal

2024-05-28 Thread Richard Biener
On Tue, May 28, 2024 at 8:37 AM HAO CHEN GUI wrote: > > Hi, > This patch adds an optab for __builtin_isnormal. The normal check can be > implemented on rs6000 by a single instruction. It needs an optab to be > expanded to the certain sequence of instructions. > > The subsequent patches will im

Re: [PATCH v3] tree-ssa-pre.c/115214(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780): Return NULL_TREE when deal special cases.

2024-05-28 Thread Richard Biener
On Mon, May 27, 2024 at 9:48 AM Jiawei wrote: > > Return NULL_TREE when genop3 equal EXACT_DIV_EXPR. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652641.html > > version log v3: remove additional POLY_INT_CST check. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652795.html OK. Tha

Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Kewen.Lin
Hi, on 2024/5/27 20:54, Richard Biener wrote: > On Mon, May 27, 2024 at 11:37 AM HAO CHEN GUI wrote: >> >> Hi, >> This patch adds an optab for __builtin_isfinite. The finite check can be >> implemented on rs6000 by a single instruction. It needs an optab to be >> expanded to the certain sequenc

Re: [PATCH 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2024-05-28 Thread Tobias Burnus
Hi PA, hi all, two remarks while quickly browsing the code: Paul-Antoine Arras: + if (n->sym->ts.type != BT_DERIVED + || !n->sym->ts.u.derived->ts.is_iso_c) + { + gfc_error ("argument list item %qs in " +

Re: [PATCH v2] object lifetime instrumentation for Valgrind [PR66487]

2024-05-28 Thread Richard Biener
On Wed, May 15, 2024 at 12:59 PM Alexander Monakov wrote: > > > Hello, > > I'd like to ask if anyone has any new thoughts on this patch. > > Let me also point out that valgrind/memcheck.h is permissively > licensed (BSD-style, rest of Valgrind is GPLv2), with the intention > to allow importing int

Re: [PATCH v9 2/5] Convert references with "counted_by" attributes to/from .ACCESS_WITH_SIZE.

2024-05-28 Thread Richard Biener
On Fri, Apr 12, 2024 at 3:54 PM Qing Zhao wrote: > > Including the following changes: > * The definition of the new internal function .ACCESS_WITH_SIZE > in internal-fn.def. > * C FE converts every reference to a FAM with a "counted_by" attribute > to a call to the internal function .ACCESS_WI

Re: [PATCH v9 3/5] Use the .ACCESS_WITH_SIZE in builtin object size.

2024-05-28 Thread Richard Biener
On Fri, Apr 12, 2024 at 3:54 PM Qing Zhao wrote: > I have no comments here, if Siddesh is OK with this I approve. > gcc/ChangeLog: > > * tree-object-size.cc (access_with_size_object_size): New function. > (call_object_size): Call the new function. > > gcc/testsuite/ChangeLog: > >

Re: [PATCH v9 5/5] Add the 6th argument to .ACCESS_WITH_SIZE

2024-05-28 Thread Richard Biener
On Fri, Apr 12, 2024 at 3:55 PM Qing Zhao wrote: > > to carry the TYPE of the flexible array. > > Such information is needed during tree-object-size.cc. > > We cannot use the result type or the type of the 1st argument > of the routine .ACCESS_WITH_SIZE to decide the element type > of the original

[PATCH] i386: Optimize EQ/NE comparison between avx512 kmask and -1.

2024-05-28 Thread Hu, Lin1
Hi all, This patch aims to acheive EQ/NE comparison between avx512 kmask and -1 by using kxortest with checking CF. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,-m64}. Ok for trunk? BRs, Lin gcc/ChangeLog: PR target/113609 * config/i386/sse.md (*kortest_cmp_se

[PATCH] Fix SLP reduction neutral op value for pointer reductions

2024-05-28 Thread Richard Biener
When the neutral op is the initial value we might need to convert it from pointer to integer. Bootstrapped and tested no x86_64-unknown-linux-gnu, pushed. This shows with the SLP single-lane reduction discovery. * tree-vect-loop.cc (get_initial_defs_for_reduction): Convert neutra

[PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-05-28 Thread pan2 . li
From: Pan Li This patch would like to add the middle-end presentation for the saturation sub. Aka set the result of add to the min when downflow. It will take the pattern similar as below. SAT_SUB (x, y) => (x - y) & (-(TYPE)(x >= y)); For example for uint8_t, we have * SAT_SUB (255, 0) =>

Re: [PATCH] Match: optimize `a == CST & unary(a)` [PR111487]

2024-05-28 Thread Richard Biener
On Mon, May 13, 2024 at 5:25 PM Andrew Pinski wrote: > > This is an expansion of the optimize `a == CST & a` > to handle more than just casts. It adds optimization > for unary. > The patch for binary operators will come later. > > Bootstrapped and tested on x86_64-linux-gnu with no regressions. >

Re: [PATCH] libstdc++: Fix up 19_diagnostics/stacktrace/hash.cc on 13 branch

2024-05-28 Thread Jonathan Wakely
On Mon, 27 May 2024 at 09:26, Jakub Jelinek wrote: > > Hi! > > The r13-8207-g17acf9fbeb10d7adad commit changed some tests to use > -lstdc++exp instead of -lstdc++_libbacktrace, but it didn't change > the 19_diagnostics/stacktrace/hash.cc test, presumably because > when it was added on the trunk, i

[pushed] wwwdocs: news: Move www.velox-project.eu to https

2024-05-28 Thread Gerald Pfeifer
Not sure why these all are popping up recently... Anyway: pushed. Gerald --- htdocs/news.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/news.html b/htdocs/news.html index ca3e7dc5..b7a6f479 100644 --- a/htdocs/news.html +++ b/htdocs/news.html @@ -512,7 +512,7 @@

Arm branding (was: [PATCH] doc: Document arm_v8_1m_main_cde_mve_fp)

2024-05-28 Thread Gerald Pfeifer
On Mon, 10 Jul 2023, Kyrylo Tkachov via Gcc-patches wrote: > I know the GCC source is inconsistent on this but the proper branding > these days is "ARM" -> "Arm" and "ARMv8.1-M" -> "Armv8.1-M". Arm, Red Hat, and SUSE - those three are spelt incorrectly by third parties more often than not, it se

Re: [PATCH] vect: Support multiple lane-reducing operations for loop reduction [PR114440]

2024-05-28 Thread Richard Biener
On Fri, May 24, 2024 at 11:27 AM Feng Xue OS wrote: > > Hi, > > The patch was updated with the newest trunk, and also contained some minor > changes. > > I am working on another new feature which is meant to support pattern > recognition > of lane-reducing operations in affine closure originated

Re: [PATCH] vect: Use vect representative statement instead of original in patch recog [PR115060]

2024-05-28 Thread Richard Biener
On Sat, May 25, 2024 at 4:45 PM Feng Xue OS wrote: > > Some utility functions (such as vect_look_through_possible_promotion) that are > to find out certain kind of direct or indirect definition SSA for a value, may > return the original one of the SSA, not its pattern representative SSA, even > pa

RE: [PATCH 2/4]AArch64: add new tuning param and attribute for enabling conditional early clobber

2024-05-28 Thread Tamar Christina
> -Original Message- > From: Tamar Christina > Sent: Wednesday, May 22, 2024 10:29 AM > To: Richard Sandiford > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; ktkac...@gcc.gnu.org > Subject: RE: [PATCH 2/4]AArch64: add new tuning param and attribute for > enab

RE: [PATCH 3/4]AArch64: add new alternative with early clobber to patterns

2024-05-28 Thread Tamar Christina
> -Original Message- > From: Richard Sandiford > Sent: Wednesday, May 22, 2024 12:24 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; ktkac...@gcc.gnu.org > Subject: Re: [PATCH 3/4]AArch64: add new alternative with early clobber to >

Re: [PATCH] vect: Unify bbs in loop_vec_info and bb_vec_info

2024-05-28 Thread Richard Biener
On Sat, May 25, 2024 at 4:54 PM Feng Xue OS wrote: > > Both derived classes ( loop_vec_info/bb_vec_info) have their own "bbs" > field, which have exactly same purpose of recording all basic blocks > inside the corresponding vect region, while the fields are composed by > different data type, one i

Re: [PATCH v2] object lifetime instrumentation for Valgrind [PR66487]

2024-05-28 Thread Alexander Monakov
On Tue, 28 May 2024, Richard Biener wrote: > On Wed, May 15, 2024 at 12:59 PM Alexander Monakov wrote: > > > > > > Hello, > > > > I'd like to ask if anyone has any new thoughts on this patch. > > > > Let me also point out that valgrind/memcheck.h is permissively > > licensed (BSD-style, rest of

[PATCH] tree-optimization/115254 - don't account single-lane SLP against discovery limit

2024-05-28 Thread Richard Biener
The following avoids accounting single-lane SLP to the discovery limit. As the two testcases show this makes discovery fail, unfortunately even not the same across targets. The following should fix two FAILs for GCN as a side-effect. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

Re: [PATCH] Fix -Wstringop-overflow warning in 23_containers/vector/types/1.cc

2024-05-28 Thread Jonathan Wakely
On 27/05/24 22:07 +0200, François Dumont wrote: In C++98 this test fails with: Excess errors: /home/fdumont/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:452: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing between 2 and 92233720368

Re: [PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-28 Thread Jonathan Wakely
On Mon, 27 May 2024 at 05:37, François Dumont wrote: > > Here is a new version working also in C++98. Can we use a different solution that doesn't involve an explicit template argument list for that __uninitialized_fill_n_a call? -+this->_M_impl._M_finish = std::__uninitialized_fill_n_a

[PATCH V2] Reduce cost of MEM (A + imm).

2024-05-28 Thread liuhongt
> IMO, there is no need for CONST_INT_P condition, we should also allow > symbol_ref, label_ref and const (all allowed by > x86_64_immediate_operand predicate), these all decay to an immediate > value. Changed. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk. For MEM, rtx_

[wwwdocs][patch] gcc-15/changes.html: Fortran - mention F2023 logical-kind additions

2024-05-28 Thread Tobias Burnus
Let's make https://gcc.gnu.org/gcc-15/changes.html a bit more useful … While there were several useful Fortran commits already, only one seems to be about a new feature. Thus, document selected_logical_kind and the ISO_FORTRAN_ENV additions. Comments or suggestions before I commit it? Tobias

Re: [PATCH v2] object lifetime instrumentation for Valgrind [PR66487]

2024-05-28 Thread Richard Biener
On Tue, May 28, 2024 at 11:46 AM Alexander Monakov wrote: > > > On Tue, 28 May 2024, Richard Biener wrote: > > > On Wed, May 15, 2024 at 12:59 PM Alexander Monakov > > wrote: > > > > > > > > > Hello, > > > > > > I'd like to ask if anyone has any new thoughts on this patch. > > > > > > Let me als

Re: [PATCH v2] object lifetime instrumentation for Valgrind [PR66487]

2024-05-28 Thread Alexander Monakov
On Tue, 28 May 2024, Richard Biener wrote: > > I am a bit confused what you mean by "cheaper". Could it be that we are not > > on the same page regarding the machine code behind client requests? > > Probably "cheaper" in register usage. But it doesn't matter considering that execution under Va

Re: [PATCH V2] Reduce cost of MEM (A + imm).

2024-05-28 Thread Uros Bizjak
On Tue, May 28, 2024 at 12:48 PM liuhongt wrote: > > > IMO, there is no need for CONST_INT_P condition, we should also allow > > symbol_ref, label_ref and const (all allowed by > > x86_64_immediate_operand predicate), these all decay to an immediate > > value. > > Changed. > > Bootstrapped and reg

Re: [PATCH v2] object lifetime instrumentation for Valgrind [PR66487]

2024-05-28 Thread Richard Biener
On Tue, May 28, 2024 at 1:38 PM Alexander Monakov wrote: > > > On Tue, 28 May 2024, Richard Biener wrote: > > > > I am a bit confused what you mean by "cheaper". Could it be that we are > > > not > > > on the same page regarding the machine code behind client requests? > > > > Probably "cheaper"

Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Richard Biener
On Tue, May 28, 2024 at 9:09 AM Kewen.Lin wrote: > > Hi, > > on 2024/5/27 20:54, Richard Biener wrote: > > On Mon, May 27, 2024 at 11:37 AM HAO CHEN GUI wrote: > >> > >> Hi, > >> This patch adds an optab for __builtin_isfinite. The finite check can be > >> implemented on rs6000 by a single inst

[Patch, PR Fortran/90069] Polymorphic Return Type Memory Leak Without Intermediate Variable

2024-05-28 Thread Andre Vehreschild
Hi all, the attached patch fixes a memory leak with unlimited polymorphic return types. The leak occurred, because an expression with side-effects was evaluated twice. I have substituted the check for non-variable expressions followed by creating a SAVE_EXPR with checking for trees with side effec

[PATCH] Avoid pessimistic constraints for asm memory constraints

2024-05-28 Thread Richard Biener
We process asm memory input/outputs with constraints to ESCAPED but for this temporarily build an ADDR_EXPR. The issue is that the used build_fold_addr_expr ends up wrapping the ADDR_EXPR in a conversion which ends up producing &ANYTHING constraints which is quite bad. The following uses get_cons

[PATCH] tree-optimization/115252 - enhance peeling for gaps avoidance

2024-05-28 Thread Richard Biener
Code generation for contiguous load vectorization can already deal with generalized avoidance of loading from a gap. The following extends detection of peeling for gaps requirement with that, gets rid of the old special casing of a half load and makes sure when we do access the gap we have peeling

Re: [wwwdocs][patch] gcc-15/changes.html: Fortran - mention F2023 logical-kind additions

2024-05-28 Thread FX Coudert
Seems good, thanks Tobias! FX

[PATCH] tree-optimization/115236 - more points-to *ANYTHING = x fixes

2024-05-28 Thread Richard Biener
The stored-to ANYTHING handling has more holes, uncovered by treating volatile accesses as ANYTHING. We fail to properly build the pred and succ graphs, in particular we may not elide direct nodes from receiving from STOREDANYTHING. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

Re: [committed v2 0/2] VAX: Fix issues with FP format option documentation

2024-05-28 Thread Mark Wielaard
Hi Maciej (Hi David, added to CC), On Mon, 2024-05-27 at 05:19 +0100, Maciej W. Rozycki wrote: > As reported in PR target/79646 and fixed by a change proposed by Abe we > have a couple of issues with the descriptions of the VAX floating-point > format options in the option definition file. Add

Re: [PATCH] libstdc++: Avoid MMX return types from __builtin_shufflevector

2024-05-28 Thread Jonathan Wakely
On Wed, 15 May 2024 at 20:50, Matthias Kretz wrote: > > Tested on aarch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, > x86_64-linux-gnu (-m64, -m32, -mx32), and arm-linux-gnueabi > > OK for trunk? OK > And when backporting, should I squash it with the commit that > introduced the reg

[PATCH] target/115254 - fix gcc.dg/vect/vect-gather-4.c dump scanning

2024-05-28 Thread Richard Biener
The dump scanning is supposed to check that we do not merge two sligtly different gathers into one SLP node but since we now SLP the store scanning for "ectorizing stmts using SLP" is no longer good. Instead the following makes us look for "stmt 1 .* = .MASK" which would be how the second lane of

Re: [PATCH] vect: Use vect representative statement instead of original in patch recog [PR115060]

2024-05-28 Thread Feng Xue OS
Changed as the comments. Thanks, Feng From: Richard Biener Sent: Tuesday, May 28, 2024 5:34 PM To: Feng Xue OS Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] vect: Use vect representative statement instead of original in patch recog [PR115060] On Sat,

[PATCH] libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641]

2024-05-28 Thread Rainer Orth
Several of the 19_diagnostics/stacktrace tests FAIL on Solaris/SPARC (32 and 64-bit), Solaris/x86 (32-bit only), and several other targets: FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++23 execution test FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++26 execution test FAIL: 19_diagn

Re: [PATCH] libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641]

2024-05-28 Thread Jonathan Wakely
On Tue, 28 May 2024 at 15:25, Rainer Orth wrote: > > Several of the 19_diagnostics/stacktrace tests FAIL on Solaris/SPARC (32 > and 64-bit), Solaris/x86 (32-bit only), and several other targets: > > FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++23 execution test > FAIL: 19_diagnostics/stac

[PATCH] regenerate-opt-urls.py: fix transposed values for "vax" and "v850"

2024-05-28 Thread David Malcolm
> On Tue, 2024-05-28 at 15:03 +0200, Mark Wielaard wrote: > Hi Maciej (Hi David, added to CC), >On Mon, 2024-05-27 at 05:19 +0100, Maciej W. Rozycki wrote: > > As reported in PR target/79646 and fixed by a change proposed by > > Abe we > > have a couple of issues with the descriptions of the VAX

[PATCH] MIPS/testsuite: Fix bseli.b fail in msa-builtins.c

2024-05-28 Thread YunQiang Su
commit 05daf617ea22e1d818295ed2d037456937e23530 Author: Jeff Law Date: Sat May 25 12:39:05 2024 -0600 [committed] [v2] More logical op simplifications in simplify-rtx.cc does some simplifications, and then `bseli.b $w1,$w0,255` is found that it is same with `or.v $w1,$w0,$w1`. So there wil

Re: [PATCH] vect: Unify bbs in loop_vec_info and bb_vec_info

2024-05-28 Thread Feng Xue OS
Because bbs of loop_vec_info need to be allocated via old-fashion XCNEWVEC, in order to receive result from dfs_enumerate_from(), so have to make bb_vec_info align with loop_vec_info, use basic_block * instead of vec. Another reason is that some loop vect related codes assume that bbs is a pointer,

Re: [PATCH] attribs: Fix and refactor diag_attr_exclusions

2024-05-28 Thread Richard Sandiford
Andrew Carlotti writes: > The existing implementation of this function was convoluted, and had > multiple control flow errors that became apparent to me while reading > the code: > > 1. The initial early return only checked the properties of the first > exclusion in the list, when these properties

[pushed] Fix bootstrap on AIX by adding c-family/c-type-mismatch.cc [PR115167]

2024-05-28 Thread David Malcolm
PR bootstrap/115167 reports a bootstrap failure on AIX triggered by r15-636-g770657d02c986c whilst building f951 in stage 2, due to the linker not being able to find symbols for: vtable for range_label_for_type_mismatch range_label_for_type_mismatch::get_text(unsigned int) const The only user

[pushed] diagnostics: disable localization of events in selftest paths [PR115203]

2024-05-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-866-g2dbb1c124c1e58. gcc/ChangeLog: PR analyzer/115203 * diagnostic-path.h (simple_diagnostic_path::disable_event_localization): New. (simple_diagnostic_path::m_localize_events): N

PING: Re: [PATCH] selftest: invoke "diff" when ASSERT_STREQ fails

2024-05-28 Thread David Malcolm
Ping. This patch has actually been *very* helpful to me when debugging selftest failures involving ASSERT_STREQ. Thanks Dave On Fri, 2024-05-17 at 15:51 -0400, David Malcolm wrote: > Currently when ASSERT_STREQ or ASSERT_STREQ_AT fail we print > both strings to stderr.  However it can be hard to

[Patch] testsuite/*/gomp: Remove 'dg-prune-output "not supported yet"'

2024-05-28 Thread Tobias Burnus
Improve test coverage by removing 'prune-output' given that the features are implemented in the meanwhile. Comments, suggestions? Otherwise I will commit the patch as obvious. Tobias testsuite/*/gomp: Remove 'dg-prune-output "not supported yet"' gcc/testsuite/ChangeLog: * c-c++-common/gomp/l

Re: [Patch] testsuite/*/gomp: Remove 'dg-prune-output "not supported yet"'

2024-05-28 Thread Jakub Jelinek
On Tue, May 28, 2024 at 07:43:00PM +0200, Tobias Burnus wrote: > Improve test coverage by removing 'prune-output' given that the features are > implemented in the meanwhile. > > Comments, suggestions? Otherwise I will commit the patch as obvious. > > Tobias > testsuite/*/gomp: Remove 'dg-prune-o

[PATCH] MIPS16: Mark $2/$3 as clobbered if GP is used

2024-05-28 Thread YunQiang Su
PR Target/84790. The gp init sequence li $2,%hi(_gp_disp) addiu $3,$pc,%lo(_gp_disp) sll $2,16 addu$2,$3 is generated directly in `mips_output_function_prologue`, and does not appear in the RTL. So the IRA/IPA passes are not aware that $2/$3 have been

Re: [PATCH v2 1/2] driver: Use -as/ld/objcopy as final fallback instead of native ones for cross

2024-05-28 Thread YunQiang Su
YunQiang Su 于2024年5月22日周三 17:54写道: > > If `find_a_program` cannot find `as/ld/objcopy` and we are a cross toolchain, > the final fallback is `as/ld` of system. In fact, we can have a try with > -as/ld/objcopy before fallback to native as/ld/objcopy. > > This patch is derivatived from Debian's pat

[COMMITTED] Strlen pass should set current range query.

2024-05-28 Thread Andrew MacLeod
Thanks. Committed with the change to the testcase. Bootstraps on x86_64-pc-linux-gnu with no regressions. Andrew On 5/28/24 02:49, Richard Biener wrote: On Tue, May 28, 2024 at 1:24 AM Andrew MacLeod wrote: The strlen pass currently has a local ranger instance, but when it invokes SCEV or

[COMMITTED] tree-optimization/115221 - Do not invoke SCEV if it will use a different range query.

2024-05-28 Thread Andrew MacLeod
The original patch causing the PR made  ranger's cache re-entrant to enable SCEV to use the current range_query when called from within ranger.. SCEV uses the currently active range query (via get_range_query()) for picking up values.  fold_using_range is the general purpose stmt folder many 

Re: [PATCH] c++/modules: Prevent revealing a using-decl affecting cached overloads [PR114867]

2024-05-28 Thread Jason Merrill
On 5/26/24 09:01, Nathaniel Shead wrote: Is this approach OK? Alternatively I suppose we could do a deep copy of the overload list when this occurs to ensure we don't affect existing referents, would that be preferable? This strategy makes sense, but I have other concerns: Bootstrapped and r

Re: [PATCH] c++: canonicity of fn types w/ instantiated eh specs [PR115223]

2024-05-28 Thread Jason Merrill
On 5/25/24 19:18, Patrick Palka wrote: Bootstrap and regtest on x86_64-pc-linux-gnu in progress, does this look OK for trunk if successful? OK. -- >8 -- When propagating structural equality in build_cp_fntype_variant, we should consider structural equality of the exception-less variant, not

Re: [PATCH] c++: extend -Wself-move for mem-init-list [PR109396]

2024-05-28 Thread Marek Polacek
On Fri, May 24, 2024 at 10:15:56AM -0400, Jason Merrill wrote: > On 5/23/24 19:57, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > We already warn for: > > > >x = std::move (x); > > > > which triggers: > > > >warning: moving 'x'

Re: [PATCH v3 #1/2] enable adjustment of return_pc debug attrs

2024-05-28 Thread Jason Merrill
On 5/25/24 08:12, Alexandre Oliva wrote: On Apr 27, 2023, Alexandre Oliva wrote: On Apr 14, 2023, Alexandre Oliva wrote: On Mar 23, 2023, Alexandre Oliva wrote: This patch introduces infrastructure for targets to add an offset to the label issued after the call_insn to set the call_return_p

[PATCH v4] RISC-V: Introduce -mvector-strict-align.

2024-05-28 Thread Robin Dapp
Hi, this patch disables movmisalign by default and introduces the -mno-vector-strict-align option to override it and re-enable movmisalign. For now, generic-ooo is the only uarch that supports misaligned vector access. The patch also adds a check_effective_target_riscv_v_misalign_ok to the tests

[patch] OpenMP: Add -fopenmp-force-usm mode

2024-05-28 Thread Tobias Burnus
-fopenmp-force-usm can be useful for some badly written code. Explicity using 'omp requires' makes more sense but still. It might also make sense for testing purpose. Unfortunately, I did not see a simple way of testing it. When trying it manually, I looked at the 'a.xamdgcn-amdhsa.c' -save-te

Re: [Patch, PR Fortran/90069] Polymorphic Return Type Memory Leak Without Intermediate Variable

2024-05-28 Thread Harald Anlauf
Hi Andre, On 5/28/24 14:10, Andre Vehreschild wrote: Hi all, the attached patch fixes a memory leak with unlimited polymorphic return types. The leak occurred, because an expression with side-effects was evaluated twice. I have substituted the check for non-variable expressions followed by crea

Re: [PATCH] regenerate-opt-urls.py: fix transposed values for "vax" and "v850"

2024-05-28 Thread David Malcolm
On Tue, 2024-05-28 at 11:41 -0400, David Malcolm wrote: > > On Tue, 2024-05-28 at 15:03 +0200, Mark Wielaard wrote: > > Hi Maciej (Hi David, added to CC), > > > On Mon, 2024-05-27 at 05:19 +0100, Maciej W. Rozycki wrote: > > >  As reported in PR target/79646 and fixed by a change proposed by > > >

[pushed 2/3] libcpp: move label_text to its own header

2024-05-28 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-874-g9bda2c4c81b668. libcpp/ChangeLog: * Makefile.in (TAGS_SOURCES): Add include/label-text.h. * include/label-text.h: New file. * include/rich-location.h:

[pushed 3/3] diagnostics: consolidate global state in diagnostic-color.cc

2024-05-28 Thread David Malcolm
Simplify the table of default colors, avoiding the need to manually add the strlen of each entry. Consolidate the global state in diagnostic-color.cc into a g_color_dict, adding selftests for the new class diagnostic_color_dict. No functional change intended. Successfully bootstrapped & regrteste

[pushed 1/3] selftests: split out make_fndecl from selftest.h to its own header

2024-05-28 Thread David Malcolm
Avoid selftest.h requiring the "tree" type. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-873-gfb7a943ead689e. gcc/analyzer/ChangeLog: * region-model.cc: Include "selftest-tree.h". gcc/ChangeLog: * function-te

Re: [PATCH 2/4] resource.cc: Replace calls to find_basic_block with cfgrtl BLOCK_FOR_INSN

2024-05-28 Thread Hans-Peter Nilsson
> Date: Mon, 27 May 2024 12:57:53 -0600 > From: Jeff Law > > * resource.cc: Include cfgrtl.h. Use BLOCK_FOR_INSN (insn)->index > > instead of calling find_basic_block (insn). Assert for not -1. > > (find_basic_block): Remove function. > > (init_resource_info): Call compute_bb_fo

Re: [PATCH v3 #1/2] enable adjustment of return_pc debug attrs

2024-05-28 Thread Segher Boessenkool
On Sat, May 25, 2024 at 09:12:05AM -0300, Alexandre Oliva wrote: You sent multiple patch series in one thread, and multiple versions of the same series even. This is very hard to even *read*, let alone work with. Please don't. Segher

Re: [PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-28 Thread François Dumont
I can indeed restore _M_initialize_dispatch as it was before. It was not fixing my initial problem. I simply kept the code simplification.     libstdc++: Use RAII to replace try/catch blocks     Move _Guard into std::vector declaration and use it to guard all calls to     vector _M_allocate.

[committed] i386: Improve access to _Atomic DImode location via XMM regs for SSE4.1 x86_32 targets

2024-05-28 Thread Uros Bizjak
Use MOVD/PEXTRD and MOVD/PINSRD insn sequences to move DImode value between XMM and GPR register sets for SSE4.1 x86_32 targets in order to avoid spilling the value to stack. The load from _Atomic location a improves from: movqa, %xmm0 movq%xmm0, (%esp) movl(%esp), %eax

Re: [RFC/PATCH] Replace {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE with new hook

2024-05-28 Thread Joseph Myers
On Fri, 24 May 2024, Kewen.Lin wrote: > Following your suggestion and comments, I made this patch > for mode_for_floating_type first, considering this touches > a few FE and port specific code, I think I have to split > it into a patch series. Before making that, I'd like to > ensure this meets w

Re: [PATCH v9 2/5] Convert references with "counted_by" attributes to/from .ACCESS_WITH_SIZE.

2024-05-28 Thread Qing Zhao
Thank you for the comments. See my answers below: Joseph, please see the last question, I need your help on it. Thanks a lot for the help. Qing > On May 28, 2024, at 03:38, Richard Biener wrote: > > On Fri, Apr 12, 2024 at 3:54 PM Qing Zhao wrote: >> >> Including the following changes: >> *

Re: [PATCH v9 3/5] Use the .ACCESS_WITH_SIZE in builtin object size.

2024-05-28 Thread Qing Zhao
> On May 28, 2024, at 03:39, Richard Biener wrote: > > On Fri, Apr 12, 2024 at 3:54 PM Qing Zhao wrote: >> > > I have no comments here, if Siddesh is OK with this I approve. thanks. Qing > >> gcc/ChangeLog: >> >>* tree-object-size.cc (access_with_size_object_size): New function.

Re: [PATCH v9 5/5] Add the 6th argument to .ACCESS_WITH_SIZE

2024-05-28 Thread Qing Zhao
> On May 28, 2024, at 03:43, Richard Biener wrote: > > On Fri, Apr 12, 2024 at 3:55 PM Qing Zhao wrote: >> >> to carry the TYPE of the flexible array. >> >> Such information is needed during tree-object-size.cc. >> >> We cannot use the result type or the type of the 1st argument >> of the r

Re: [PATCH v3 #1/2] [rs6000] adjust return_pc debug attrs

2024-05-28 Thread Segher Boessenkool
On Sat, May 25, 2024 at 09:13:12AM -0300, Alexandre Oliva wrote: > Some of the rs6000 call patterns, on some ABIs, issue multiple opcodes > out of a single call insn, but the call (bl) or jump (b) is not always > the last opcode in the sequence. > This does not seem to be a problem for exception h

Re: [PATCH v2 1/2] driver: Use -as/ld/objcopy as final fallback instead of native ones for cross

2024-05-28 Thread Richard Sandiford
YunQiang Su writes: > If `find_a_program` cannot find `as/ld/objcopy` and we are a cross toolchain, > the final fallback is `as/ld` of system. In fact, we can have a try with > -as/ld/objcopy before fallback to native as/ld/objcopy. > > This patch is derivatived from Debian's patch: > gcc-searc

Re: [C PATCH, v2]: allow aliasing of compatible types derived from enumeral types [PR115157]

2024-05-28 Thread Joseph Myers
On Fri, 24 May 2024, Martin Uecker wrote: > This is another version of this patch with two changes: > > - I added a fix (with test) for PR 115177 which is just the same > issue for hardbools which are internally implemented as enums. > > - I fixed the golang issue. Since the addition of the main

Re: [C23 PATCH, v2] fix aliasing for structures/unions with incomplete types

2024-05-28 Thread Joseph Myers
On Sun, 26 May 2024, Martin Uecker wrote: > This is the patch I sent previously, but I tried to improve the > description and added a long comment. This patch is needed so > that we do not have to update TYPE_CANONICAL of structures / unions > when a tagged type is completed that is (recursively)

Re: [C23 PATCH]: allow aliasing for types derived from structs with variable size

2024-05-28 Thread Joseph Myers
On Sun, 26 May 2024, Martin Uecker wrote: > +/* Helper function for comptypes. For two compatible types, return 1 > + if they pass consistency checks. In particular we test that > + TYPE_CANONICAL ist set correctly, i.e. the two types can alias. */ s/ist/is/. OK with that fix. -- Joseph

Re: [PATCH v3] tree-ssa-pre.c/115214(ICE in find_or_generate_expression, at tree-ssa-pre.c:2780): Return NULL_TREE when deal special cases.

2024-05-28 Thread Richard Sandiford
Richard Biener writes: > On Mon, May 27, 2024 at 9:48 AM Jiawei wrote: >> >> Return NULL_TREE when genop3 equal EXACT_DIV_EXPR. >> https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652641.html >> >> version log v3: remove additional POLY_INT_CST check. >> https://gcc.gnu.org/pipermail/gcc-patche

Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Richard Sandiford
HAO CHEN GUI writes: > Hi, > This patch adds an optab for __builtin_isfinite. The finite check can be > implemented on rs6000 by a single instruction. It needs an optab to be > expanded to the certain sequence of instructions. > > The subsequent patches will implement the expand on rs6000. > >

[COMMITTED] More tweaks from gimple_outgoing_range changes.

2024-05-28 Thread Andrew MacLeod
The dom_ranger class used for fast vrp no longer needs it's own local gimple_outgoing_range object as it is now always available from the range_query parent class. The builtin_unreachable code for adjusting globals and removing the builtin calls during the final VRP pass can now function with

[PATCH 0/2] RISC-V: Add -m(no-)autovec-segment option

2024-05-28 Thread Patrick O'Neill
Rebased and combined these two patches into a series for precommit-CI to properly test. Edwin Lu (1): RISC-V: Fix testcases renamed test flag options Greg McGary (1): RISC-V: add option -m(no-)autovec-segment gcc/config/riscv/autovec.md | 4 +- gcc/config/riscv/riscv-opts

[PATCH 1/2] RISC-V: add option -m(no-)autovec-segment

2024-05-28 Thread Patrick O'Neill
From: Greg McGary Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments. gcc/ChangeLog: * config/riscv/autovec.md (vec_mask_len_load_lanes, vec_mask_len_store_lanes):

[PATCH 2/2] RISC-V: Fix testcases renamed test flag options

2024-05-28 Thread Patrick O'Neill
From: Edwin Lu Some testcases still had --param=riscv-autovec-preference=_, update to use -mrvv-vector-bits=_. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/no-segment.c: Update dejagnu flags * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_noseg_run-1.c: Ditto

Re: [PATCH 1/2] RISC-V: add option -m(no-)autovec-segment

2024-05-28 Thread Vineet Gupta
On 5/28/24 14:55, Patrick O'Neill wrote: > From: Greg McGary > > Add option -m(no-)autovec-segment to enable/disable autovectorizer > from emitting vector segment load/store instructions. This is useful for > performance experiments. > > gcc/ChangeLog: > * config/riscv/autovec.md (vec_mas

Re: [PATCH 2/2] RISC-V: Fix testcases renamed test flag options

2024-05-28 Thread Vineet Gupta
On 5/28/24 14:55, Patrick O'Neill wrote: > From: Edwin Lu > > Some testcases still had --param=riscv-autovec-preference=_, > update to use -mrvv-vector-bits=_. And this can be squashed with prev one, maybe added Tested-by Edwin. Thx, -Vineet

Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Segher Boessenkool
On Tue, May 28, 2024 at 02:09:50PM +0200, Richard Biener wrote: > On Tue, May 28, 2024 at 9:09 AM Kewen.Lin wrote: > > As Haochen's previous reply, I think there are three cases: > > 1) no optab defined, fold in a generic way; > > 2) optab defined, SUCC, expand as what it defines; > > 3) opt

Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Segher Boessenkool
Hi! On Mon, May 27, 2024 at 05:37:23PM +0800, HAO CHEN GUI wrote: > --- a/gcc/builtins.cc > +++ b/gcc/builtins.cc > @@ -2459,8 +2459,9 @@ interclass_mathfn_icode (tree arg, tree fndecl) >errno_set = true; builtin_optab = ilogb_optab; break; > CASE_FLT_FN (BUILT_IN_ISINF): >bui

[patch] libgomp: Enable USM for some nvptx devices

2024-05-28 Thread Tobias Burnus
While most of the nvptx systems I have access to don't have the support for CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, one has: Tesla V100-SXM2-16GB (as installed, e.g., on ORNL's Summit) does support this feature. And with that feature, unified-shared memory support doe

[PATCH v2 0/2] RISC-V: add option -m(no-)autovec-segment

2024-05-28 Thread Patrick O'Neill
Rebased to squash Edwin's fixup into Greg's patch. Split out the middle-end change and xfailed the associated testcase so the second patch can land seperately. Relying on pre-commit CI for full testing. Greg McGary (2): RISC-V: add option -m(no-)autovec-segment Prevent divide-by-zero gcc/co

[PATCH v2 2/2] Prevent divide-by-zero

2024-05-28 Thread Patrick O'Neill
From: Greg McGary gcc/ChangeLog: * gcc/tree-vect-stmts.cc (gcc/tree-vect-stmts.cc): Prevent divide-by-zero. * testsuite/gcc.target/riscv/rvv/autovec/no-segment.c: Remove xfail. --- gcc/testsuite/gcc.target/riscv/rvv/autovec/no-segment.c | 1 - gcc/tree-vect-stmts.cc

[PATCH v2 1/2] RISC-V: add option -m(no-)autovec-segment

2024-05-28 Thread Patrick O'Neill
From: Greg McGary Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments. gcc/ChangeLog: * config/riscv/autovec.md (vec_mask_len_load_lanes, vec_mask_len_store_lanes):

Re: ping: [PATCH] libcpp: Support extended characters for #pragma {push,pop}_macro [PR109704]

2024-05-28 Thread Lewis Hyatt
Hello- May I please ping this one (now for GCC 15)? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642926.html -Lewis On Sat, Feb 10, 2024 at 9:02 AM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642926.html > > May I please ping this o

Re: [PATCH v4] RISC-V: Introduce -mvector-strict-align.

2024-05-28 Thread Kito Cheng
I just created two PRs for adding those new options into riscv-toolchain-conventions, so that we could make sure it aligned with clang/LLVM community. https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/49 https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/50 On Wed,

Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread Kewen.Lin
on 2024/5/28 20:09, Richard Biener wrote: > On Tue, May 28, 2024 at 9:09 AM Kewen.Lin wrote: >> >> Hi, >> >> on 2024/5/27 20:54, Richard Biener wrote: >>> On Mon, May 27, 2024 at 11:37 AM HAO CHEN GUI wrote: Hi, This patch adds an optab for __builtin_isfinite. The finite check ca

Re: [PATCH v2 1/2] driver: Use -as/ld/objcopy as final fallback instead of native ones for cross

2024-05-28 Thread YunQiang Su
Richard Sandiford 于2024年5月29日周三 05:28写道: > > YunQiang Su writes: > > If `find_a_program` cannot find `as/ld/objcopy` and we are a cross > > toolchain, > > the final fallback is `as/ld` of system. In fact, we can have a try with > > -as/ld/objcopy before fallback to native as/ld/objcopy. > > > >

[COMMITTED] Gori_on_edge tweaks.

2024-05-28 Thread Andrew MacLeod
FAST_VRP uses a non-ranger gori_on_edge routine to calculate the full set of SSA ranges that can be calculated on an edge.  It allows an optional  outgoing_edge_range object if one wanted to use switches.  This is now integrated with the gori () method of a range_query, and is no longer neede

  1   2   >