Re: [PATCH] Add statistics counting to PHI-OPT

2021-06-18 Thread Andrew Pinski via Gcc-patches
On Fri, Jun 11, 2021 at 12:51 AM Richard Biener via Gcc-patches wrote: > > On Fri, Jun 11, 2021 at 6:15 AM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > This should have been done before I started to work on connecting > > PHI-OPT to match-and-simplify to see quickly if

Re: Ping: [PATCH 1/2] correct BB frequencies after loop changed

2021-06-18 Thread guojiufu via Gcc-patches
On 2021-06-15 12:57, guojiufu via Gcc-patches wrote: On 2021-06-14 17:16, Jan Hubicka wrote: On 5/6/2021 8:36 PM, guojiufu via Gcc-patches wrote: > Gentle ping. > > Original message: > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555871.html I think you need a more aggressive ping  :

[PATCH] stor-layout: Don't create DECL_BIT_FIELD_REPRESENTATIVE for QUAL_UNION_TYPE [PR101062]

2021-06-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 16, 2021 at 09:45:17AM +0200, Jakub Jelinek via Gcc-patches wrote: > The following patch does create them, but treats all such bitfields as if > they were in a structure where the particular bitfield is the only field. While the patch passed bootstrap/regtest on the trunk, when trying

[Ada] GNAT.Compiler_Version and LTO

2021-06-18 Thread Pierre-Marie de Rodat
When mixing GNAT.Compiler_Version and LTO, a warning about a type mismatch between the import and export of __gnat_version is generated. Fixed by introducing a level of indirection. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * bindgen.adb (Gen_Output_File_Ada): Generate

[Ada] Update comments related to TBD

2021-06-18 Thread Pierre-Marie de Rodat
We use ??? when relevant, not TBD in GNAT comments Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb, exp_dist.adb, exp_unst.adb, sa_messages.ads, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_eval.adb, sem_util.adb, sem_util.ads, sinfo.ads: Update c

[Ada] Replace Opt.Extensions_Allowed by Ada_Version

