Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Tue, 26 Aug 2025, Tomasz Kaminski wrote: > > > On Tue, Aug 26, 2025 at 5:50 PM Patrick Palka wrote: > On Tue, 26 Aug 2025, Jonathan Wakely wrote: > > > On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back

[committed v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kamiński
This patch refactors the implementation of bind_front and bind_back to avoid using std::tuple for argument storage. Instead, bound arguments are now: * stored directly if there is only one, * within a dedicated _Bound_arg_storage otherwise. _Bound_arg_storage is less expensive to instantiate and a

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 5:50 PM Patrick Palka wrote: > On Tue, 26 Aug 2025, Jonathan Wakely wrote: > > > On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back to > > > avoid using std::tuple for argument storage. Instead, bound a

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Tue, 26 Aug 2025, Jonathan Wakely wrote: > On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: > > This patch refactors the implementation of bind_front and bind_back to > > avoid using std::tuple for argument storage. Instead, bound arguments are > > now: > > * stored directly if there is only one

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 4:30 PM Patrick Palka wrote: > On Tue, 26 Aug 2025, Tomasz Kaminski wrote: > > > > > > > On Tue, Aug 26, 2025 at 3:54 PM Patrick Palka wrote: > > On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > > > > > This patch refactors the implementation of bind_front and >

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Jonathan Wakely
On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: This patch refactors the implementation of bind_front and bind_back to avoid using std::tuple for argument storage. Instead, bound arguments are now: * stored directly if there is only one, * within a dedicated _Bound_arg_storage otehrwise. "otehr

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Tue, 26 Aug 2025, Tomasz Kaminski wrote: > > > On Tue, Aug 26, 2025 at 3:54 PM Patrick Palka wrote: > On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back to > > avoid using std::tuple for argument storage. I

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 3:54 PM Patrick Palka wrote: > On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back to > > avoid using std::tuple for argument storage. Instead, bound arguments are > > now: > > * stored directly if there is

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > This patch refactors the implementation of bind_front and bind_back to > avoid using std::tuple for argument storage. Instead, bound arguments are > now: > * stored directly if there is only one, > * within a dedicated _Bound_arg_storage otehrwise. I

[PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-20 Thread Tomasz Kamiński
This patch refactors the implementation of bind_front and bind_back to avoid using std::tuple for argument storage. Instead, bound arguments are now: * stored directly if there is only one, * within a dedicated _Bound_arg_storage otehrwise. _Bound_arg_storage holds each argument in an _Indexed_bou

[PATCH] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-19 Thread Tomasz Kamiński
This patch refactors the implementation of bind_front and bind_back to avoid using std::tuple for argument storage. Instead, bound arguments are now: * stored directly if there is only one, * within a dedicated _Bound_arg_storage otehrwise. _Bound_arg_storage holds each argument in an _Indexed_bou

[COMMITTED 138/220] gccrs: Fix cast rules logic to try simple casts then fall back to coercions

2025-08-05 Thread arthur . cohen
From: Philip Herron This case: let i = 1; let j = i as i64; 'i' is meant to default to i32 but the inference was making both of these i64 because the code was prefering coercion logic which can end up with a default unify which causes the ?integer to unify with i64 making them both i64.

Re: [PATCHv8] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-08-01 Thread Patrick Palka
es {...}" to "require is_invocable_v<>" > * Adjust more whitespace. > * Add more tests. > > Changes in v5: > * Switch back to decltype(auto) returns > * Adjust tests to verify that calls treat and all bound args > as const. > * Use "&&a

[PATCHv8] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-08-01 Thread Nathan Myers
exports in summary. * Change "noexcept(noexcept(...))" to noexcept(is_noexcept_invocable<>) * Change "requires requires {...}" to "require is_invocable_v<>" * Adjust more whitespace. * Add more tests. Changes in v5: * Switch back to decltype(auto) returns

Re: [PATCHv7] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-30 Thread Tomasz Kaminski
requires {...}" to "require is_invocable_v<>" > * Adjust more whitespace. > * Add more tests. > > Changes in v5: > * Switch back to decltype(auto) returns > * Adjust tests to verify that calls treat and all bound args > as const. > * Use &q

Re: [PATCHv7] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-30 Thread Tomasz Kaminski
requires {...}" to "require is_invocable_v<>" > * Adjust more whitespace. > * Add more tests. > > Changes in v5: > * Switch back to decltype(auto) returns > * Adjust tests to verify that calls treat and all bound args > as const. > * Use &q

[PATCHv7] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-29 Thread Nathan Myers
op= for _Bind_fn_t. * Note no need for change to exports in summary. * Change "noexcept(noexcept(...))" to noexcept(is_noexcept_invocable<>) * Change "requires requires {...}" to "require is_invocable_v<>" * Adjust more whitespace. * Add more tests.

Re: [PATCHv5] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-28 Thread Tomasz Kaminski
On Mon, Jul 28, 2025 at 11:27 AM Nathan Myers wrote: > Stabilizing. > > Changes in v5: > * Switch back to decltype(auto) returns > * Adjust tests to verify that calls treat and all bound args > as const. > * Use "&&", "||" and "!"

[PATCHv5] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-28 Thread Nathan Myers
Stabilizing. Changes in v5: * Switch back to decltype(auto) returns * Adjust tests to verify that calls treat and all bound args as const. * Use "&&", "||" and "!" in preference to "and", "or" and "not" in deference to

Re: [PATCHv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-23 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 11:28 AM Tomasz Kaminski wrote: > > > On Tue, Jul 22, 2025 at 9:22 AM Nathan Myers wrote: > >> This should be close to ready. However, std::is_invocable >> and noexcept still fail oddly applied to the not_fp result. >> The remaining failing test cases in */nttp.cc, commen

Re: [PATCHv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-22 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 11:28 AM Tomasz Kaminski wrote: > > > On Tue, Jul 22, 2025 at 9:22 AM Nathan Myers wrote: > >> This should be close to ready. However, std::is_invocable >> and noexcept still fail oddly applied to the not_fp result. >> The remaining failing test cases in */nttp.cc, commen

Re: [PATCHv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-22 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 9:22 AM Nathan Myers wrote: > This should be close to ready. However, std::is_invocable > and noexcept still fail oddly applied to the not_fp result. > The remaining failing test cases in */nttp.cc, commented > out, need careful examination to see whether they should > be

[PATCHv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-22 Thread Nathan Myers
This should be close to ready. However, std::is_invocable and noexcept still fail oddly applied to the not_fp result. The remaining failing test cases in */nttp.cc, commented out, need careful examination to see whether they should be expecting different results given that the argument function obj

[PATCHv3] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-19 Thread Nathan Myers
This should be close to ready. However, std::is_invocable and noexcept still fail oddly applied to the not_fp result. The remaining failing test cases in */nttp.cc, commented out, need careful examination to see whether they should be expecting different results given that the argument function obj

Re: [PATCHv2] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-18 Thread Jonathan Wakely
On Fri, 18 Jul 2025 at 12:22, Tomasz Kaminski wrote: > > > > On Fri, Jul 18, 2025 at 12:52 PM Nathan Myers wrote: >> >> * I rewrote the implementation to more closely resemble the >> non-NTTP version, and fix the various noexcept and requires >> omissions. > > I have a task to adjust them late

Re: [PATCHv2] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-18 Thread Tomasz Kaminski
On Fri, Jul 18, 2025 at 12:52 PM Nathan Myers wrote: > * I rewrote the implementation to more closely resemble the > non-NTTP version, and fix the various noexcept and requires > omissions. > I have a task to adjust them later, so the alignment may not be desired. > > * I don't understand wh

[PATCHv2] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-18 Thread Nathan Myers
* I rewrote the implementation to more closely resemble the non-NTTP version, and fix the various noexcept and requires omissions. * I don't understand what "a separate type for single argument case, that correspond to function_ref nontype, ptr/ref constructor" means, but I did make no-boun

[COMMITTED 5/6] ada: Back out change to Tbuild.Unchecked_Convert_To

2025-07-18 Thread Marc Poulhiès
From: Bob Duff ...because it breaks one test that uses --RTS=light. "Is_Composite_Type" is needed; "not Is_Scalar_Type" was wrong. gcc/ada/ChangeLog: * tbuild.adb (Unchecked_Convert_To): Back out change. Tested on x86_64-pc-linux-gnu, committed on m

Re: [PATCH] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-17 Thread Tomasz Kaminski
I have left some comments on the previous revision here: https://gcc.gnu.org/pipermail/libstdc++/2025-July/062349.html They do not seem to be addressed. On Thu, Jul 17, 2025 at 9:13 PM Nathan Myers wrote: > [Note: many of the tests for the original versions do not make > sense, require different

[PATCH] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-17 Thread Nathan Myers
[Note: many of the tests for the original versions do not make sense, require different outcomes, or otherwise fail on the new versions for reasons not obvious.] Add non-type template parameter function-object/-pointer argument versions of bind_front, bind_back, and not_fn as defined in P2714R1.

Re: [pushed]PR121007, LRA]: Fall back to reload of whole inner address in PR case and constrain iteration number of address reloads

2025-07-12 Thread Segher Boessenkool
Hi! As always, thank you :-) On Fri, Jul 11, 2025 at 02:43:12PM -0400, Vladimir Makarov wrote: > gcc/ChangeLog: > > * lra-constraints.cc (process_address_1): When changing base reg > on a reg of the base class, fall back to reload of whole inne

[pushed]PR121007, LRA]: Fall back to reload of whole inner address in PR case and constrain iteration number of address reloads

2025-07-11 Thread Vladimir Makarov
]: Fall back to reload of whole inner address in PR case and constrain iteration number of address reloads gcc/ChangeLog: * lra-constraints.cc (process_address_1): When changing base reg on a reg of the base class, fall back to reload of whole inner address

Re: [SNAPv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-08 Thread Tomasz Kaminski
To test forwarding, I would suggest using a by-value member: struct F { quals operator()(int&) const { return { false, true }; } quals operator()(int const&) const { return { true, true }; } quals operator()(int&&) const { return { false, false }; } quals operator()(int const&&)

Re: [SNAPv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-08 Thread Tomasz Kaminski
On Tue, Jul 8, 2025 at 5:41 AM Nathan Myers wrote: > This is a snapshot of work in progress, for reference. > bind_front(...) is uglified directly from the sample > implementation in P2714, at include/std/functional:1284 . > > Test failures: > > bind_front/1.cc:53: error: static assertion failed

[SNAPv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-07 Thread Nathan Myers
This is a snapshot of work in progress, for reference. bind_front(...) is uglified directly from the sample implementation in P2714, at include/std/functional:1284 . Test failures: bind_front/1.cc:53: error: static assertion failed bind_front/1.cc:57: error: static assertion failed bind_front/1.c

[COMMITTED 26/40] ada: Back out removal of renaming tranformation

2025-06-08 Thread Marc Poulhiès
From: Bob Duff A previous change (commit 33eebd96d27fa2b29cec79f55167a11aaf7f4802) removed code in Analyze_Object_Renaming that tranformed renamings into object declarations. This reinstates that code. Removing the code causes failures in gnatbugs-large/2023/gnat-435_deep_blue_capital. Ideally,

[PATCH] gcc: do not apply store motion on loop with no exits. The temporary variable will not be wrote back to memory as there is no exit of inifinite loop, so we prohibit applying store motion on loo

2025-04-26 Thread Xin Wang
Signed-off-by: Xin Wang --- gcc/tree-ssa-loop-im.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc index 225964c6215..de0450f5192 100644 --- a/gcc/tree-ssa-loop-im.cc +++ b/gcc/tree-ssa-loop-im.cc @@ -3355,6 +3355,9 @@ loop_suitable_for_s

Re: [PATCH] gimple-fold: Improve optimize_memcpy_to_memset by walking back until aliasing says the ref is a may clobber. [PR118947]

2025-04-21 Thread Richard Biener
he > memcpy statement > because optimize_memcpy_to_memset only looks back one statement. This can be > fixed to look back > until we get an statement that may clobber the reference. If we get a phi > node, then we don't do > anything. > > Bootstrapped and tested on x86_

Re: [PATCH] gimple-fold: Improve optimize_memcpy_to_memset by walking back until aliasing says the ref is a may clobber. [PR118947]

2025-04-18 Thread Jeff Law
only looks back one statement. This can be fixed to look back until we get an statement that may clobber the reference. If we get a phi node, then we don't do anything. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/118947 gcc/ChangeLog: * gimp

[PATCH] gimple-fold: Improve optimize_memcpy_to_memset by walking back until aliasing says the ref is a may clobber. [PR118947]

2025-04-17 Thread Andrew Pinski
The case here is we have: ``` char buf[32] = {}; void* ret = aaa(); __builtin_memcpy(ret, buf, 32); ``` And buf does not escape. But we don't prop the zeroing from buf to the memcpy statement because optimize_memcpy_to_memset only looks back one statement. This can be fixed to

Put znver5 ADDSS cost back to 3

2025-04-16 Thread Jan Hubicka
imagemagick. This patch sets the cost back to 3. Next stage1 we can untie addss from the other operations and set it correctly. bootstrapped/regtested x86_64-linux and also benchmarked on SPEC2k17 gcc/ChangeLog: PR target/119298 * config/i386/x86-tune-costs.h (znver5_cost): Set ADDSS

[PUSHED/14 0/6] Back port a few patches to 14

2025-04-14 Thread Andrew Pinski
Backport a few of my patches from the trunk to GCC 14 release branch. These all have been sitting on the trunk for some time now so it was time to backport them before a release. Andrew Pinski (6): phiopt: Fix VCE moving by rewriting it into cast [PR116098] aarch64: Fix early ra for -fno-delet

[PATCH 27/27] i386: Raise deprecate warning for -mavx10.1-256/512 and -mevex512 while add -mavx10.1 back with 512 bit alias

2025-04-05 Thread Haochen Jiang
remove them in this patch. Unlike AVX10.2 options, AVX10.1 options has been there in a major release, so we have to raise a deprecate warning in GCC 15 and remove them in GCC 16. At the same time, to align with avx10.2 options, we will add just removed avx10.1 option back with warning to mention its

Re: [PATCH] libstdc++: Add assertions to std::list::pop_{front,back}

2025-03-15 Thread Patrick Palka
On Thu, Mar 6, 2025 at 6:37 AM Jonathan Wakely wrote: > > The recently-approved Standard Library Hardening proposal (P3471R4) > gives pop_front and pop_back member functions hardened preconditions, > but std::list was missing assertions on them. Our other sequence > containers do have assertions o

[PATCH] libstdc++: Add assertions to std::list::pop_{front,back}

2025-03-06 Thread Jonathan Wakely
The recently-approved Standard Library Hardening proposal (P3471R4) gives pop_front and pop_back member functions hardened preconditions, but std::list was missing assertions on them. Our other sequence containers do have assertions on those members. libstdc++-v3/ChangeLog: * include/bits

[PATCH, COMMITTED] x86: Change "if (TARGET_X32 ...)" back to "else if (TARGET_X32 ...)"

2025-02-01 Thread H.J. Lu
Update commit dd6247cb8fc11a15e23e949092f89d24ff329209 Author: H.J. Lu Date: Fri Jan 31 12:29:04 2025 +0800 x86: Handle TARGET_INDIRECT_BRANCH_REGISTER for -fno-plt to change "if (TARGET_X32 ...)" back to "else if (TARGET_X32 ...)". PR target/118713 * config

Re: [PATCH, RFC] Fortran: do not copy back for parameter actual arguments [PR81978]

2025-01-20 Thread Harald Anlauf
assignment in the called procedure. The proposal is to simply not generate the unpacking / copying-back code if the actual argument has the PARAMETER attribute. Non-conforming code should rather be either detected at compile-time (which we do to a reasonable extent), or we might add (in the future) new

Re: [PATCH, RFC] Fortran: do not copy back for parameter actual arguments [PR81978]

2025-01-20 Thread Paul Richard Thomas
ent in the called procedure. > > The proposal is to simply not generate the unpacking / copying-back code > if the actual argument has the PARAMETER attribute. Non-conforming code > should rather be either detected at compile-time (which we do to a > reasonable extent), or we might add (in

[PATCH, RFC] Fortran: do not copy back for parameter actual arguments [PR81978]

2025-01-19 Thread Harald Anlauf
. The proposal is to simply not generate the unpacking / copying-back code if the actual argument has the PARAMETER attribute. Non-conforming code should rather be either detected at compile-time (which we do to a reasonable extent), or we might add (in the future) new checking code that detects

Re: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2025-01-06 Thread Richard Biener
d: Rewrite add_scope_conflicts_2 to use > > cache and look back further [PR111422] > > > > On Sat, Nov 16, 2024 at 5:25 AM Andrew Pinski > > wrote: > > > > > > After fixing loop-im to do the correct overflow rewriting > > > for pointer ty

RE: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2025-01-06 Thread Tamar Christina
> -Original Message- > From: Tamar Christina > Sent: Tuesday, December 31, 2024 1:04 PM > To: Richard Biener ; Andrew Pinski > > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use > cache and loo

RE: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2024-12-31 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Wednesday, November 20, 2024 11:28 AM > To: Andrew Pinski > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use > cache and look back further [PR111422] > &

Re: [PATCH] Shrink back size of tree_exp from 40 bytes to 32

2024-12-14 Thread Jeff Law
On 12/14/24 5:16 PM, Jakub Jelinek wrote: Hi! The following patch implements what I've mentioned in the 64-bit location_t thread. struct tree_exp had unsigned condition_uid member added for something rarely used (-fcondition-coverage) and even there used only on very small subset of trees onl

[PATCH] Shrink back size of tree_exp from 40 bytes to 32

2024-12-14 Thread Jakub Jelinek
Hi! The following patch implements what I've mentioned in the 64-bit location_t thread. struct tree_exp had unsigned condition_uid member added for something rarely used (-fcondition-coverage) and even there used only on very small subset of trees only for the duration of the gimplification. The

[COMMITTED, wwwdocs] gcc-15: Document removal of Nios II back end

2024-11-25 Thread Sandra Loosemore
--- htdocs/gcc-15/changes.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index 80604ab8..6c9ebaac 100644 --- a/htdocs/gcc-15/changes.html +++ b/htdocs/gcc-15/changes.html @@ -29,7 +29,9 @@ a work-in-progress. C

Re: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2024-11-20 Thread Richard Biener
On Sat, Nov 16, 2024 at 5:25 AM Andrew Pinski wrote: > > After fixing loop-im to do the correct overflow rewriting > for pointer types too. We end up with code like: > ``` > _9 = (unsigned long) &g; > _84 = _9 + 18446744073709551615; > _11 = _42 + _84; > _44 = (signed char *) _11; > ... > *_44 = 1

[COMMITTED 2/3] ada: Small fix in expansion of array aggregates handled by the back end

2024-11-19 Thread Marc Poulhiès
it is to be handled by the back-end. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 71 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index c34df840401

[PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2024-11-15 Thread Andrew Pinski
After fixing loop-im to do the correct overflow rewriting for pointer types too. We end up with code like: ``` _9 = (unsigned long) &g; _84 = _9 + 18446744073709551615; _11 = _42 + _84; _44 = (signed char *) _11; ... *_44 = 10; g ={v} {CLOBBER(eos)}; ... n[0] = &f; *_44 = 8; g ={v} {CLOBBER(eos)};

[COMMITTED 04/30] ada: Remove obsolete workaround for back-end limitation

2024-11-12 Thread Marc Poulhiès
body Sem_Ch3 is Rewrite (Object_Definition (N), New_Occurrence_Of (Act_T, Loc)); Freeze_Before (N, Act_T); - elsif Nkind (E) = N_Function_Call -and then Constant_Present (N) -and then Has_Unconstrained_Elements (Etype (E)) - then - -- The back

Re: [PATCH 4/4] VN: Lookup `val != 0` if we got back val when looking up the predicate for GIMPLE_COND [PR117414]

2024-11-06 Thread Richard Biener
On Sat, Nov 2, 2024 at 4:10 PM Andrew Pinski wrote: > > Sometimes we get back a full ssa name when looking up the comparison of the > GIMPLE_COND > rather than a predicate. We then want to lookup the `val != 0` for the > predicate. > > Note this might happen with other bo

[PATCH 4/4] VN: Lookup `val != 0` if we got back val when looking up the predicate for GIMPLE_COND [PR117414]

2024-11-02 Thread Andrew Pinski
Sometimes we get back a full ssa name when looking up the comparison of the GIMPLE_COND rather than a predicate. We then want to lookup the `val != 0` for the predicate. Note this might happen with other boolean assignments and COND_EXPR but I am not sure if it is as important; I have not

Re: [PATCH v2] [PR83782] ifunc: back-propagate ifunc_resolver to aliases

2024-10-29 Thread Alexandre Oliva
target/i386/mvc10.c fails with -fPIE on ia32 because we omit the > @PLT mark when calling an alias to an indirect function. Such aliases > aren't marked as ifunc_resolvers in the cgraph, so the test that would > have forced the PLT call fails. > I've arranged for ifunc_resolver

[COMMITTED 26/35] ada: Back out part of previous change -- disable warning

2024-10-25 Thread Marc Poulhiès
From: Bob Duff Temporarily disable the warning, because it breaks SPARK continuous builder gcc/ada/ChangeLog: * sem_ch10.adb (Analyze_With_Clause): Temporarily disable warning. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch10.adb | 3 ++- 1 file changed, 2 ins

[committed] tree-object-size: Fall back to wholesize for non-const offset

2024-10-17 Thread Siddhesh Poyarekar
Sorry I had missed calling the test case itself, so fixed that up, rebased on master and committed. ->8-- Don't bail out early if the offset to a pointer in __builtin_object_size is a variable, return the wholesize instead since that is a better fallback for maximum estimate. This should

[PATCH 7/7] fortran: Evaluate once BACK argument of MINLOC/MAXLOC with DIM [PR90608]

2024-10-14 Thread Mikael Morin
From: Mikael Morin Bootstrapped and regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Evaluate the BACK argument of MINLOC/MAXLOC once before the scalarization loops in the case where the DIM argument is present. This is a follow-up to r15-1

Re: [PATCH v2 4/4] tree-object-size: Fall back to wholesize for non-const offset

2024-09-27 Thread Jakub Jelinek
On Fri, Sep 20, 2024 at 12:40:29PM -0400, Siddhesh Poyarekar wrote: > Don't bail out early if the offset to a pointer in __builtin_object_size > is a variable, return the wholesize instead since that is a better > fallback for maximum estimate. This should keep checks in place for > fortified func

[PATCH v2 4/4] tree-object-size: Fall back to wholesize for non-const offset

2024-09-20 Thread Siddhesh Poyarekar
Don't bail out early if the offset to a pointer in __builtin_object_size is a variable, return the wholesize instead since that is a better fallback for maximum estimate. This should keep checks in place for fortified functions to constrain overflows to at lesat some extent. gcc/ChangeLog:

[PATCH] Fall back to elementwise access for too spaced SLP single element interleaving

2024-09-20 Thread Richard Biener
gcc.dg/vect/vect-pr111779.c is a case where non-SLP manages to vectorize using VMAT_ELEMENTWISE but SLP currently refuses because doing a regular access with permutes would cause excess vector loads with at most one element used. The following makes us fall back to elementwise accesses for that

[PATCH][v2] Fall back to single-lane SLP before falling back to no SLP

2024-09-18 Thread Richard Biener
ed_can_use_partial_vectors_p -= LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo); - /* We don't expect to have to roll back to anything other than an empty set of rgroups. */ gcc_assert (LOOP_VINFO_MASKS (loop_vinfo).is_empty ()); - /* This is the point where we can re-s

[PATCH][v2] Fall back to single-lane SLP before falling back to no SLP

2024-09-18 Thread Richard Biener
AN_USE_PARTIAL_VECTORS_P (loop_vinfo); - /* We don't expect to have to roll back to anything other than an empty set of rgroups. */ gcc_assert (LOOP_VINFO_MASKS (loop_vinfo).is_empty ()); - /* This is the point where we can re-start analysis with SLP forced off. */ -start_over

[PATCH] Fall back to single-lane SLP before falling back to no SLP

2024-09-18 Thread Richard Biener
mode fixed. */ + if (applying_suggested_uf) return ok; /* If there are reduction chains re-trying will fail anyway. */ @@ -3268,8 +3268,9 @@ again: dump_printf_loc (MSG_NOTE, vect_location, "re-trying with SLP disabled\n"); - /* Roll bac

Re: [PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-08-02 Thread Mikael Morin
h!  It's good to see so much progress... Best regards Thomas Thanks to you and Bernhard. This is what I'm going to push.From 40122a405386a8b67c11bbaad523ffce5c1c7855 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Fri, 2 Aug 2024 14:24:34 +0200 Subject: [PATCH] fortran: Supp

Re: [PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-08-01 Thread Thomas Koenig
Hi Mikael, +  gcc_assert (backexpr->expr_type == EXPR_VARIABLE); drop it, downgrade to checking, or is it worth? Whether it is worth it, I don't know; it's protecting the access to backexpr->symtree a few lines down, idependently of the implementation of maybe_absent_optional_variable.

[COMMITTED 17/30] ada: Put back -G for binder

2024-08-01 Thread Marc Poulhiès
From: Arnaud Charlet gcc/ada/ * bindgen.adb (Gen_Main): Put back support for -G * bindusg.adb (Display): Put back line for -G * opt.ads (CCG_Mode): Update doc * switch-b.adb (Scan_Binder_Switches): Put back support for -G Tested on x86_64-pc-linux-gnu, committed

Re: [PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-07-27 Thread rep . dot . nop
On 27 July 2024 21:11:19 CEST, Mikael Morin wrote: >Le 27/07/2024 à 19:23, rep.dot@gmail.com a écrit : >> On 22 July 2024 20:53:18 CEST, Mikael Morin wrote: >>> From: Mikael Morin >>> >>> Hello, >>> >>> this fixes a null pointer der

Re: [PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-07-27 Thread Mikael Morin
Le 27/07/2024 à 19:23, rep.dot@gmail.com a écrit : On 22 July 2024 20:53:18 CEST, Mikael Morin wrote: From: Mikael Morin Hello, this fixes a null pointer dereference with absent optional dummy passed as BACK argument of MINLOC/MAXLOC. Tested for regression on x86_64-linux. OK for

Re: [PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-07-27 Thread rep . dot . nop
On 22 July 2024 20:53:18 CEST, Mikael Morin wrote: >From: Mikael Morin > >Hello, > >this fixes a null pointer dereference with absent optional dummy passed >as BACK argument of MINLOC/MAXLOC. > >Tested for regression on x86_64-linux. >OK for master? > >-- >8

[PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-07-22 Thread Mikael Morin
From: Mikael Morin Hello, this fixes a null pointer dereference with absent optional dummy passed as BACK argument of MINLOC/MAXLOC. Tested for regression on x86_64-linux. OK for master? -- >8 -- Protect the evaluation of BACK with a check that the reference is non-null in case

Re: [PATCH] fortran: Factor the evaluation of MINLOCK/MAXLOC's BACK argument

2024-07-12 Thread Mikael Morin
d catch, thanks. Thanks for the patch! Thanks for the review. Harald -- 8< -- Move the evaluation of the BACK argument out of the loop in the inline code generated for MINLOC or MAXLOC.  For that, add a new (scalar) element associated with BACK to the scalarization loop chain, eval

Re: [PATCH] fortran: Factor the evaluation of MINLOCK/MAXLOC's BACK argument

2024-07-11 Thread Harald Anlauf
ks for the patch! Harald -- 8< -- Move the evaluation of the BACK argument out of the loop in the inline code generated for MINLOC or MAXLOC. For that, add a new (scalar) element associated with BACK to the scalarization loop chain, evaluate the argument with the context of that element

[PATCH] fortran: Factor the evaluation of MINLOCK/MAXLOC's BACK argument

2024-07-11 Thread Mikael Morin
From: Mikael Morin Hello, I discovered this while testing the inline MINLOC/MAXLOC (aka PR90608) patches. Regression tested on x86_64-linux. OK for master? -- 8< -- Move the evaluation of the BACK argument out of the loop in the inline code generated for MINLOC or MAXLOC. For that, add a

Re: PR target/115618: can we back port the fix to GCC 13?

2024-06-27 Thread Andrew Carlotti
On Wed, Jun 26, 2024 at 09:03:26AM +, Kyrylo Tkachov wrote: > Hi Andrew, > > I’ve tested the fix for PR 115618 from your commit r14-6612-g8d30107455f230 > on the GCC 13 branch. > I’d like to back port it to that branch. > Is there any problem with that I should be awar

Re: [PATCH 2/7] Lower AVX512 kmask comparison back to AVX2 comparison when op_{true, false} is vector -1/0.

2024-06-27 Thread Richard Biener
On Thu, Jun 27, 2024 at 10:30 AM liuhongt wrote: > > gcc/ChangeLog In PR115659 Kewen notes that ISEL (and possibly folding) could do a better job with these. In addition to the mentioned issues we can also try whether the target can handle an alternate mask mode. So instead of gating with

[PATCH 2/7] Lower AVX512 kmask comparison back to AVX2 comparison when op_{true, false} is vector -1/0.

2024-06-27 Thread liuhongt
gcc/ChangeLog PR target/115517 * config/i386/sse.md (*_cvtmask2_not): New pre_reload splitter. (*_cvtmask2_not): Ditto. (*avx2_pcmp3_6): Ditto. (*avx2_pcmp3_7): Ditto. --- gcc/config/i386/sse.md | 97 ++

PR target/115618: can we back port the fix to GCC 13?

2024-06-26 Thread Kyrylo Tkachov
Hi Andrew, I’ve tested the fix for PR 115618 from your commit r14-6612-g8d30107455f230 on the GCC 13 branch. I’d like to back port it to that branch. Is there any problem with that I should be aware of? It applies cleanly and tests fine. Thanks, Kyrill

[COMMITTED 04/31] ada: Remove conversion from String_Id to String and back to String_Id

2024-05-21 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove useless conversions. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_put_image.adb | 6 ++ 1 file changed, 2 insertions(

[COMMITTED 09/16] Verify that reading back from vrange_storage doesn't drop bits.

2024-04-28 Thread Aldy Hernandez
We have a sanity check in the irange storage code to make sure that reading back a cache entry we have just written to yields exactly the same range. There's no need to do this only for integers. This patch moves the code to a more generic place. However, doing so tickles a latent bug i

Re: [PATCH] testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c

2024-03-18 Thread Richard Earnshaw (lists)
Thank you for the patch review! I'm including below the updated version. I pushed this, thanks. R. -- Thiago From 78e70788da5ed849d7828b0219d3aa8955ad0fea Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Sat, 13 Jan 2024 14:28:07 -0300 Subject: [PATCH v2] testsuite: Turn erro

Re: [PATCH] testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c

2024-03-15 Thread Thiago Jung Bauermann
If that works, ok with that change. I took the opportunity to request commit access to the GCC repo so that I can commit the patch myself. Sorry for the delay. I'll commit it as soon as I get it. Thank you for the patch review! I'm including below the updated version. -- Thiago >From 7

Re: [PATCH] testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c

2024-03-01 Thread Richard Earnshaw (lists)
On 13/01/2024 20:46, Thiago Jung Bauermann wrote: > Since commit 2c3db94d9fd ("c: Turn int-conversion warnings into > permerrors") the test fails with errors such as: > > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 32) > FAIL: gcc.target/arm/acle/cde-mve-error

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-29 Thread Tom Tromey
> "Jeff" == Jeff Law writes: >> I don't know how to fix this. Jeff> Me neither, but I can suggest a hacky workaround. FTR, I asked Jakub on irc and he fixed it, so thankfully I didn't have to resort to the hack :-) thanks, Tom

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Andrew Pinski
On Wed, Feb 28, 2024 at 5:35 PM Tom Tromey wrote: > > > "Andrew" == Andrew Pinski writes: > > Andrew> I don't know how to update the script server side after it is > Andrew> committed in git. the checker script is located in git though: > > Thanks, I didn't realize it was there. > > Could you

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Tom Tromey
> "Andrew" == Andrew Pinski writes: Andrew> I don't know how to update the script server side after it is Andrew> committed in git. the checker script is located in git though: Thanks, I didn't realize it was there. Could you check in your patch? IMO it seems obvious. Tom

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Andrew Pinski
ERR: invalid PR component in subject: "Fix PR libcc1/113977" > > > > I guess this script isn't in sync with the components in bugzilla. > > > > I don't know how to fix this. > Me neither, but I can suggest a hacky workaround. Change the component >

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Jeff Law
n bugzilla. I don't know how to fix this. Me neither, but I can suggest a hacky workaround. Change the component in bugzilla to something the pre-commit hooks understand, push the fix, then change the component back a little while later and adjust the ChangeLog after it gets generated overnight. Ugly as sin. jeff

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Tom Tromey
> "Jeff" == Jeff Law writes: Jeff> Given this is all libcc1 related and thus primarily of interest to Jeff> gdb, if you're happy with it, then it's OK for the trunk. Thank you. I could not push this because: remote: *** ChangeLog format failed: remote: *** ERR: invalid PR component in subj

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-27 Thread Jeff Law
27;s not run at all, it's also clear that removing it doesn't cause any regressions in gdb. However, rather than remove it, this patch changes it to handle ERROR_MARK better, and then to fall back to the v0 code if the new code fails to find the type it's lookin

[PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-26 Thread Tom Tromey
ear that removing it doesn't cause any regressions in gdb. However, rather than remove it, this patch changes it to handle ERROR_MARK better, and then to fall back to the v0 code if the new code fails to find the type it's looking for. 2024-02-26 Tom Tromey * libcc1plugin.cc (saf

GCN: Don't hard-code number of SGPR/VGPR/AVGPR registers (was: [PATCH v3 05/10] GCN back-end code)

2024-02-01 Thread Thomas Schwinge
Hi! On 2018-12-12T11:52:52+, Andrew Stubbs wrote: > This patch contains the major part of the GCN back-end. [...] > --- /dev/null > +++ b/gcc/config/gcn/gcn.c > +void > +gcn_hsa_declare_function_name (FILE *file, const char *name, tree) > +{ > + /* Determine count o

GCN: Remove 'SGPR_OR_VGPR_REGNO_P' definition (was: [PATCH v3 05/10] GCN back-end code)

2024-01-31 Thread Thomas Schwinge
Hi! On 2018-12-12T11:52:52+, Andrew Stubbs wrote: > This patch contains the major part of the GCN back-end. [...] > --- /dev/null > +++ b/gcc/config/gcn/gcn.h > +#define FIRST_SGPR_REG 0 > +#define SGPR_REGNO(N)((N)+FIRST_SGPR_REG) > +#de

  1   2   3   4   5   6   7   >