[committed] Add another commit to ignore

2022-11-07 Thread Jakub Jelinek via Gcc-patches
Hi! We can't handle r13-3652-ge4cba49413ca429dc82f6aa2e88129ecb3fdd943 because that commit removed whole liboffloadmic including its ChangeLog (I'm surprised that touching ChangeLog worked out together with removing the files), but gcc-changelog/git_update_version.py then choked on it because it

[COMMITTED] ada: Cleanup WITH clauses after switching from obsolescent Ada 83 unit

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Cleanup after replacing Unchecked_Conversion with Ada.Unchecked_Conversion. gcc/ada/ * libgnarl/s-interr.adb: Reorder context items and pragmas. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnarl/s-interr.adb | 17 ++--- 1 file

[COMMITTED] ada: Tune layout after switching to Ada 2022 aggregate syntax

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Whitespace cleanup only. gcc/ada/ * libgnarl/s-interr.adb: Tune whitespace. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnarl/s-interr.adb | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[COMMITTED] ada: Create operator nodes in functional style

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek A recent patch removed two rewritings, where we kept the operator node but replaced its operands. This patch removes explicit setting of the operands; instead, the operator is already created together with its operands, which seems a bit safer and more consistent with how we

[COMMITTED] ada: New warning about noncomposing user-defined "="

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff Print warning for a user-defined "=" that does not compose as might be expected (i.e. is ignored for predefined "=" of a containing record or array type). This warning is enabled by -gnatw_q; we don't enable it by default because it generates too many false positives. We also