2021-06-18 Thread Pierre-Marie de Rodat
Code cleanup: add a new value in Ada_Version_Type to represent the latest version of Ada with GNAT extensions instead of using a separate flag. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * fe.h, opt.adb, opt.ads, par-prag.adb, sem_prag.adb, switch-c.adb (Extension

[Ada] Implement basic support for -fdiagnostics-format=json

2021-06-18 Thread Pierre-Marie de Rodat
This commit implements basic support for the -fdiagnostics-format=json option that GCC has. When GNAT finds this argument in the command line, error messages such as: tmp.adb:4:12: "My_Var" is undefined Will be printed as: [ { "kind": "error", "locations": [ { "caret": {

[Ada] Do not clear Is_True_Constant flag on imported constants

2021-06-18 Thread Pierre-Marie de Rodat
The flag is first set on them as for any other constants but then cleared when the import pragma is processed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Process_Import_Or_Interface): Do not artificially record a possible modification for a constan

[Ada] Relax null exclusion mismatch check in Relaxed_RM_Semantics mode

2021-06-18 Thread Pierre-Marie de Rodat
This is useful for e.g. CodePeer usage. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Null_Exclusions_Match): Relax null exclusion mismatch check when Relaxed_RM_Semantics is set.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb --- a/gcc/ada/sem_

[Ada] Remove dead code for overlapping actuals in prefix notation

2021-06-18 Thread Pierre-Marie de Rodat
Detection of overlapping actuals doesn't need to be special-cased for prefix notation, because it is done after prefixed calls have been rewritten into ordinary calls, both in normal compilation and semantic checking mode (with switch -gnatc). Behaviour is unaffected; the removed code was dead. T

[Ada] New debug switch to disable large static aggregates

2021-06-18 Thread Pierre-Marie de Rodat
This patch adds the -gnatd_g switch, which lowers the threshold for computing static aggregates at compile time. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * debug.adb: Document switch. * exp_aggr.adb: If -gnatd_g was given, then do not bump the limit to 5

[Ada] Warn on 'in out' param containing access in private type

2021-06-18 Thread Pierre-Marie de Rodat
Normally the warnings: warning: formal parameter "..." is not modified warning: mode could be "in" instead of "in out" are disabled if the type contains components of an access type. A previous patch enabled such warnings if the only such components are in internal private types. This pa

[Ada] Fix asymmetries in detection of overlapping actuals

2021-06-18 Thread Pierre-Marie de Rodat
When detecting overlapping actuals we were only examining the type of the first formal parameter, so that errors and warnings were depending on the order of parameters. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_warn.adb (Warn_On_Overlapping_Actuals): Examine types

[Ada] Fix handling of gnat check/test commands

2021-06-18 Thread Pierre-Marie de Rodat
These days, gnat check should always call gnatcheck [--target=prefix], same for gnat test. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gnatcmd.adb: Fix handling of check and test commands.diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb --- a/gcc/ada/gnatcmd.adb ++

[Ada] Correct A'First (N) where N is an object name

2021-06-18 Thread Pierre-Marie de Rodat
This patch corrects a bug in A'First (N), where N is not a literal or named number -- the compiler would think N = 1, even when it is 2 or more. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Check_Array_Or_Scalar_Type): Use Expr_Value instead of Intva

[Ada] Warn about overlapping actuals in all versions of Ada

2021-06-18 Thread Pierre-Marie de Rodat
Overlapping actuals of elementary types are illegal since Ada 2012; all other overlapping actuals are now reported as warnings regardless of the Ada version (because they are equally suspicious). We even had a comment: "Overlap is only illegal in Ada 2012 in the case of elementary types (pass

[Ada] Missing check for assigning too-large array to fixed-lower-bound object

2021-06-18 Thread Pierre-Marie de Rodat
The compiler was failing to perform a check on a conversion of an array that has a length that exceeds the range of the index subtype of the target subtype of the conversion when the target subtype is an unconstrained array subtype with a fixed lower bound (FLB). The FLB array subtype's index range

[Ada] Error issued on string literal assigned to fixed-lower-bound array

2021-06-18 Thread Pierre-Marie de Rodat
The compiler incorrectly flags a string literal used to initialize an array object with a nominal fixed-lower-bound array subtype (and in other fixed-lower-bound sliding contexts). String literals will already be given proper bounds when in such contexts based on the applicable constraint, so no sl

[Ada] Fix inaccuracies in signal handler trampoline for aarch64-vxworks

2021-06-18 Thread Pierre-Marie de Rodat
Fix a couple of inaccuracies in the VxWorks signal handler trampoline for aarch64: - REGNO_PC_OFFSET, used as the cfi return column number, is better sync'ed with the back-end's DWARF_ALT_FRAME_RETURN_COLUMN. - R18 is used by VxWorks for internal purposes so is best left out of the CFI notes

[Ada] Remove AAMP from compiler sources

2021-06-18 Thread Pierre-Marie de Rodat
AAMP is no longer supported. This patch removes AAMP-specific code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ada_get_targ.adb, aspects.ads, checks.adb, cstand.adb, einfo.ads, exp_attr.adb, freeze.adb, get_targ.adb, libgnat/a-textio.ads, libgnat/g-memdu

[Ada] Premature freezing of types

2021-06-18 Thread Pierre-Marie de Rodat
GNAT was freezing prematurely any type referenced in a subprogram profile as part of freezing, regardless of the scope involved, causing premature freezing of types and therefore preventing declaration of additional primitive operations. This is now almost fully fixed. There is one remaining catch

[Ada] Avoid passing Enum_Lit'Size to the back end

2021-06-18 Thread Pierre-Marie de Rodat
Constant fold Enum_Lit'Size so the back end won't see it. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Eval_Attribute): For Enum_Lit'Size, use Enum_Type'Object_Size.diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb --- a/gcc/ada/sem_attr.adb +

[Ada] Make "gcc -gnatDGL" handle unterminated last lines properly

2021-06-18 Thread Pierre-Marie de Rodat
This patch fixes a bug in which "gcc -gnatDGL" raises an unhandled Constraint_Error in checks-on mode if the last line in the file is not terminated with a line terminator. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sprint.adb (Write_Source_Line): Check for EOF in

[Ada] Ada2020: AI12-0195 overriding class-wide pre/post conditions

2021-06-18 Thread Pierre-Marie de Rodat
This patch does not modify the functionality of the frontend; it ensures the correct decoration of wrappers of class-wide pre/post conditions required for AI12-0195. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * contracts.adb (Process_Spec_Postconditions): Add missing

[Ada] Fix detection of overlapping slices indexed by characters

2021-06-18 Thread Pierre-Marie de Rodat
Slices that denote the same objects can be indexed either by integer or character literals, but the latter was not detected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Denotes_Same_Object): Handle character literals just like integer literals.diff

[Ada] Additional error checking on index constraints with fixed-lower-bound ranges

2021-06-18 Thread Pierre-Marie de Rodat
Error checks are added to disallow index constraints given with a mixture of constrained and fixed-lower-bound ranges, and also to disallow an index constraint with a fixed-lower-bound index applied to a type or subtype with fixed-lower-bound indexes. Tested on x86_64-pc-linux-gnu, committed on tr

[Ada] Fix detection of overlapping actuals with renamings

2021-06-18 Thread Pierre-Marie de Rodat
Routine Denotes_Same_Object wrongly handled renamings of renamings. In a code like this: B : Integer renames A; C : Integer renames B; names "B" and "C" differ and their renamed object names "A" and "B" differ too. This patch rewrites this routine to literally follow the RM, which fixes the

ipa-modref: merge flags when adding escape

2021-06-18 Thread Alexandre Oliva
While working on some function splitting changes, I've got a miscompilation in stagefeedback that I've tracked down to a complicated scenario: - ipa-modref miscomputes a function parameter as having EAF_DIRECT, because it's dereferenced and passed on to another function, but add_escape_point d

[PATCH] Merge vec_addsub patterns

2021-06-18 Thread Richard Biener
This merges the vec_addsub3 patterns using a mode attribute for the vec_merge merge operand. Bootstrapped and tested on x86_64-unknown-linux-gnu. I'd appreciate an extra eye since this is the first time I'm doing such. OK as a followup to the addsub pattern renaming? Thanks, Richard. 2021-06-1

Re: [PATCH] stor-layout: Don't create DECL_BIT_FIELD_REPRESENTATIVE for QUAL_UNION_TYPE [PR101062]

2021-06-18 Thread Richard Biener
On Fri, 18 Jun 2021, Jakub Jelinek wrote: > On Wed, Jun 16, 2021 at 09:45:17AM +0200, Jakub Jelinek via Gcc-patches wrote: > > The following patch does create them, but treats all such bitfields as if > > they were in a structure where the particular bitfield is the only field. > > While the patc

Re: [EXTERNAL] Re: [PATCH] tree-optimization: Optimize division followed by multiply [PR95176]

2021-06-18 Thread Richard Biener via Gcc-patches
On Wed, Jun 16, 2021 at 8:49 PM Victor Tong wrote: > > Hi Richard, > > Thanks for the feedback. From what you said, I can think of two possible > solutions (though I'm not sure if either is feasible/fully correct): > > Option 1: Have the new X * (Y / X) --> Y - (Y % X) optimization only run in >

Re: [PATCH] Merge vec_addsub patterns

2021-06-18 Thread Uros Bizjak via Gcc-patches
On Fri, Jun 18, 2021 at 11:13 AM Richard Biener wrote: > > This merges the vec_addsub3 patterns using a mode attribute > for the vec_merge merge operand. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > I'd appreciate an extra eye since this is the first time I'm > doing such. The cal

Re: [PATCH] Merge vec_addsub patterns

2021-06-18 Thread Richard Biener
On Fri, 18 Jun 2021, Uros Bizjak wrote: > On Fri, Jun 18, 2021 at 11:13 AM Richard Biener wrote: > > > > This merges the vec_addsub3 patterns using a mode attribute > > for the vec_merge merge operand. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > > > I'd appreciate an extra ey

[committed] libstdc++: Suppress -Wstringop-overread warning in test

2021-06-18 Thread Jonathan Wakely via Gcc-patches
When compiled with -m32 -O2 -D_GLIBCXX_USE_CXX11_ABI=0 we get a warning for 21_strings/basic_string/cons/char/1.cc: bits/char_traits.h:409:56: warning: ‘void* __builtin_memcpy(void*, const void*, unsigned int)’ reading 1073741821 bytes from a region of size 19 [-Wstringop-overread] The warning

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Matthias Klose
On 6/18/21 12:26 AM, Gaius Mulley wrote: > > > Hello Richard, David, Matthias and GCC Steering Committee, > > here are a set of patches which merge the gm2 front end into the > GCC tree. The patches have been bootstrapped under aarch64 GNU/Linux > Debian Stretch using make -j 4, x86_64 GNU/Linu

[committed 2/2] libstdc++: Simplify constexpr checks in std::char_traits [PR 91488]

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On 17/06/21 22:45 +0100, Jonathan Wakely wrote: This removes the helper functions added by r8-1294 to detect whether the char_traits member functions can be evaluated at compile time. Instead, we can just use __builtin_constant_evaluated directly, which is well supported by non-GCC compilers by n

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-18 Thread Richard Biener via Gcc-patches
On Thu, Jun 17, 2021 at 4:43 PM Martin Sebor wrote: > > On 6/17/21 12:03 AM, Richard Biener wrote: > > On Wed, Jun 16, 2021 at 6:01 PM Martin Sebor wrote: > >> > >> On 6/16/21 6:46 AM, Richard Sandiford via Gcc-patches wrote: > >>> Richard Biener via Gcc-patches writes: > On Tue, Jun 15, 20

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Richard Biener
On Thu, 17 Jun 2021, Gaius Mulley wrote: > > > Hello Richard, David, Matthias and GCC Steering Committee, > > here are a set of patches which merge the gm2 front end into the > GCC tree. The patches have been bootstrapped under aarch64 GNU/Linux > Debian Stretch using make -j 4, x86_64 GNU/Lin

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-18 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 18, 2021 at 12:38:09PM +0200, Richard Biener via Gcc-patches wrote: > > Yes, as we discussed in the review below, vec is not a good model > > because (as you note again above) it's constrained by its legacy > > uses. The best I think we can do for it is to make it safer to > > use. > >

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Jun 2021 at 11:54, Jakub Jelinek wrote: > > On Fri, Jun 18, 2021 at 12:38:09PM +0200, Richard Biener via Gcc-patches > wrote: > > > Yes, as we discussed in the review below, vec is not a good model > > > because (as you note again above) it's constrained by its legacy > > > uses. The

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Jun 2021 at 12:03, Jonathan Wakely wrote: > > On Fri, 18 Jun 2021 at 11:54, Jakub Jelinek wrote: > > > > On Fri, Jun 18, 2021 at 12:38:09PM +0200, Richard Biener via Gcc-patches > > wrote: > > > > Yes, as we discussed in the review below, vec is not a good model > > > > because (as yo

[PATCH] tree-optimization/101112 - fix pattern stmt def lookup in SLP reassoc

2021-06-18 Thread Richard Biener
This fixes the lookup of a pattern stmt def operand. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-06-18 Richard Biener PR tree-optimization/101112 * tree-vect-slp.c (vect_slp_linearize_chain): Fix condition to lookup a pattern stmt def. --- gcc/tr

Re: [GCC][PATCH] arm: Fix multilib mapping for CDE extensions [PR100856].

2021-06-18 Thread Richard Earnshaw via Gcc-patches
On 14/06/2021 15:29, Srinath Parvathaneni via Gcc-patches wrote: Hi Richard, I have all addressed all your review comments (in [1]) in the below patch. On passing +cdecp[0-7] extension to the -march string in command line options, multilib linking is failing as mentioned in PR100856. This pa

Re: [GCC-11 backport][PATCH] arm: Fix the mve multilib for the broken cmse support (pr99939).

2021-06-18 Thread Richard Earnshaw via Gcc-patches
On 14/06/2021 11:34, Srinath Parvathaneni via Gcc-patches wrote: Hi, The current CMSE support in the multilib build for "-march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=auto" is broken as specified in PR99939 and this patch fixes the issue. Regression tested on arm-none-eabi and found no regre

Re: [GCC-10 backport][PATCH] arm: Fix the mve multilib for the broken cmse support (pr99939).

2021-06-18 Thread Richard Earnshaw via Gcc-patches
On 14/06/2021 11:34, Srinath Parvathaneni via Gcc-patches wrote: Hi, The current CMSE support in the multilib build for "-march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=auto" is broken as specified in PR99939 and this patch fixes the issue. Regression tested on arm-none-eabi and found no re

[PATCH] tree-optimization/101120 - fix compile-time issue with SLP groups

2021-06-18 Thread Richard Biener
This places two hacks to avoid an old compile-time issue when vectorizing large permuted SLP groups with gaps where we end up emitting loads and IV adjustments for the gap as well and those have quite a high cost until they are eventually cleaned up. The first hack is to fold the auto-inc style IV

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Segher Boessenkool
Hi Gaius, On Thu, Jun 17, 2021 at 11:26:41PM +0100, Gaius Mulley via Gcc-patches wrote: > here are a set of patches which merge the gm2 front end into the > GCC tree. I have looked through the patches in this email, and they all look good too me. (There are a few warnings about whitespace from "

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Segher Boessenkool
On Fri, Jun 18, 2021 at 12:52:41PM +0200, Richard Biener wrote: > So as suggested above please create a public branch off trunk where you > do the integration and keep it rebased on trunk regularly. It looks > like you do not have write access to the GCC repository, please > obtain that and make y

[committed] libstdc++: Replace incorrect static assertion in std::reduce [PR95833]

2021-06-18 Thread Jonathan Wakely via Gcc-patches
The standard does not require the iterator's value type to be convertible to the result type, it only requires that the result of dereferencing the iterator can be passed to the binary function. libstdc++-v3/ChangeLog: PR libstdc++/95833 * include/std/numeric (reduce(Iter, Iter, T

[PATCH 0/5] amdgcn: Improve TImode support

2021-06-18 Thread Julian Brown
This patch series extends TImode support for AMD GCN (see e.g. PR96306 and PR95730). This fixes several test failures that appear at present, and enables use of a 128-bit integer "omp_depend_kind" for OpenMP 5.0. Tested with offloading to AMD GCN. Further commentary on invididual patches. Thanks,

[PATCH 1/5] amdgcn: Use unsigned types for udivsi3/umodsi3 libgcc helper args/return

2021-06-18 Thread Julian Brown
This patch changes the argument and return types for the libgcc __udivsi3 and __umodsi3 helper functions for GCN to USItype instead of SItype. This is probably just cosmetic in practice. I can probably self-approve this, but I'll give Andrew Stubbs a chance to comment. Thanks, Julian 2021-06-18

[PATCH 2/5] amdgcn: Add [us]mulsi3_highpart SGPR alternatives & [us]mulsid3/muldi3 expanders

2021-06-18 Thread Julian Brown
This patch improves 64-bit multiplication for AMD GCN: patterns for unsigned and signed 32x32->64 bit multiplication have been added, and also 64x64->64 bit multiplication is now open-coded rather than calling a library function (which may be a win for code size as well as speed: the function calli

[PATCH 3/5] amdgcn: Add clrsbsi2/clrsbdi2 implementation

2021-06-18 Thread Julian Brown
This patch adds an open-coded implementation of the clrsb2 (count leading redundant sign bit) standard names using the GCN flbit_i* instructions for SImode and DImode. Those don't count exactly as we need, so we need a couple of other instructions to fix up the result afterwards. These patterns a

[PATCH 4/5] amdgcn: Enable support for TImode for AMD GCN

2021-06-18 Thread Julian Brown
This patch enables support for TImode for AMD GCN, the lack of which is currently causing a number of test failures for the target and which is also needed to support "omp_depend_kind" for OpenMP 5.0, since that is implemented as a 128-bit integer. Several libgcc support routines are built by defa

[PATCH 5/5] Fortran: Re-enable 128-bit integers for AMD GCN

2021-06-18 Thread Julian Brown
This patch reverts the part of Tobias's patch for PR target/96306 that disables 128-bit integer support for AMD GCN. OK for mainline (assuming the previous patches are in first)? Thanks, Julian 2021-06-18 Julian Brown libgfortran/ PR target/96306 * configure.ac: Remove stanz

Re: [PATCH] tree-optimization/101120 - fix compile-time issue with SLP groups

2021-06-18 Thread Richard Biener via Gcc-patches
On Fri, Jun 18, 2021 at 2:23 PM Richard Biener wrote: > > This places two hacks to avoid an old compile-time issue when > vectorizing large permuted SLP groups with gaps where we end up > emitting loads and IV adjustments for the gap as well and those > have quite a high cost until they are eventu

[PATCH, OpenMP 5.0] Improve OpenMP target support for C++ [PR92120 v4]

2021-06-18 Thread Chung-Lin Tang
Hi Jakub, this patch is the "v4" version of my PR92120 patch, v3 was here: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570886.html (there I listed the various patches from devel/omp/gcc-10 branch that was combined, which I won't repeat here). Basically this v4 adds fixes for lambda captu

Re: [PATCH 2/5] amdgcn: Add [us]mulsi3_highpart SGPR alternatives & [us]mulsid3/muldi3 expanders

2021-06-18 Thread Andrew Stubbs
On 18/06/2021 15:19, Julian Brown wrote: This patch improves 64-bit multiplication for AMD GCN: patterns for unsigned and signed 32x32->64 bit multiplication have been added, and also 64x64->64 bit multiplication is now open-coded rather than calling a library function (which may be a win for cod

Re: [PATCH 3/5] amdgcn: Add clrsbsi2/clrsbdi2 implementation

2021-06-18 Thread Andrew Stubbs
On 18/06/2021 15:19, Julian Brown wrote: This patch adds an open-coded implementation of the clrsb2 (count leading redundant sign bit) standard names using the GCN flbit_i* instructions for SImode and DImode. Those don't count exactly as we need, so we need a couple of other instructions to fix

Re: [PATCH 4/5] amdgcn: Enable support for TImode for AMD GCN

2021-06-18 Thread Andrew Stubbs
On 18/06/2021 15:19, Julian Brown wrote: This patch enables support for TImode for AMD GCN, the lack of which is currently causing a number of test failures for the target and which is also needed to support "omp_depend_kind" for OpenMP 5.0, since that is implemented as a 128-bit integer. Severa

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Gaius Mulley via Gcc-patches
Richard Biener writes: >> > I would suggest to not rush this in now during stage4 but instead >> > take the opportunity of this "quiet" phase to prepare an integration >> > branch with all the issues above sorted out which we can merge at >> > the beginning of stage1 for GCC 12 (or later during s

[PATCH] libstdc++: Implement LWG 3557 change to convertible_to

2021-06-18 Thread Patrick Palka via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/concepts (convertible_to): Just use declval as per LWG 3557. --- libstdc++-v3/include/std/concepts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libstdc++-v3/include/std/concepts b/libstdc++-v3/include/std/concepts in

Re: [PATCH 1/5] amdgcn: Use unsigned types for udivsi3/umodsi3 libgcc helper args/return

2021-06-18 Thread Andrew Stubbs
On 18/06/2021 15:19, Julian Brown wrote: This patch changes the argument and return types for the libgcc __udivsi3 and __umodsi3 helper functions for GCN to USItype instead of SItype. This is probably just cosmetic in practice. I can probably self-approve this, but I'll give Andrew Stubbs a chan

Re: [PATCH] libstdc++: Implement LWG 3557 change to convertible_to

2021-06-18 Thread Jonathan Wakely via Gcc-patches
OK, thanks. On Fri, 18 Jun 2021 at 16:13, Patrick Palka via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * include/std/concepts (convertible_to): Just use declval as per > LWG 3557. > --- > libstdc++-v3/include/std/concepts | 4 +--- > 1 file changed, 1 insertion(+), 3 deleti

[committed] analyzer: refactor custom_event, introducing precanned_custom_event class

2021-06-18 Thread David Malcolm via Gcc-patches
I have followup work where a custom event's description would be better handled via a vfunc rather that a precanned string, hence this refactoring to make it easy to add custom_event subclasses. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as 86606d2ab731a4b8dbbe1

[committed] analyzer: add region_model_manager::get_or_create_int_cst

2021-06-18 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as 1aff29d42601927a416a484d6c0fa37a25faae79. gcc/analyzer/ChangeLog: * region-model-manager.cc (region_model_manager::get_or_create_int_cst): New. (region_model_manager::maybe_undo_optimize_bit_f

[PATCH][GCC-10] arm: Fix multilib mapping for CDE extensions [PR100856].

2021-06-18 Thread Srinath Parvathaneni via Gcc-patches
Hi, This is a backport to gcc-10 and the patch applied cleanly on the branch. On passing +cdecp[0-7] extension to the -march string in command line options, multilib linking is failing as mentioned in PR100856. This patch fixes this issue by generating a separate canonical string by removing com

[PATCH][GCC-11] arm: Fix multilib mapping for CDE extensions [PR100856].

2021-06-18 Thread Srinath Parvathaneni via Gcc-patches
Hi, This is a backport to gcc-11 and the patch applied cleanly on the branch. On passing +cdecp[0-7] extension to the -march string in command line options, multilib linking is failing as mentioned in PR100856. This patch fixes this issue by generating a separate canonical string by removing com

RE: [GCC-10 backport][PATCH] arm: Fix polymorphic variants failing with undefined reference to `__ARM_undef` error.

2021-06-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 14 June 2021 11:35 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > > Subject: [GCC-10 backport][PATCH] arm: Fix polymorphic variants failing with > undefined reference to `__ARM_undef` error. > > Hi, >

RE: [GCC-11 backport][PATCH] arm: Fix polymorphic variants failing with undefined reference to `__ARM_undef` error.

2021-06-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 14 June 2021 11:35 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > > Subject: [GCC-11 backport][PATCH] arm: Fix polymorphic variants failing with > undefined reference to `__ARM_undef` error. > > Hi, >

RE: [PATCH][GCC-11] arm: Fix multilib mapping for CDE extensions [PR100856].

2021-06-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 18 June 2021 16:22 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > > Subject: [PATCH][GCC-11] arm: Fix multilib mapping for CDE extensions > [PR100856]. > > Hi, > > This is a backport to gcc-11 and the

RE: [PATCH][GCC-10] arm: Fix multilib mapping for CDE extensions [PR100856].

2021-06-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 18 June 2021 16:22 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > > Subject: [PATCH][GCC-10] arm: Fix multilib mapping for CDE extensions > [PR100856]. > > Hi, > > This is a backport to gcc-10 and the

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-06-18 Thread Antoni Boucher via Gcc-patches
Le vendredi 11 juin 2021 à 14:00 -0400, David Malcolm a écrit : > On Fri, 2021-06-11 at 08:15 -0400, Antoni Boucher wrote: > > Thank you for your answer. > > I attached the updated patch. > > BTW you (or possibly me) dropped the mailing lists; was that > deliberate? Oh, my bad. > > > > See my a

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-18 Thread Martin Sebor via Gcc-patches
On 6/18/21 4:38 AM, Richard Biener wrote: On Thu, Jun 17, 2021 at 4:43 PM Martin Sebor wrote: On 6/17/21 12:03 AM, Richard Biener wrote: On Wed, Jun 16, 2021 at 6:01 PM Martin Sebor wrote: On 6/16/21 6:46 AM, Richard Sandiford via Gcc-patches wrote: Richard Biener via Gcc-patches writes:

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-06-18 Thread David Malcolm via Gcc-patches
On Fri, 2021-06-18 at 11:55 -0400, Antoni Boucher wrote: > Le vendredi 11 juin 2021 à 14:00 -0400, David Malcolm a écrit : > > On Fri, 2021-06-11 at 08:15 -0400, Antoni Boucher wrote: > > > Thank you for your answer. > > > I attached the updated patch. > > > > BTW you (or possibly me) dropped the

[PATCH] AArch64: Add support for __builtin_roundeven[f] [PR100966]

2021-06-18 Thread Wilco Dijkstra via Gcc-patches
Enable __builtin_roundeven[f] by adding roundeven as an alias to the existing frintn support. Bootstrap OK and passes regress. ChangeLog: 2021-06-18 Wilco Dijkstra PR target/100966 * config/aarch64/aarch64.md (UNSPEC_FRINTR): Add. * config/aarch64/aarch64.c (aarch64_fr

Re: [PATCH] AArch64: Add support for __builtin_roundeven[f] [PR100966]

2021-06-18 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Enable __builtin_roundeven[f] by adding roundeven as an alias to the > existing frintn support. Although frint_pattern maps UNSPEC_FRINTN to "frintn", "frintn" doesn't mean anything to the target-independent part of the compiler. I assume it was just picked as a placehold

[committed] analyzer: fix issue with symbolic reads with concrete bindings

2021-06-18 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as 3bb85b868722e69aef0d37858c0dc3c88d92a0eb. gcc/analyzer/ChangeLog: * store.cc (binding_cluster::get_any_binding): Make symbolic reads from a cluster with concrete bindings return unknown. gcc/testsuit

[Patch, committed] PR fortran/101123 - [11/12 Regression] Invalid code for MAX0 with -fdefault-integer-8

2021-06-18 Thread Harald Anlauf via Gcc-patches
As confirmed in the PR by Jakub, there was a bad conversion of the result of min0/max0 to the result type. We should just unconditionally convert in all cases. As a benefit, this also fixes pr100283. Committed after regtesting. Thanks, Harald Fortran - fix conversion to result type for the min

Re: [PATCH] libstdc++: Reduce ranges::minmax/minmax_element comparison complexity

2021-06-18 Thread Patrick Palka via Gcc-patches
On Wed, 5 May 2021, Patrick Palka wrote: > On Wed, 5 May 2021, Patrick Palka wrote: > > > On Wed, 5 May 2021, Jonathan Wakely wrote: > > > > > On 04/05/21 21:42 -0400, Patrick Palka via Libstdc++ wrote: > > > > This rewrites ranges::minmax and ranges::minmax_element so that it > > > > performs a

[PATCH,rs6000] Fix p10 fusion regtests

2021-06-18 Thread Aaron Sawdey via Gcc-patches
From: Aaron Sawdey Update the count of matches for the fusion combine patterns after the recent changes to them. At Segher's request, used \m and \M in the match patterns. Also I have grouped together all alternatives of each fusion insn, which should hopefully make this test a little less fragi

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-06-18 Thread Antoni Boucher via Gcc-patches
I have write access now. I'm not sure how I'm supposed to send my patches: should I put it in personal branches and you'll merge them? And for the MAINTAINERS file, should I just push to master right away, after sending it to the mailing list? Thanks for your help! Le vendredi 18 juin 2021 à 12:

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-06-18 Thread David Malcolm via Gcc-patches
On Fri, 2021-06-18 at 15:41 -0400, Antoni Boucher wrote: > I have write access now. Great. > I'm not sure how I'm supposed to send my patches: > should I put it in personal branches and you'll merge them? Please send them to this mailing list for review; once they're approved you can merge them.

[PATCH] c++: conversion to base of vbase in NSDMI [PR80431]

2021-06-18 Thread Patrick Palka via Gcc-patches
The delayed processing of conversions to a virtual base inside an NSDMI assumes the target base type is a (possibly indirect) virtual base of the current class, but the target base type could also be an indirect non-virtual base inherited from a virtual base, as in the testcase below. Since such a

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-06-18 Thread Antoni Boucher via Gcc-patches
I'm sending the patch once again for review. As it's the first time I'll land a patch, I'm not sure what needs to be done when it's approved. Do I just commit it to the master branch directly? Thanks! Le vendredi 11 juin 2021 à 13:49 -0400, David Malcolm a écrit : > On Thu, 2021-05-27 at 21:22 -

PING [PATCH] PR fortran/100950 - ICE in output_constructor_regular_field, at varasm.c:5514

2021-06-18 Thread Harald Anlauf via Gcc-patches
*PING* > Gesendet: Mittwoch, 09. Juni 2021 um 23:39 Uhr > Von: "Harald Anlauf" > An: "fortran" , "gcc-patches" > Betreff: [PATCH] PR fortran/100950 - ICE in output_constructor_regular_field, > at varasm.c:5514 > > Dear Fortranners, > > we should be able to simplify the length of a substring wit

Re: [PATCH,rs6000] Fix p10 fusion regtests

2021-06-18 Thread Segher Boessenkool
Hi! On Fri, Jun 18, 2021 at 01:16:23PM -0500, Aaron Sawdey wrote: > Update the count of matches for the fusion combine patterns after > the recent changes to them. At Segher's request, used \m and \M > in the match patterns. Also I have grouped together all alternatives of > each fusion insn, whi

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-06-18 Thread David Malcolm via Gcc-patches
On Fri, 2021-06-18 at 16:42 -0400, Antoni Boucher wrote: > I'm sending the patch once again for review. > > As it's the first time I'll land a patch, I'm not sure what needs to be > done when it's approved. > Do I just commit it to the master branch directly? Commit (and push), yes, but... Pleas

[PATCH] Added myself to the MAINTAINERS file

2021-06-18 Thread Antoni Boucher via Gcc-patches
Hi. I pushed a patch adding myself to the maintainers file. From 93022946df2463ad49e3eaa2f6d43c47c16f31c0 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 18 Jun 2021 16:49:20 -0400 Subject: [PATCH] MAINTAINERS: Add myself for write after approval ChangeLog: 2021-06-18 Antoni Boucher

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Gaius Mulley via Gcc-patches
Segher Boessenkool writes: > Hi Gaius, > > On Thu, Jun 17, 2021 at 11:26:41PM +0100, Gaius Mulley via Gcc-patches wrote: >> here are a set of patches which merge the gm2 front end into the >> GCC tree. > > I have looked through the patches in this email, and they all look good > too me. (There a

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-06-18 Thread Antoni Boucher via Gcc-patches
Ok. Here's the patch with the updated subject and with format fixed. Le vendredi 18 juin 2021 à 16:54 -0400, David Malcolm a écrit : > On Fri, 2021-06-18 at 16:42 -0400, Antoni Boucher wrote: > > I'm sending the patch once again for review. > > > > As it's the first time I'll land a patch, I'm no

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-18 Thread Gaius Mulley via Gcc-patches
Matthias Klose writes: > > I checked that with a profiled lto build. The build succeeds with the > attached > patch to respect the parallel linking limitations, which you can configure > with > --enable-link-serialization=N > > However the build fails in the installation step with: > > [...] >

Re: [PATCH] libstdc++: Reduce ranges::minmax/minmax_element comparison complexity

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Jun 2021 at 18:44, Patrick Palka wrote: > > Ping; here's the same patch with the above comment corrected. > > -- >8 -- > > Subject: [PATCH] libstdc++: Reduce ranges::minmax/minmax_element comparison > complexity > > This rewrites ranges::minmax and ranges::minmax_element so that it > pe

[PATCH] tree-optimization/101014 - Remove poor value computations.

2021-06-18 Thread Andrew MacLeod via Gcc-patches
I am pleased to say that this patch kills the poor value computations in the ranger's cache. Its been a bit of a thorn, and is mostly a hack that was applied early on to enable getting some opportunities that were hard to get otherwise. The more consistent propagation we now do combined with

Re: [PATCH] libstdc++: Implement LWG 3546 changes to common_iterator

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Jun 2021 at 04:59, Patrick Palka via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * include/bits/stl_iterator.h > (__detail::__common_iter_use_postfix_proxy): Add > move_constructible constraint as LWG 3546. > (common_iterator::__postfix_proxy): Adjus

Re: [PATCH] libstdc++: Implement LWG 3555 changes to transform/elements_view

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Jun 2021 at 05:04, Patrick Palka via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * include/std/ranges (transform_view::_Iterator::_S_iter_concept): > Consider _Base instead of _Vp as per LWG 3555. > (elements_view::_Iterator::_S_iter_concept): Likewise. OK

Re: [PATCH 3/5] libstdc++: Rename views::split to views::lazy_split as per P2210

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Jun 2021 at 16:55, Patrick Palka via Libstdc++ wrote: > > This mostly mechanical patch performs the renaming part of P2210R3 > "Superior string splitting". It also defines _InnerIter::base() > overloads. > > libstdc++-v3/ChangeLog: > > * include/std/ranges: Rename views::split

Re: [PATCH 4/5] libstdc++: Implement resolution of LWG 3478 as per P2210

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Jun 2021 at 16:51, Patrick Palka via Libstdc++ wrote: > > This implements the part of P2210R2 "Superior String Splitting" that > resolves LWG 3478 for split_view (now named lazy_split_view). > > libstdc++-v3/ChangeLog: > > * include/std/ranges (lazy_split_view::_OuterIter::__at_

Re: [PATCH 5/5] libstdc++: Implement new views::split as per P2210

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Jun 2021 at 16:59, Patrick Palka via Libstdc++ wrote: > > This implements the new views::split as specified by P2210R2 "Superior > string splitting". > > libstdc++-v3/ChangeLog: > > * include/std/ranges (__non_propagating_cache::operator bool): > Define. > (split

Re: [PATCH] libstdc++: Implement LWG 3553 change to split_view

2021-06-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Jun 2021 at 05:01, Patrick Palka via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * include/std/ranges (split_view::_OuterIter::value_type::begin): > Remove the non-const overload, and remove the copyable constraint > on the const overload as per LWG 3553.

  1   2   >