Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread waffl3x
> > That leaves 2, 4, and 5. > > > > 2. I am pretty sure xobj functions should have the struct they are a > > part of recorded as the method basetype member. I have already checked > > that function_type and method_type are the same node type under the > > hood and it does appear to be, so it

Re: [PATCH] recog/reload: Remove old UNARY_P operand support

2023-11-02 Thread Hans-Peter Nilsson
> From: Richard Sandiford > Date: Tue, 24 Oct 2023 11:14:20 +0100 > reload and constrain_operands had some old code to look through unary > operators. E.g. an operand could be (sign_extend (reg X)), and the > constraints would match the reg rather than the sign_extend. > > This was previously

Re: [PATCH v2] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-11-03 11:26 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v2] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator From: Pan Li Update in v2: * Add mode size equal check to disable

[PATCH v2] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread pan2 . li
From: Pan Li Update in v2: * Add mode size equal check to disable different mode size when expand, because the underlying codegen is not implemented yet. Original log: The previous rounding API start with i/l/ll only works on the same mode types. For example as below, and we arrange the

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread Jason Merrill
On 10/28/23 00:07, waffl3x wrote: I wanted to change DECL_NONSTATIC_MEMBER_FUNCTION_P to include explicit object member functions, but it had some problems when I made the modification. I also noticed that it's used in cp-objcp-common.cc so would making changes to it be a bad idea? -- cp-tree.h

libstdc++ patch RFA: Fix dl_iterate_phdr configury for libbacktrace

2023-11-02 Thread Ian Lance Taylor
The libbacktrace sources, as used by libstdc++-v3, fail to correctly determine whether the system supports dl_iterate_phdr. The issue is that the libbacktrace configure assumes that _GNU_SOURCE is defined during compilation, but the libstdc++-v3 configure does not do that. This configury failure

Re: [PATCH] c++: Implement C++26 P1854R4 - Making non-encodable string literals ill-formed [PR110341]

2023-11-02 Thread Jason Merrill
On 11/2/23 03:53, Jakub Jelinek wrote: On Fri, Oct 27, 2023 at 07:05:34PM -0400, Jason Merrill wrote: --- gcc/testsuite/g++.dg/cpp26/literals1.C.jj 2023-08-25 17:23:06.662878355 +0200 +++ gcc/testsuite/g++.dg/cpp26/literals1.C 2023-08-25 17:37:03.085132304 +0200 @@ -0,0 +1,65 @@ +//

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-11-02 Thread Nathaniel Shead
Oh, this also fixes PR102284 and its other linked PRs (apart from fields); I forgot to note that in the commit. On Fri, Nov 03, 2023 at 12:18:29PM +1100, Nathaniel Shead wrote: > Bootstrapped and regtested on x86-64_pc_linux_gnu. > > I'm not entirely sure if the change I made to have destructors

[PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-11-02 Thread Nathaniel Shead
Bootstrapped and regtested on x86-64_pc_linux_gnu. I'm not entirely sure if the change I made to have destructors clobber with CLOBBER_EOL instead of CLOBBER_UNDEF is appropriate, but nothing seemed to have broken by doing this and I wasn't able to find anything else that really depended on this

[Committed V3] RISC-V: Fix redundant vsetvl in fixed-vlmax vectorized codes[PR112326]

2023-11-02 Thread Juzhe-Zhong
With compile option --param=riscv-autovec-preference=fixed-vlmax, we have redundant AVL/VL toggling: vsetvli a5,a3,e8,mf4,ta,ma -> should be changed into e32m1 vle32.v v1,0(a1) vle32.v v2,0(a0) vsetivlizero,4,e32,m1,ta,ma -> redundant slli

RE: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread Li, Pan2
Thanks Patrick. It caused by the underlying codegen is not implemented but expand modes opened. Revert it first to unblock others and will fix it ASAP. Pan From: Patrick O'Neill Sent: Friday, November 3, 2023 6:57 AM To: Li, Pan2 ; juzhe.zhong Cc: gcc-patches@gcc.gnu.org; Wang, Yanzhang ;

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Bill Wendling
On Thu, Nov 2, 2023 at 1:36 PM Qing Zhao wrote: > > Thanks a lot for raising these issues. > > If I understand correctly, the major question we need to answer is: > > For the following example: (Jakub mentioned this in an early message) > > 1 struct S { int a; char b __attribute__((counted_by

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Bill Wendling
On Thu, Nov 2, 2023 at 1:00 AM Richard Biener wrote: > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > > > > > > > > > On Oct 31, 2023, at 6:14 PM, Joseph Myers wrote: > > > > > > On Tue, 31 Oct 2023, Qing Zhao wrote: > > > > > >> 2.3 A new semantic requirement in the user documentation of

Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-11-02 Thread Richard Sandiford
Robin Dapp writes: >> Looks reasonable overall. The new match patterns are 1:1 the >> same as the COND_ ones. That's a bit awkward, but I don't see >> a good way to "macroize" stuff further there. Can you at least >> interleave the COND_LEN_* ones with the other ones instead of >> putting them

[PATCH] g++: Rely on dg-do-what-default to avoid running pr102788.cc on non-vector targets

2023-11-02 Thread Patrick O'Neill
Testcases in g++.dg/vect rely on check_vect_support_and_set_flags to set dg-do-what-default and avoid running vector tests on non-vector targets. The three testcases in this patch overwrite the default with dg-do run. Removing the dg-do run directive resolves this issue for non-vector targets

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-11-02 Thread Andrew Pinski
On Wed, Sep 20, 2023 at 6:52 AM Robin Dapp wrote: > > Hi, > > as described in PR111401 we currently emit a COND and a PLUS expression > for conditional reductions. This makes it difficult to combine both > into a masked reduction statement later. > This patch improves that by directly emitting a

Re: [Committed] RISC-V: Add check for types without insn reservations

2023-11-02 Thread Edwin Lu
On 11/1/2023 11:53 AM, Jeff Law wrote: On 11/1/23 12:17, Edwin Lu wrote: Now that all insns are guaranteed to have a type, ensure every insn is associated with a cpu unit/insn reservation. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_sched_variable_issue): add disabled assert OK. 

Re: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread Patrick O'Neill
Hi Pan, This patch is causing new failures (ICEs) on trunk: https://github.com/patrick-rivos/gcc-postcommit-ci/issues/110 Pre-commit CI run: https://github.com/ewlu/gcc-precommit-ci/issues/553#issuecomment-1790688172 New rv32gcv failures: |FAIL: gcc.dg/vect/fast-math-bb-slp-call-2.c (internal

Re: Re: [PATCH V2] RISC-V: Fix redundant vsetvl in fixed-vlmax vectorized codes[PR112326]

2023-11-02 Thread 钟居哲
Thanks Robin. Committed with change nuints into nunits and change mode_idx into 0 for vnshift and vnclip. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-11-02 23:18 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [PATCH V2] RISC-V: Fix

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread rep . dot . nop
On 2 November 2023 11:25:47 CET, Jonathan Wakely wrote: >On Thu, 2 Nov 2023 at 10:23, Andreas Schwab wrote: >> >> On Nov 02 2023, Jonathan Wakely wrote: >> >> > Git tags are cheap, but I can imagine a concern about hundreds of new >> > tags "littering" the output of 'git tag -l'. I don't _think_

Re: [PATCH] libstdc++: avoid uninitialized read in basic_string constructor

2023-11-02 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 19:58, Ben Sherman wrote: > > Tested on x86_64-pc-linux-gnu, please let me know if there's anything > else needed. I haven't contributed before and don't have write access, so > apologies if I've missed anything. This was https://gcc.gnu.org/PR109703 (and several

[PATCH] tree-optimization: Add register pressure heuristics

2023-11-02 Thread Ajit Agarwal
Hello All: Currently code sinking heuristics are based on profile data like basic block count and sink frequency threshold. We have removed such heuristics and added register pressure heuristics based on live-in and live-out of early blocks and immediate dominator of use blocks of the same loop

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 8:09 AM, Jakub Jelinek wrote: > > On Thu, Nov 02, 2023 at 12:52:50PM +0100, Richard Biener wrote: >>> What I meant is to emit >>> tmp_4 = .ACCESS_WITH_SIZE ([0], , (typeof ()) 0); >>> p_5 = _4[2]; >>> i.e. don't associate the pointer with a value of the size, but with >>>

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 7:52 AM, Richard Biener wrote: > > On Thu, Nov 2, 2023 at 11:40 AM Jakub Jelinek wrote: >> >> On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one of the arguments not the size

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
Thanks a lot for raising these issues. If I understand correctly, the major question we need to answer is: For the following example: (Jakub mentioned this in an early message) 1 struct S { int a; char b __attribute__((counted_by (a))) []; }; 2 struct S s; 3 s.a = 5; 4 char *p = [2];

Re: [Patch, fortran] PR98498 - Interp request: defined operators and unlimited polymorphic

2023-11-02 Thread Harald Anlauf
Hi Paul, Am 02.11.23 um 19:18 schrieb Paul Richard Thomas: Hi Harald, I was overthinking the problem. The rejected cases led me to a fix that can only be described as a considerable simplification compared with the first patch! this patch is *much* simpler, makes more sense, and works here.

[pushed] c++: use hash_set in nrv_data

2023-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I noticed we were using a hash_table directly here instead of the simpler hash_set interface. Also, let's check for the variable itself and repeats earlier, since they should happen more often than any of the other cases.

[pushed] c++: retval dtor on rethrow [PR112301]

2023-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In r12-6333 for PR33799, I fixed the example in [except.ctor]/2. In that testcase, the exception is caught and the function returns again, successfully. In this testcase, however, the exception is rethrown, and hits two separate cleanups:

[PATCH] libstdc++: avoid uninitialized read in basic_string constructor

2023-11-02 Thread Ben Sherman
Tested on x86_64-pc-linux-gnu, please let me know if there's anything else needed. I haven't contributed before and don't have write access, so apologies if I've missed anything. -- >8 -- The basic_string input iterator constructor incrementally reads data and allocates the internal buffer

[PATCH] gfortran: Rely on dg-do-what-default to avoid running pr85853.f90, pr107254.f90 and vect-alias-check-1.F90 on non-vector targets

2023-11-02 Thread Patrick O'Neill
Testcases in gfortran.dg/vect/vect.exp rely on check_vect_support_and_set_flags to set dg-do-what-default and avoid running vector tests on non-vector targets. The three testcases in this patch overwrite the default with dg-do run which causes issues for non-vector targets. Removing the dg-do run

Re: [PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Sam James wrote: > maintainer-scripts/ > * gcc_release: Cleanup whitespace. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 3/4] maintainer-scripts/gcc_release: use HTTPS for links

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Sam James wrote: > maintainer-scripts/ > * gcc_release: Use HTTPS for links. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread rep . dot . nop
On 2 November 2023 18:06:54 CET, Maxim Kuvyrkov wrote: >> On Nov 2, 2023, at 21:02, rep.dot@gmail.com wrote: >> >> Hi Maxim! >> >> Many thanks for the patch! Quick question below.. >> >> On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov >> wrote: >>> ... to restore compatability with

Re: [Patch, fortran] PR98498 - Interp request: defined operators and unlimited polymorphic

2023-11-02 Thread Paul Richard Thomas
Hi Harald, I was overthinking the problem. The rejected cases led me to a fix that can only be described as a considerable simplification compared with the first patch! The testcase now reflects the requirements of the standard and regtests without failures. OK for mainline? Thanks Paul

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread Rainer Orth
rep.dot@gmail.com writes: > On 2 November 2023 18:06:54 CET, Maxim Kuvyrkov > wrote: >>> On Nov 2, 2023, at 21:02, rep.dot@gmail.com wrote: >>> >>> Hi Maxim! >>> >>> Many thanks for the patch! Quick question below.. >>> >>> On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov >>> wrote:

[PATCH V3 5/6] aarch64: Add front-end argument type checking for target builtins

2023-11-02 Thread Victor Do Nascimento
In implementing the ACLE read/write system register builtins it was observed that leaving argument type checking to be done at expand-time meant that poorly-formed function calls were being "fixed" by certain optimization passes, meaning bad code wasn't being properly picked up in checking.

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread Maxim Kuvyrkov
> On Nov 2, 2023, at 21:02, rep.dot@gmail.com wrote: > > Hi Maxim! > > Many thanks for the patch! Quick question below.. > > On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov > wrote: >> ... to restore compatability with validate_failures.py . >> The testsuite script validate_failures.py

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread rep . dot . nop
Hi Maxim! Many thanks for the patch! Quick question below.. On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov wrote: >... to restore compatability with validate_failures.py . >The testsuite script validate_failures.py expects >"Running ..." to extract values, >and gotools.sum provided "Running

[PATCH V3 4/6] aarch64: Implement system register r/w arm ACLE intrinsic functions

2023-11-02 Thread Victor Do Nascimento
Implement the aarch64 intrinsics for reading and writing system registers with the following signatures: uint32_t __arm_rsr(const char *special_register); uint64_t __arm_rsr64(const char *special_register); void* __arm_rsrp(const char *special_register); float

[PATCH V3 6/6] aarch64: Add system register duplication check selftest

2023-11-02 Thread Victor Do Nascimento
Add a build-time test to check whether system register data, as imported from `aarch64-sys-reg.def' has any duplicate entries. Duplicate entries are defined as any two SYSREG entries in the .def file which share the same encoding values (as specified by its `CPENC' field) and where the

[PATCH V3 0/6] aarch64: Add support for __arm_rsr and __arm_wsr ACLE function family

2023-11-02 Thread Victor Do Nascimento
Implement changes resulting from upstream discussion about the implementation as presented in V2 of this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633458.html Note that patch 4/7 of the previous iteration of this series (Add basic target_print_operand support for

[PATCH V3 3/6] aarch64: Implement system register validation tools

2023-11-02 Thread Victor Do Nascimento
Given the implementation of a mechanism of encoding system registers into GCC, this patch provides the mechanism of validating their use by the compiler. In particular, this involves: 1. Ensuring a supplied string corresponds to a known system register name. System registers can be

[PATCH V3 1/6] aarch64: Sync system register information with Binutils

2023-11-02 Thread Victor Do Nascimento
This patch adds the `aarch64-sys-regs.def' file, originally written for Binutils, to GCC. In so doing, it provides GCC with the necessary information for teaching the compiler about system registers known to the assembler and how these can be used. By aligning the representation of data common to

[PATCH V3 2/6] aarch64: Add support for aarch64-sys-regs.def

2023-11-02 Thread Victor Do Nascimento
This patch defines the structure of a new .def file used for representing the aarch64 system registers, what information it should hold and the basic framework in GCC to process this file. Entries in the aarch64-system-regs.def file should be as follows: SYSREG (NAME, CPENC (sn,op1,cn,cm,op2),

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Siddhesh Poyarekar
On 2023-11-02 10:12, Martin Uecker wrote: This shouldn't be necessary. The object-size pass can track pointer arithmeti if it comes after inserting the .ACCESS_WITH_SIZE. https://godbolt.org/z/fvc3aoPfd The problem is dependency tracking through the pointer arithmetic, which Jakub suggested

Re: [PATCH V2] RISC-V: Fix redundant vsetvl in fixed-vlmax vectorized codes[PR112326]

2023-11-02 Thread Robin Dapp
Hi Juzhe, in principle this LGTM. It could use some function comments, though ;) > +imm_avl_p (machine_mode mode) > { >poly_uint64 nuints = GET_MODE_NUNITS (mode); > >return nuints.is_constant () > -/* The vsetivli can only hold register 0~31. */ > -? (IN_RANGE

[PATCH v3] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-11-02 Thread Marek Polacek
On Sat, Oct 14, 2023 at 12:56:11AM -0400, Jason Merrill wrote: > On 10/10/23 13:20, Marek Polacek wrote: > > Thanks for looking into this. It's kept me occupied for quite a while. > > Thanks, nice work. > > > On Tue, Aug 29, 2023 at 03:26:46PM -0400, Jason Merrill wrote: > > > On 8/23/23 15:49,

Re: [PATCH v3] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-11-02 Thread Marek Polacek
On Thu, Nov 02, 2023 at 11:28:43AM -0400, Marek Polacek wrote: > On Sat, Oct 14, 2023 at 12:56:11AM -0400, Jason Merrill wrote: > > As discussed above, we probably don't want to exclude implicitly-declared > > special member functions. > > Done (but removing the DECL_ARTIFICIAL check). s/but/by/

[PATCH] vect: allow using inbranch simdclones for masked loops

2023-11-02 Thread Andre Vieira (lists)
Hi, In a previous patch I did most of the work for this, but forgot to change the check for number of arguments matching between call and simdclone. This check should accept calls without a mask to be matched against simdclones with mask arguments. I also added tests to verify this feature

[committed] libstdc++: Add assertion to std::string_view::remove_suffix [PR112314]

2023-11-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Backports seem reasonable. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/112314 * include/std/string_view (string_view::remove_suffix): Add debug assertion. *

[PATCH] libstdc++: Improve static assert messages for monadic operations

2023-11-02 Thread Jonathan Wakely
Any objections or suggestions for better wording? Tested x86_64-linux. -- >8 -- The monadic operations for std::optional and std::expected make use of internal helper traits __is_optional nad __is_expected, which are not very user-friendly when shown in diagnostics. Add messages to the

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 9:54 AM, Richard Biener wrote: > > On Thu, Nov 2, 2023 at 2:50 PM Qing Zhao wrote: >> >> >> >>> On Nov 2, 2023, at 3:57 AM, Richard Biener >>> wrote: >>> >>> On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > On Oct 31, 2023, at 6:14 PM, Joseph

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, ??? wrote: > Hi, Richi. > > >> Do we really need to have two modes for the optab though or could we > >> simply require the target to support arbitrary offset modes (give it > >> is implicitly constrained to ptr_mode for the base already)? Or > >> properly extend/truncate

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, ??? wrote: > Ok. So drop 'scale' and keep signed/unsigned argument, is that right? I don't think we need signed/unsigned. RTL expansion has the signedness of the offset argument there and can just extend to the appropriate mode to offset a pointer. > And I wonder I should

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread 钟居哲
Hi, Richi. >> Do we really need to have two modes for the optab though or could we >> simply require the target to support arbitrary offset modes (give it >> is implicitly constrained to ptr_mode for the base already)? Or >> properly extend/truncate the offset at expansion time, say to ptr_mode

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread 钟居哲
Ok. So drop 'scale' and keep signed/unsigned argument, is that right? And I wonder I should create the stride_type using size_type_node or ptrdiff_type_node ? Which is preferrable ? Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-11-02 22:27 To: 钟居哲 CC: gcc-patches; Jeff Law;

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Martin Uecker
Am Donnerstag, dem 02.11.2023 um 13:50 + schrieb Qing Zhao: > > > On Nov 2, 2023, at 3:57 AM, Richard Biener > > wrote: > > > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > > > > > > > > > > > > > On Oct 31, 2023, at 6:14 PM, Joseph Myers > > > > wrote: > > > > > > > > On Tue,

[committed] c: Add missing conditions in Walloc-size to avoid ICEs [PR112347]

2023-11-02 Thread Uecker, Martin
I forget to guard against some more cases.  Committed as obvious. Martin c: Add missing conditions in Walloc-size to avoid ICEs [PR112347] Fix ICE because of forgotten checks for pointers to void and incomplete arrays. Committed as obvious. PR

[committed] d: Merge upstream dmd, druntime 643b1261bb, phobos 1c98326e7

2023-11-02 Thread Iain Buclaw
Hi, This patch merges the D front-end and runtime library with upstream dmd 643b1261bb, and standard library with phobos 1c98326e7. Synchronizing with the v2.106.0-beta.1 release. This is being done a little earlier than usual as there's a lot of internal moving code around within upstream at

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 2:50 PM Qing Zhao wrote: > > > > > On Nov 2, 2023, at 3:57 AM, Richard Biener > > wrote: > > > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > >> > >> > >> > >>> On Oct 31, 2023, at 6:14 PM, Joseph Myers wrote: > >>> > >>> On Tue, 31 Oct 2023, Qing Zhao wrote: > >>>

[committed] libstdc++: Fix warning during configure

2023-11-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The checks for snprintf give a -Wformat warning due to a missing argument. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_C99): Fix snprintf checks. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 4 ++--

Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread Richard Biener
On Tue, 31 Oct 2023, Juzhe-Zhong wrote: > As previous Richard's suggested, we should support strided load/store in > loop vectorizer instead hacking RISC-V backend. > > This patch adds MASK_LEN_STRIDED LOAD/STORE OPTABS/IFN. > > The GIMPLE IR is same as

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 3:57 AM, Richard Biener wrote: > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: >> >> >> >>> On Oct 31, 2023, at 6:14 PM, Joseph Myers wrote: >>> >>> On Tue, 31 Oct 2023, Qing Zhao wrote: >>> 2.3 A new semantic requirement in the user documentation of

Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-11-02 Thread Robin Dapp
> Looks reasonable overall. The new match patterns are 1:1 the > same as the COND_ ones. That's a bit awkward, but I don't see > a good way to "macroize" stuff further there. Can you at least > interleave the COND_LEN_* ones with the other ones instead of > putting them all at the end? Yes, no

Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-11-02 Thread Richard Biener
On Thu, 26 Oct 2023, Robin Dapp wrote: > Ok, next try. Now without dubious pattern and with direct optab > but still dedicated expander function. > > This will cause one riscv regression in cond_widen_reduc-2.c that > we can deal with later. It is just a missed optimization where > we do not

[committed] Improve H8 sequences for single bit sign extractions

2023-11-02 Thread Jeff Law
Spurred by Roger's recent work on ARC, this patch improves the code we generation for single bit sign extractions. The basic idea is to get the bit we want into C, the use a subx;ext.w;ext.l sequence to sign extend it in a GPR. For bits 0..15 we can use a bld instruction to get the bit we

Re: [PATCH 01/12] [contrib] validate_failures.py: Avoid testsuite aliasing

2023-11-02 Thread Maxim Kuvyrkov
Patch proposed at https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635000.html -- Maxim Kuvyrkov https://www.linaro.org > On Sep 27, 2023, at 18:47, Maxim Kuvyrkov wrote: > > Hi Bernhard, > > Thanks, I meant to fix this, but forgot. > > The underlying problem here is that we want to

[PATCH 1/4] c/c++: rework pragma parsing

2023-11-02 Thread David Malcolm
This patch reworks pragma parsing in c-pragma.cc, with the following improvements: - it replaces the GCC_BAD* macros (that contained "return") in favor of helper classes and functions for emitting diagnostics, making control flow more explicit - the -Wpragmas diagnostics are reworded from the

[PATCH 2/4] c: add #pragma GCC show_layout

2023-11-02 Thread David Malcolm
This patch adds a new pragma to the C frontend that will make it emit a human-readable diagram of a struct's layout. For example, given this contrived usage: struct example { char foo : 7; char bar; char visible : 1; char active : 1; }; the compiler will emit output similar to the

[PATCH 3/4] diagnostics: add automatic URL-ification within messages

2023-11-02 Thread David Malcolm
In r10-3781-gd26082357676a3 GCC's pretty-print framework gained the ability to emit embedding URLs via escape sequences for marking up text output.. In r10-3783-gb4c7ca2ef3915a GCC started using this for the [-Wname-of-option] emitted at the end of each diagnostic so that it becomes a hyperlink

[PATCH/RFC 0/4] C/C++/diagnostics: various UX improvements

2023-11-02 Thread David Malcolm
The following patch kit implements the: #pragma GCC show_layout (struct foo) idea I mentioned in my Cauldron talk (in patch 2), and the other patches implement various related user experience changes I came across when implementing it. Patch 1 reworks how c-pragma.cc parses pragmas, and

Re: Re: [tree-optimization/111721] VECT: Support SLP for MASK_LEN_GATHER_LOAD with dummy mask

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, juzhe.zh...@rivai.ai wrote: > Thanks Richi. > > The following is the V2 patch: > Testing on X86 and aarch64 are running. > > diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc > index 43d742e3c92..e7f7f976f11 100644 > --- a/gcc/tree-vect-slp.cc > +++

[PATCH v2] A new copy propagation and PHI elimination pass

2023-11-02 Thread Filip Kastl
> Hi, > > this is a patch that I submitted two months ago as an RFC. I added some polish > since. > > It is a new lightweight pass that removes redundant PHI functions and as a > bonus does basic copy propagation. With Jan Hubička we measured that it is > able > to remove usually more than 5%

Re: [PATCH] A new copy propagation and PHI elimination pass

2023-11-02 Thread Filip Kastl
Hi, thanks for the guidance. I'm going to post a new version of the patch with the testcase modified so that it searches for 'return 9;' instead of '= 9;'. Filip Kastl On Fri 2023-10-27 13:55:37, Jeff Law wrote: > > > On 10/20/23 07:52, Filip Kastl wrote: > > On Fri 2023-10-20 15:50:25,

[PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread Maxim Kuvyrkov
... to restore compatability with validate_failures.py . The testsuite script validate_failures.py expects "Running ..." to extract values, and gotools.sum provided "Running ". Note that libgo.sum, which also uses Makefile logic to generate DejaGnu-like output, already has "..." suffix.

[pushed] analyzer: fix clang warnings [PR112317]

2023-11-02 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-5080-gc71028c979d55f. gcc/analyzer/ChangeLog: PR analyzer/112317 * access-diagram.cc (class x_aligned_x_ruler_widget): Eliminate unused field

RE: [PATCH v1] EXPMED: Allow vector mode for DSE extract_low_bits [PR111720]

2023-11-02 Thread Li, Pan2
Thanks Richard B for comments. > when there are integer modes for the vector modes you now go a different path, > a little less "regressing" would be to write it as > > if (int_mode_for_mode (src_mode).exists (_int_mode) >&& int_mode_for_mode (mode).exists (_mode)) > { >

RE: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zhong Sent: Thursday, November 2, 2023 8:04 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; Li, Pan2 ; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator lgtm Replied Message

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 12:52:50PM +0100, Richard Biener wrote: > > What I meant is to emit > > tmp_4 = .ACCESS_WITH_SIZE ([0], , (typeof ()) 0); > > p_5 = _4[2]; > > i.e. don't associate the pointer with a value of the size, but with > > an address where to find the size (plus how large it is),

Re: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread juzhe.zhong
lgtm Replied Message Frompan2...@intel.comDate11/02/2023 19:48 Togcc-patches@gcc.gnu.org Ccjuzhe.zh...@rivai.ai,pan2...@intel.com,yanzhang.w...@intel.com,kito.ch...@gmail.comSubject[PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Sam James
Richard Biener writes: > On Thu, Nov 2, 2023 at 11:25 AM Sam James wrote: >> >> >> Richard Biener writes: >> >> > On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: >> >> >> >> Say 'memory lifetime' rather than 'memory life' as lifetime is the more >> >> standard term nowadays (indeed we have

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 11:40 AM Jakub Jelinek wrote: > > On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: > > > Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one > > > of > > > the arguments not the size value, but its address. Then at __bdos time > > > we

Re: Re: [tree-optimization/111721] VECT: Support SLP for MASK_LEN_GATHER_LOAD with dummy mask

2023-11-02 Thread juzhe.zh...@rivai.ai
Thanks Richi. The following is the V2 patch: Testing on X86 and aarch64 are running. diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 43d742e3c92..e7f7f976f11 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -760,7 +760,7 @@ vect_get_and_check_slp_defs (vec_info

[AVR PATCH] Improvements to SImode and PSImode shifts by constants.

2023-11-02 Thread Roger Sayle
This patch provides non-looping implementations for more SImode (32-bit) and PSImode (24-bit) shifts on AVR. For most cases, these are shorter and faster than using a loop, but for a few (controlled by optimize_size) they are a little larger but significantly faster, The approach is to perform

[AVR PATCH] Optimize (X>>C)&1 for C in [1, 4, 8, 16, 24] in *insv.any_shift..

2023-11-02 Thread Roger Sayle
This patch optimizes a few special cases in avr.md's *insv.any_shift. instruction. This template handles tests for a single bit, where the result has only a (different) single bit set in the result. Usually (currently) this always requires a three-instruction sequence of a BST, a CLR and a BLD

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 11:25 AM Sam James wrote: > > > Richard Biener writes: > > > On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: > >> > >> Say 'memory lifetime' rather than 'memory life' as lifetime is the more > >> standard term nowadays (indeed we have e.g. -fno-lifetime-dse). > >> > >>

[PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread pan2 . li
From: Pan Li The previous rounding API start with i/l/ll only works on the same mode types. For example as below, and we arrange the iterator similar to fcvt. * SF => SI * DF => DI After we refined this limination from middle-end, these API can also vectorized with different type sizes, aka:

RE: [PATCH] RISC-V: Fix bug of AVL propagation PASS

2023-11-02 Thread Li, Pan2
Committed, thanks Robin. Pan -Original Message- From: Robin Dapp Sent: Thursday, November 2, 2023 7:34 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rdapp@gmail.com; kito.ch...@gmail.com; kito.ch...@sifive.com; jeffreya...@gmail.com Subject: Re: [PATCH] RISC-V: Fix bug of AVL

Re: [PATCH] RISC-V: Fix bug of AVL propagation PASS

2023-11-02 Thread Robin Dapp
LGTM. Regards Robin

[PATCH] RISC-V: Fix bug of AVL propagation PASS

2023-11-02 Thread Juzhe-Zhong
A run FAIL suddenly shows up today to me: FAIL: gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-11.c execution test that I didn't have before. After investigation, I realize that there is a bug in AVL propagtion PASS. gcc/ChangeLog: * config/riscv/riscv-avlprop.cc

Re: [tree-optimization/111721] VECT: Support SLP for MASK_LEN_GATHER_LOAD with dummy mask

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, Juzhe-Zhong wrote: > This patch fixes following FAILs for RVV: > FAIL: gcc.dg/vect/vect-gather-1.c -flto -ffat-lto-objects scan-tree-dump > vect "Loop contains only SLP stmts" > FAIL: gcc.dg/vect/vect-gather-1.c scan-tree-dump vect "Loop contains only SLP > stmts" > >

Re: [committed] libstdc++: Minor update to installation docs

2023-11-02 Thread Jonathan Wakely
On Wed, 1 Nov 2023 at 22:11, Gerald Pfeifer wrote: > > On Mon, 18 Sep 2023, Jonathan Wakely via Gcc-patches wrote: > > @@ -103,8 +103,10 @@ ln -s libiconv-1.16 libiconv > > > > If GCC 3.1.0 or later on is being used on GNU/Linux, an attempt > > will be made to use "C"

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: > > Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one of > > the arguments not the size value, but its address. Then at __bdos time > > we would dereference that pointer to get the size. > > So, > > struct S {

[PATCH] tree-optimization/112320 - bougs debug IL after SCCP

2023-11-02 Thread Richard Biener
The following addresses wrong debug IL created by SCCP rewriting stmts to defined overflow. I addressed another inefficiency there but needed to adjust the API of rewrite_to_defined_overflow for this which is now taking a stmt iterator for in-place operation and a stmt for sequence producing

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Sam James
Richard Biener writes: > On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: >> >> Say 'memory lifetime' rather than 'memory life' as lifetime is the more >> standard term nowadays (indeed we have e.g. -fno-lifetime-dse). >> >> It's also easier to grep for if someone is looking for the

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 10:23, Andreas Schwab wrote: > > On Nov 02 2023, Jonathan Wakely wrote: > > > Git tags are cheap, but I can imagine a concern about hundreds of new > > tags "littering" the output of 'git tag -l'. I don't _think_ you can > > put tags under an alternative ref that isn't

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: > > Say 'memory lifetime' rather than 'memory life' as lifetime is the more > standard term nowadays (indeed we have e.g. -fno-lifetime-dse). > > It's also easier to grep for if someone is looking for the documentation on > where we do that. OK >

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 9:27 AM Jakub Jelinek wrote: > > On Thu, Nov 02, 2023 at 08:57:36AM +0100, Richard Biener wrote: > > You probably want to specify that when a pointer to the array is taken the > > pointer has to be to the first array element (or do we want to mangle the > > 'size'

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Andreas Schwab
On Nov 02 2023, Jonathan Wakely wrote: > Git tags are cheap, but I can imagine a concern about hundreds of new > tags "littering" the output of 'git tag -l'. I don't _think_ you can > put tags under an alternative ref that isn't fetched by default (as we > do with refs/users and refs/vendor). I

[COMMITTED] i386: Move stack protector patterns above mov $0 -> xor peephole

2023-11-02 Thread Uros Bizjak
Move stack protector patterns above mov $0,%reg -> xor %reg,%reg so the latter won't interfere with stack protector peephole2s. gcc/ChangeLog: * config/i386/i386.md: Move stack protector patterns above mov $0,%reg -> xor %reg,%reg peephole2 pattern. Bootstrapped and regression tested on

  1   2   >