[COMMITTED] ada: Suppress warnings on derived True/False

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff GNAT normally warns on "return ...;" if the "..." is known to be True or False, but not when it is a Boolean literal True or False. This patch also suppresses the warning when the type is derived from Boolean, and has convention C or Fortran (and therefore True is represented as

[COMMITTED] ada: Use named notation in calls to Expand_Composite_Equality

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff Use named notation in calls to Expand_Composite_Equality. gcc/ada/ * exp_ch4.adb (Component_Equality, Expand_Array_Equality) (Expand_Record_Equality): Use named notation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch4.adb | 30

[PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Richard Biener via Gcc-patches
The following adds a fold_builtins pass at -O0, keying off some unwanted optimization and setting pointer alignment of the result of __builtin_assume_alignment before removing the call. This allows libatomic calls to be elided at -O0 on s390 for __uint128_t foo(__uint128_t *p) { return

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-07 Thread Eric Botcazou via Gcc-patches
> I can send the obvious patch to make it work as before and ignore the > NULL which fixes this. I'm not sure if it should really be passing NULL > around in the first place or not which is why I'm sharing the backtrace. Thanks for the investigation. That's because the DECL_SOURCE_LOCATION of

[COMMITTED] ada: Fix missing tag for with of an obsolescent function

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Fix minor inconsistency in tags of warnings about obsolescent entities. Part of cleaning up the warnings machinery to better handle references to unset objects. gcc/ada/ * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warnings about obsolescent

[COMMITTED] ada: Remove useless validity suppression for attribute Input

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Attributes 'Input and 'Read are similar, but only the 'Read denotes a subprogram with parameter of mode OUT where operand validity checks need to be suppressed. Cleanup related to fix for attributes 'Has_Same_Storage and 'Overlaps_Storage. gcc/ada/ * exp_attr.adb

[COMMITTED] ada: Rework CUDA host-side invocation of device-side elaboration code

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird When the binder is invoked with a "-d_c" switch, add an argument to that switch which is the library name on the device side; so "-d_c" becomes "-d_c=some_library_name". This does not effect the case where "-d_c" is specified as a switch for compilation (as opposed to binding).

[COMMITTED] ada: Allow reuse of Enclosing_Declaration_Or_Statement by GNATprove

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Move routine Enclosing_Declaration_Or_Statement from body of Sem_Res to spec of Sem_Util, so it can be reused. In particular, GNATprove needs this functionality to climb from an arbitrary subexpression with target_name (@) to the enclosing assignment statement. Behaviour of

[COMMITTED] ada: Flip warning suppression routine to positive meaning

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Subprogram names starting with No_ seem unnecessarily confusing. Cleanup related to improved detection of references to uninitialized objects; semantics is unaffected. gcc/ada/ * sem_warn.adb (Warn_On_In_Out): Remove No_ prefix; flip return values between

[COMMITTED] ada: Cleanup comment about mapping parameters when inlining

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Improve location of the comment about a special case for GNATprove mode. gcc/ada/ * inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Move comment next to a condition that it describes. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Tune hash function for cross-reference entries

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Tune the hash function that combines entity identifiers with source locations of where those entities are referenced. Previously the source location was multiplied by 2 ** 7 (i.e. shifted left by 7 bits), then added to the entity identifier, and finally divided modulo 2 **

Re: [PATCH] unswitch most profitable condition first

2022-11-07 Thread Richard Biener via Gcc-patches
On Tue, 25 Oct 2022, Richard Biener wrote: > When doing the loop unswitching re-org we promised to followup > with improvements on the cost modeling. The following makes sure we > try to unswitch on the most profitable condition first. As most profitable > we pick the condition leading to the

[PATCH] libstdc++: Update from latest fast_float [PR107468]

2022-11-07 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch updates from fast_float trunk. That way it grabs two of the 4 LOCAL_PATCHES, some smaller tweaks, to_extended cleanups and most importantly fix for the incorrect rounding case, PR107468 aka https://github.com/fastfloat/fast_float/issues/149 Using std::fegetround showed in

[COMMITTED] ada: Put_Image aspect spec incorrectly not inherited

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird In some cases, a Put_Image aspect specification for a scalar type was not correctly inherited by a descendant of that type. gcc/ada/ * exp_put_image.adb (Image_Should_Call_Put_Image): Correctly handle the case of an inherited Put_Image aspect

[COMMITTED] ada: Remove redundant suppression for non-modified IN OUT parameters

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Non-modified IN OUT parameters are first collected and then filtered by examining uses of their enclosing subprograms. In this filtering we don't need to look again at properties of the formal parameters themselves. Cleanup related to improved detection of references to

[COMMITTED] ada: Clean up code for visibility of generic actuals

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup related to fixing visibility of actual parameters in inlining-for-proof in GNATprove mode; semantics is unaffected. gcc/ada/ * sem_ch12.adb (Check_Generic_Actuals): Remove redundant parens; refactor an excessive if-statement; remove repeated

[COMMITTED] ada: Reject boxes in delta array aggregates

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Implement Ada 2022 4.3.4(11/5), which rejects box compound delimiter <> in delta record aggregates, just like another rule rejects it in delta array aggregates. gcc/ada/ * sem_aggr.adb (Resolve_Delta_Array_Aggregate): Reject boxes in delta array aggregates.

[COMMITTED] ada: Document that gprof won't work on windows with PIE.

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Cedric Landet Document that gprof won't work on windows with PIE and -no-pie must be used. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Mention the needed -no-pie for windows to use gprof. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu,

[COMMITTED] ada: Fix detection of external calls to protected objects in instances

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Detection of external-vs-internal calls to protected objects relied on the scope stack. This didn't work when the call appeared in an instance of generic unit, because instances are analyzed in different context to where they appear. gcc/ada/ * exp_ch6.adb

[PATCH] [committed] i386: Fix typo in sse-22.c pragma

2022-11-07 Thread Kong, Lingling via Gcc-patches
gcc/testsuite/ChangeLog: * gcc.target/i386/sse-22.c: Fix typo in pragma GCC target. Pushing as obvious. Thanks, Lingling --- gcc/testsuite/gcc.target/i386/sse-22.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c

[COMMITTED] ada: Fix performance regression related to references in Refined_State

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Recently added call to In_Pragma_Expression caused a performance regression. It might require climbing syntax trees of arbitrarily deep expressions, while previously references within pragmas were detected in bounded time. This patch restores the previous efficiency.

[COMMITTED] ada: Inline composite node kind AST queries

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Queries that ultimately examine the same field of an AST node (e.g. Nkind) are visibly more efficient when inlined. In particular, routines Is_Body_Or_Package_Declaration and Is_Body can apparently be inlined into a single Nkind membership test. This patch fixes some of

Re: [PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 07, 2022 at 10:02:11AM +0100, Richard Biener wrote: > The following adds a fold_builtins pass at -O0, keying off some > unwanted optimization and setting pointer alignment of the result > of __builtin_assume_alignment before removing the call. This > allows libatomic calls to be

Re: [PATCH 2/2] Add m_CORE_ATOM for atom cores

2022-11-07 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 7, 2022 at 2:41 AM Haochen Jiang wrote: > > gcc/ChangeLog: > > * config/i386/i386-options.cc (m_CORE_ATOM): New. > * config/i386/x86-tune.def > (X86_TUNE_SCHEDULE): Initial tune for CORE_ATOM. > (X86_TUNE_PARTIAL_REG_DEPENDENCY): Ditto. >

[COMMITTED] ada: Don't reuse operator nodes in expansion

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek This patch removes handling of references to unset objects that relied on Original_Node. This handling was only needed because of rewriting that reused operator nodes, for example, when an array inequality like: A < B was rewritten into:

[COMMITTED] ada: Reject misplaced pragma Obsolescent

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Pragma Obsolescent appearing before declaration was putting the Obsolescent flag on the Standard package, which is certainly wrong. The problem was that we relied on the Find_Lib_Unit_Name routine without sanitizing the pragma placement with Check_Valid_Library_Unit_Pragma.

[COMMITTED] ada: Simplify detection of pragmas in the context items

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_prag.adb (Is_In_Context_Clause): Rewrite without negations and inequalities. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 16 +--- 1 file changed, 5

Re: [PATCH] docs: document sanitizers can trigger warnings

2022-11-07 Thread Martin Liška
On 11/3/22 13:32, Gerald Pfeifer wrote: > Hi Martin, > > On Wed, 26 Oct 2022, Martin Liška wrote: >> +Note the enabled sanitizer options tend to increase a false-positive rate >> +of selected warnings, most notably @option{-Wmaybe-uninitialized}. >> +And thus we recommend to disable

[COMMITTED] ada: Deconstruct Safe_To_Capture_In_Parameter_Value

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Recently routine Safe_To_Capture_Value was adapted, so that various data properties like validity/nullness/values are tracked also for in-parameters. Now a similar routine Safe_To_Capture_In_Parameter_Value, which was only used to track data nullness, is redundant, so this

[COMMITTED] ada: Fix inherited postconditions in inlined subprograms

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff Protect the building of postcondition pragmas in case the postcondition is not present due to inlining. gcc/ada/ * freeze.adb (Build_Inherited_Condition_Pragmas): Do nothing if A_Post is empty. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Fixed elaboration of CUDA programs.

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Quentin Ochem The names of imported / exported symbols were not consistent between the device and the host when compiling for CUDA. Remove the function Device_Ada_Final_Link_Name as it is no longer referenced. gcc/ada/ * bindgen.adb: fixed the way the device init and final

[COMMITTED] ada: Cleanup detection of code within generic instances

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek To check if a node is located in a generic instance we can either look at Instantiation_Location or at the Instantiation_Depth, but just looking at the location is simpler and more efficient. Cleanup related to improved detection of references to uninitialized objects;

[COMMITTED] ada: Clean up unnecessary nesting in code for DLL libraries

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup; issue spotted while examining routines with No_ prefix. gcc/ada/ * mdll.ads (Build_Import_Library): Fix grammar in comment. * mdll.adb (Build_Import_Library): Directly execute code of a nested routine; rename No_Lib_Prefix to

[COMMITTED] ada: Clean up unnecesary call in resolution of overloaded expressions

2022-11-07 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek When experimentally enabling frontend inlining by default, the unnecessary call to Comes_From_Predefined_Lib_Unit in Resolve appears to be a performance bottleneck (most likely this call is expensive because it involves a loop over the currently inlined subprograms). Code

[PATCH (pushed)] Mitigate clang warnings:

2022-11-07 Thread Martin Liška
gcc/range-op.cc:1752:16: warning: 'wi_fold' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] gcc/range-op.cc:1757:16: warning: 'wi_op_overflows' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

[PATCH 10/15 V4] arm: Implement cortex-M return signing address codegen

2022-11-07 Thread Andrea Corallo via Gcc-patches
Hi all, please find attached the lastest version of this patch incorporating some more improvents. Feel free to ignore V3. Best Regards Andrea >From 869630801de2d3df03ce2f2551fd801dd59a640c Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 20 Jan 2022 15:36:23 +0100 Subject: [PATCH]

Re: [PATCH] i386: Prefer remote atomic insn for atomic_fetch{add, and, or, xor}

2022-11-07 Thread Uros Bizjak via Gcc-patches
On Sun, Nov 6, 2022 at 2:00 PM Kong, Lingling via Gcc-patches wrote: > > Hi > > The patch is to add flag -mprefer-remote-atomic to control whether to > generate raoint insn for atomic operations. > Ok for trunk? Please note TARGET_AVOID_MFENCE tuning flag, introduced a while ago due to the fact

Re: [PATCH 0/2] i386: slim down insn-automata [PR 87832]

2022-11-07 Thread Alexander Monakov
On Tue, 1 Nov 2022, Alexander Monakov wrote: > Hi, > > I'm sending followup fixes for combinatorial explosion of znver scheduling > automaton tables as described in the earlier thread: > >

Re: [AArch64] Enable generation of FRINTNZ instructions

2022-11-07 Thread Andre Vieira (lists) via Gcc-patches
On 07/11/2022 11:05, Richard Biener wrote: On Fri, 4 Nov 2022, Andre Vieira (lists) wrote: Sorry for the delay, just been reminded I still had this patch outstanding from last stage 1. Hopefully since it has been mostly reviewed it could go in for this stage 1? I addressed the comments and

Re: [AArch64] Enable generation of FRINTNZ instructions

2022-11-07 Thread Richard Biener via Gcc-patches
On Fri, 4 Nov 2022, Andre Vieira (lists) wrote: > Sorry for the delay, just been reminded I still had this patch outstanding > from last stage 1. Hopefully since it has been mostly reviewed it could go in > for this stage 1? > > I addressed the comments and gave the slp-part of vectorizable_call

RE: [PATCH 1/8]middle-end: Recognize scalar reductions from bitfields and array_refs

2022-11-07 Thread Richard Biener via Gcc-patches
On Mon, 7 Nov 2022, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Monday, November 7, 2022 10:18 AM > > To: Tamar Christina > > Cc: Richard Biener ; gcc- > > patc...@gcc.gnu.org; nd > > Subject: RE: [PATCH 1/8]middle-end: Recognize scalar reductions

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-07 Thread Aldy Hernandez via Gcc-patches
On Mon, Nov 7, 2022 at 1:43 PM Jakub Jelinek wrote: > > On Mon, Nov 07, 2022 at 01:35:35PM +0100, Aldy Hernandez wrote: > > Let me see if I understand you correctly... > > > > real_isdenormal is always returning false for our uses in frange? So > > instead of using real_isdenormal in

Re: why does gccgit require pthread?

2022-11-07 Thread LIU Hao via Gcc-patches
在 2022-11-07 20:57, Jonathan Wakely 写道: It would be a lot nicer if playback::context met the C++ Lockable requirements, and playback::context::compile () could just take a scoped lock on *this: Yeah yeah that makes a lot of sense. Would you please just commit that? I don't have write access

Re: why does gccgit require pthread?

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote: > > 在 2022-11-07 20:57, Jonathan Wakely 写道: > > It would be a lot nicer if playback::context met the C++ Lockable > > requirements, and playback::context::compile () could just take a > > scoped lock on *this: > > > > > > Yeah yeah that makes a lot of

Re: [PATCH V2] Enable small loop unrolling for O2

2022-11-07 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 4:37 AM Hongyu Wang wrote: > > Hi, this is the updated patch of > https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604345.html, > which uses targetm.loop_unroll_adjust as gate to enable small loop unroll. > > This patch does not change rs6000/s390 since I don't have

Re: [PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Richard Biener via Gcc-patches
On Mon, 7 Nov 2022, Jakub Jelinek wrote: > On Mon, Nov 07, 2022 at 10:02:11AM +0100, Richard Biener wrote: > > The following adds a fold_builtins pass at -O0, keying off some > > unwanted optimization and setting pointer alignment of the result > > of __builtin_assume_alignment before removing

RE: [PATCH 1/8]middle-end: Recognize scalar reductions from bitfields and array_refs

2022-11-07 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, November 7, 2022 10:18 AM > To: Tamar Christina > Cc: Richard Biener ; gcc- > patc...@gcc.gnu.org; nd > Subject: RE: [PATCH 1/8]middle-end: Recognize scalar reductions from > bitfields and array_refs > > On Mon, 7 Nov 2022,

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-07 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 07, 2022 at 01:35:35PM +0100, Aldy Hernandez wrote: > Let me see if I understand you correctly... > > real_isdenormal is always returning false for our uses in frange? So > instead of using real_isdenormal in flush_denormals_to_zero, perhaps > we should be using: > > REAL_EXP (r) <

Re: [PATCH] libstdc++: Update from latest fast_float [PR107468]

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 08:19, Jakub Jelinek wrote: > > Hi! > > The following patch updates from fast_float trunk. That way > it grabs two of the 4 LOCAL_PATCHES, some smaller tweaks, to_extended > cleanups and most importantly fix for the incorrect rounding case, > PR107468 aka

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-11-07 Thread Alexander Monakov
On Sat, 5 Nov 2022, Philipp Tomsich wrote: > Alexander, > > I had missed your comment until now. Please make sure to read replies from Jeff and Palmer as well (their responses went to gcc-patches with empty Cc list):

Re: [PATCH] libstdc++: Implement ranges::cartesian_product_view from P2374R4

2022-11-07 Thread Patrick Palka via Gcc-patches
On Thu, 27 Oct 2022, Patrick Palka wrote: > On Thu, 27 Oct 2022, Patrick Palka wrote: > > > This also implements the proposed resolutions of the tentatively ready > > LWG issues 3760 and 3761. > > > > I'm not sure how/if we should implement the recommended practice of: > > > >

RE: [PATCH 1/8]middle-end: Recognize scalar reductions from bitfields and array_refs

2022-11-07 Thread Richard Biener via Gcc-patches
On Mon, 7 Nov 2022, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Saturday, November 5, 2022 11:33 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; rguent...@suse.de > > Subject: Re: [PATCH 1/8]middle-end: Recognize scalar reductions

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-07 Thread Aldy Hernandez via Gcc-patches
On Fri, Nov 4, 2022 at 8:53 PM Jakub Jelinek wrote: > > On Fri, Nov 04, 2022 at 08:14:23PM +0100, Jakub Jelinek via Gcc-patches wrote: > > One thing that is clear is that real_isdenormal is never true for these > > (but then a question is if flush_denormals_to_zero actually works). > > So, after

Re: [PATCH 2/2] ivopts: Consider number of invariants when calculating register pressure.

2022-11-07 Thread Richard Biener via Gcc-patches
On Fri, Oct 28, 2022 at 3:39 PM Dimitrije Milosevic wrote: > > Hi Richard, > > > It's n_invs + 2 * n_cands? > > Correct, n_invs + 2 * n_cands, my apologies. > > > The comment says we want to prefer eliminating IVs over invariants. Your > > patch > > undoes that by weighting invariants the same

[PATCH v2 16/19] modula2 front end: bootstrap and documentation tools

2022-11-07 Thread Gaius Mulley via Gcc-patches
Hi Martin, here is the revised patch having applied all previous recommendations: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603436.html Is this ok now? Thanks for the improvement suggestions (argparse results in fewer lines of code :-) regards, Gaius

Re: [ada, patch] fix libgnat build on x86_64-linux-gnux32 with glibc <= 2.31

2022-11-07 Thread Arnaud Charlet via Gcc-patches
> This was introduced with the fix and backports of PR103530 on > x86_64-linux-gnux32 with older glibc versions (checked with 2.31), where > dladdr is still in the libdl.so library, and not included in libc.so as in > newer glibc versions. > Linking of libgnat.so fails with > > [...] >

[COMMITTED] [range-op] Restrict division by power of 2 optimization to positive numbers.

2022-11-07 Thread Aldy Hernandez via Gcc-patches
The problem here is that we are transforming a division by a power of 2 into a right shift, and using this to shift the maybe nonzero bits. This gives the wrong result when the number being divided is negative. In the testcase we are dividing this by 8: [irange] int [-256, -255] NONZERO

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-07 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 07, 2022 at 01:48:28PM +0100, Aldy Hernandez wrote: > On Mon, Nov 7, 2022 at 1:43 PM Jakub Jelinek wrote: > > > > On Mon, Nov 07, 2022 at 01:35:35PM +0100, Aldy Hernandez wrote: > > > Let me see if I understand you correctly... > > > > > > real_isdenormal is always returning false for

Re: [PATCH 2/8]middle-end: Recognize scalar widening reductions

2022-11-07 Thread Richard Biener via Gcc-patches
On Mon, 31 Oct 2022, Tamar Christina wrote: > Hi All, > > This adds a new optab and IFNs for REDUC_PLUS_WIDEN where the resulting > scalar reduction has twice the precision of the input elements. > > At some point in a later patch I will also teach the vectorizer to recognize > this builtin

RE: [PATCH 1/2]middle-end Fold BIT_FIELD_REF and Shifts into BIT_FIELD_REFs alone

2022-11-07 Thread Richard Biener via Gcc-patches
On Mon, 31 Oct 2022, Tamar Christina wrote: > Hi All, > > Here's a respin addressing review comments. > > Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu > and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > > * match.pd: Add bitfield and

[PATCH] unswitching of outer loops

2022-11-07 Thread Richard Biener via Gcc-patches
This allows loop unswitching to unswitch outer loops conditions are invariant in. We restrict ourselves to unswitch conditions in innermost loops and will only unswitch loop nests that do not contain any sibling loops. To simplify the implementation the loop nest unswitched is the deepest all

Re: [PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Eric Botcazou via Gcc-patches
> index 9778e776cf2..adb1e351e15 100644 > --- a/gcc/tree-ssa-ccp.cc > +++ b/gcc/tree-ssa-ccp.cc > @@ -4197,6 +4197,7 @@ const pass_data pass_data_fold_builtins = >TODO_update_ssa, /* todo_flags_finish */ > }; > > +template > class pass_fold_builtins : public gimple_opt_pass > { > public:

Re: [PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 07, 2022 at 10:31:21AM +, Richard Biener wrote: > On Mon, 7 Nov 2022, Jakub Jelinek wrote: > > > On Mon, Nov 07, 2022 at 10:02:11AM +0100, Richard Biener wrote: > > > The following adds a fold_builtins pass at -O0, keying off some > > > unwanted optimization and setting pointer

RE: [PATCH 1/8]middle-end: Recognize scalar reductions from bitfields and array_refs

2022-11-07 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, November 7, 2022 11:23 AM > To: Tamar Christina > Cc: Richard Biener ; gcc- > patc...@gcc.gnu.org; nd > Subject: RE: [PATCH 1/8]middle-end: Recognize scalar reductions from > bitfields and array_refs > > On Mon, 7 Nov 2022,

Re: why does gccgit require pthread?

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 06:51, LIU Hao via Gcc wrote: > > 在 2022-11-07 12:37, Andrew Pinski 写道: > > > > The original code which used pthread was added in GCC 5 way before GCC > > moved to being written in C++11 which was only in the last 3 years. > > pthread_* functions were the best choice at the

[committed] tree-ssa-sink: do not touch calls that return twice

2022-11-07 Thread Alexander Monakov
Avoid moving pure/const calls that may return twice in tree-ssa-sink: properly redirecting the associated abnormal edge is non-trivial. gcc/ChangeLog: PR tree-optimization/107505 * tree-ssa-sink.cc (statement_sink_location): Additionally reject ECF_RETURNS_TWICE calls.

Your signed documents

2022-11-07 Thread DocuSign System
image.aspx Description: Binary data

Re: [PATCH v2 16/19] modula2 front end: bootstrap and documentation tools

2022-11-07 Thread Martin Liška
On 11/7/22 14:09, Gaius Mulley wrote: > > Hi Martin, > > here is the revised patch having applied all previous recommendations: > > https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603436.html Hi. > > Is this ok now? Thanks for the improvement suggestions (argparse > results in

[RFA] gcc: fix PR rtl-optimization/107482

2022-11-07 Thread Max Filippov via Gcc-patches
gcc/ * ira-color.cc (update_costs_from_allocno): Check that allocno is in the consideration_allocno_bitmap before dereferencing ALLOCNO_COLOR_DATA (allocno). --- This fixes the invalid memory access, but I'm not sure if that's sufficient and there's no remaining higher

Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity.

2022-11-07 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 9:40 AM Dimitrije Milosevic wrote: > > Hi Jeff, > > > This is exactly what I was trying to get to. If the addressing mode > > isn't supported, then we shouldn't be picking it as a candidate. If it > > is, then we've probably got a problem somewhere else in this code and

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 2 Nov 2022 at 09:26, Jakub Jelinek wrote: > > Hi! > > The following patch adds std::{to,from}_chars support for std::float128_t > on glibc 2.26+ for {i?86,x86_64,ia64,powerpc64le}-linux. > When long double is already IEEE quad, previous changes already handle > it by using long double

Re: [PATCH] ifcvt: Support bitfield lowering of multiple-exit loops

2022-11-07 Thread Richard Biener via Gcc-patches
On Thu, 3 Nov 2022, Andre Vieira (lists) wrote: > Hi, > > With Tamar's patch > (https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604880.html) enabling > the vectorization of early-breaks, I'd like to allow bitfield lowering in such > loops, which requires the relaxation of allowing

RE: [PATCH]middle-end Recognize more conditional comparisons idioms.

2022-11-07 Thread Richard Biener via Gcc-patches
On Mon, 31 Oct 2022, Tamar Christina wrote: > > > This moves the pattern detection to match.pd instead. > > > > where's the other copy and is it possible to remove it with this patch? > > > > It looks like it's spread over various passes. Starting with forwardprop. Can you be more specific?

Re: [PATCH] c++: Tweaks for -Wredundant-move [PR107363]

2022-11-07 Thread Marek Polacek via Gcc-patches
Ping. On Fri, Oct 28, 2022 at 04:42:33PM -0400, Marek Polacek via Gcc-patches wrote: > Two things here: > > 1) when we're pointing out that std::move on a constant object is >redundant, don't say "in return statement" when we aren't in a >return statement; > 2) suppress the warning when

Re: [PATCH] libstdc++: Implement ranges::cartesian_product_view from P2374R4

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Thu, 27 Oct 2022 at 19:48, Patrick Palka via Libstdc++ wrote: > > On Thu, 27 Oct 2022, Patrick Palka wrote: > > > This also implements the proposed resolutions of the tentatively ready > > LWG issues 3760 and 3761. > > > > I'm not sure how/if we should implement the recommended practice of: >

Re: [COMMITTED] Improve multiplication by powers of 2 in range-ops.

2022-11-07 Thread Aldy Hernandez via Gcc-patches
On Mon, Nov 7, 2022 at 8:59 PM Aldy Hernandez wrote: > > For unsigned numbers, multiplication by X, where X is a power of 2 is > [0,0][X,+INF]. > > This patch causes a regression to g++.dg/pr71488.C where > -Wstringop-overflow gets the same IL as before, but better ranges > cause it to issue a

Re: [PATCH RFC(libstdc++)] c++: implement P2468R2, the equality operator you are looking for

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 20:58, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. Jonathan, what do you want to do about the > library > test failure? > > -- >8 -- > > This paper is resolving the problem of well-formed C++17 code becoming > ambiguous in C++20 due to asymmetrical operator==

Re: [PATCH] Enable shrink wrapping for the RISC-V target.

2022-11-07 Thread Palmer Dabbelt
On Thu, 03 Nov 2022 15:23:28 PDT (-0700), j...@ventanamicro.com wrote: On 11/2/22 18:26, Palmer Dabbelt wrote: I also tried to remove that restriction but it looks like it can't work because we can't create pseudo-registers during shrink wrapping and shrink wrapping can't work either. I

[r13-3752 Regression] FAIL: gcc.dg/tree-ssa/pr107541.c execution test on Linux/x86_64

2022-11-07 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 3bff15c1c9fb3eb0bb042717e072476ec2d6d88c is the first bad commit commit 3bff15c1c9fb3eb0bb042717e072476ec2d6d88c Author: Aldy Hernandez Date: Mon Nov 7 08:40:12 2022 +0100 [range-op] Restrict division by power of 2 optimization to positive numbers. caused FAIL:

Re: [PATCH RFC(libstdc++)] c++: implement P2468R2, the equality operator you are looking for

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 22:49, Jason Merrill wrote: > > On 11/7/22 12:04, Jonathan Wakely wrote: > > On Mon, 7 Nov 2022 at 21:56, Jonathan Wakely wrote: > >> > >> On Mon, 7 Nov 2022 at 20:58, Jason Merrill wrote: > >>> > >>> Tested x86_64-pc-linux-gnu. Jonathan, what do you want to do about the

Re: [PATCH v2] Always use TYPE_MODE instead of DECL_MODE for vector field

2022-11-07 Thread H.J. Lu via Gcc-patches
On Mon, Oct 24, 2022 at 11:28 PM Richard Biener wrote: > > On Mon, Oct 24, 2022 at 10:02 PM H.J. Lu wrote: > > > > On Mon, Oct 24, 2022 at 12:12 AM Richard Biener > > wrote: > > > > > > On Fri, Oct 21, 2022 at 6:18 PM H.J. Lu wrote: > > > > > > > > On Fri, Oct 21, 2022 at 2:33 AM Richard

Re: [PATCH RFC(libstdc++)] c++: implement P2468R2, the equality operator you are looking for

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 21:56, Jonathan Wakely wrote: > > On Mon, 7 Nov 2022 at 20:58, Jason Merrill wrote: > > > > Tested x86_64-pc-linux-gnu. Jonathan, what do you want to do about the > > library > > test failure? > > > > -- >8 -- > > > > This paper is resolving the problem of well-formed

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 7 Nov 2022 at 19:13, Jakub Jelinek wrote: > > On Mon, Nov 07, 2022 at 05:48:42PM +, Jonathan Wakely wrote: > > On Mon, 7 Nov 2022 at 16:11, Joseph Myers wrote: > > > > > > On Wed, 2 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > > > > > > > APIs. So that one can build gcc against

[committed] bpf: cleanup missed refactor

2022-11-07 Thread David Faust via Gcc-patches
Commit 068baae1864 "bpf: add preserve_field_info builtin" factored out some repeated code to a new function maybe_make_core_relo (), but missed using it in one place. Clean that up. Regtested on bpf-unknown-none, pushed as obvious. gcc/ * config/bpf/bpf.cc (handle_attr_preserve): Use

Re: [PATCH RFC(libstdc++)] c++: implement P2468R2, the equality operator you are looking for

2022-11-07 Thread Jason Merrill via Gcc-patches
On 11/7/22 12:04, Jonathan Wakely wrote: On Mon, 7 Nov 2022 at 21:56, Jonathan Wakely wrote: On Mon, 7 Nov 2022 at 20:58, Jason Merrill wrote: Tested x86_64-pc-linux-gnu. Jonathan, what do you want to do about the library test failure? -- >8 -- This paper is resolving the problem of

[COMMITTED] Improve multiplication by powers of 2 in range-ops.

2022-11-07 Thread Aldy Hernandez via Gcc-patches
For unsigned numbers, multiplication by X, where X is a power of 2 is [0,0][X,+INF]. This patch causes a regression to g++.dg/pr71488.C where -Wstringop-overflow gets the same IL as before, but better ranges cause it to issue a bogus warning. I will create a PR with some notes. No discernible

Re: [RFA] gcc: fix PR rtl-optimization/107482

2022-11-07 Thread Vladimir Makarov via Gcc-patches
On 2022-11-07 04:46, Max Filippov wrote: gcc/ * ira-color.cc (update_costs_from_allocno): Check that allocno is in the consideration_allocno_bitmap before dereferencing ALLOCNO_COLOR_DATA (allocno). --- This fixes the invalid memory access, but I'm not sure if that's

[PATCH RFC(libstdc++)] c++: implement P2468R2, the equality operator you are looking for

2022-11-07 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu. Jonathan, what do you want to do about the library test failure? -- >8 -- This paper is resolving the problem of well-formed C++17 code becoming ambiguous in C++20 due to asymmetrical operator== being compared with itself in reverse. I had previously implemented a

[PATCH, v3] Fortran: ordering of hidden procedure arguments [PR107441]

2022-11-07 Thread Harald Anlauf via Gcc-patches
Dear all, Am 04.11.22 um 10:53 schrieb Mikael Morin: Le 03/11/2022 à 23:03, Harald Anlauf a écrit : I've spent some time not only staring at create_function_arglist, but trying several variations handling the declared hidden parms, and applying the necessary adjustments to

Re: [PATCH v2 1/3] libcpp: reject codepoints above 0x10FFFF

2022-11-07 Thread Jason Merrill via Gcc-patches
On 10/27/22 13:16, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. Signed-off-by: Ben Boeckel --- libcpp/ChangeLog | 6 ++ libcpp/charset.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libcpp/ChangeLog

Re: [PATCH] c++: Allow module name to be a single letter on Windows

2022-11-07 Thread Nathan Sidwell via Gcc-patches
On 11/3/22 11:06, Torbjorn SVENSSON wrote: On 2022-11-03 15:17, Nathan Sidwell wrote: On 10/28/22 05:15, Torbjörn SVENSSON wrote: On Windows, the ':' character is special and when the module name is a single character, like 'A', then the flatname would be (for example) 'A:Foo'. On Windows,

[PATCH] bpf: Use enum for resolved overloaded builtins

2022-11-07 Thread David Faust via Gcc-patches
Change several places in the eBPF backend dealing with overloaded built-in functions to consistently use the enum bpf_builtins type, rather than variously using integer constants or booleans. The result is eaiser to read and extend. Tested on bpf-unknown-none, no known regressions. OK to push?

Re: [PATCH] c++: Tweaks for -Wredundant-move [PR107363]

2022-11-07 Thread Jason Merrill via Gcc-patches
On 10/28/22 10:42, Marek Polacek wrote: Two things here: 1) when we're pointing out that std::move on a constant object is redundant, don't say "in return statement" when we aren't in a return statement; 2) suppress the warning when the std::move call was dependent, because removing

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Joseph Myers
On Mon, 7 Nov 2022, Jonathan Wakely wrote: > This seems to "fix" it (not sure if it's right though): > > #ifndef _GLIBCXX_HAVE_FLOAT128_MATH > extern "C" _Float128 __strtof128(const char*, char**) > __attribute__((__weak__)); > #endif > extern "C" _Float128 __strtof128(const char*, char**) >

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 07, 2022 at 05:48:42PM +, Jonathan Wakely wrote: > On Mon, 7 Nov 2022 at 16:11, Joseph Myers wrote: > > > > On Wed, 2 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > > > > > APIs. So that one can build gcc against older glibc and then compile > > > user programs on newer glibc,

  1   2   >