[PATCH] c++: __builtin_clear_padding builtin C++ tail padding fix [PR88101]

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 16, 2020 at 10:13:52PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Sun, Nov 15, 2020 at 11:57:55PM -1200, Jakub Jelinek via Gcc-patches wrote: > > Tested on x86_64-linux, i686-linux and powerpc64-linux, ok for trunk? > > Here is an incremental patch that resolves the remaining

Re: [PATCH] plugins: Allow plugins to handle global_options changes

2020-11-18 Thread Richard Biener via Gcc-patches
On Wed, Nov 18, 2020 at 10:14 AM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > Reposting with self-contained description per Joseph's request: > > Any time somebody adds or removes an option in some *.opt file (which e.g. > on the 10 branch after branching off 11 happened 7 times already),

[PATCH] tree-optimization/97886 - deal with strange LC PHI nodes

2020-11-18 Thread Richard Biener
This makes vectorization properly assign vector types to PHI nodes that copy from externals on loop exit edges. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-11-18 Richard Biener PR tree-optimization/97886 * tree-vect-loop.c (vectorizable_lc_phi): Properly

PR97849: aarch64: ICE (segfault) during GIMPLE pass: ifcvt

2020-11-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, For the following test-case (slightly reduced from PR) int a, b, c; int g() { char i = 0; for (c = 0; c <= 8; c++) --i; while (b) { _Bool f = i <= 0; a = (a == 0) ? 0 : f / a; } } The compiler segfaults with -O1 -march=armv8.2-a+sve in ifcvt_local_dce. IIUC, the issue

Re: [PATCH] openmp: Retire nest-var ICV

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Thu, Nov 12, 2020 at 10:44:35PM +, Kwok Cheung Yeung wrote: > + /* OMP_NESTED is deprecated in OpenMP 5.0. */ > + if (parse_boolean ("OMP_NESTED", )) > + gomp_global_icv.max_active_levels_var = > + nested ? gomp_supported_active_levels : 1; Formatting - = should be

Re: Improve handling of memory operands in ipa-icf 4/4

2020-11-18 Thread Martin Liška
On 11/16/20 12:20 AM, Jan Hubicka wrote: This is controlled by -fipa-icf-alias-sets The patch drops too early, so we may end up processing function twice. Also if merging is not performed we lose code quality for no win (this is rare case). My original plan was to remember the mismatched

Re: [PATCH] recognize implied ranges for modulo.

2020-11-18 Thread Aldy Hernandez via Gcc-patches
On 11/17/20 11:01 PM, Andrew MacLeod wrote: PR 91029 observes when  a % b > 0 && b >= 0, then a has an implied range of  a >=0.  likewise Shouldn't that be && b > 0? b == 0 is undefined. a % b < 0 implies a range of a <= 0. This patch is a good example of how range-ops can be

[committed] libphobos: Merge upstream phobos 7948e0967.

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the libphobos library with upstream phobos 7948e0967, removing all deprecated functions from std.string module. Regression tested and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 7948e0967. ---

[PATCH] d: Fix a couple of ICEs found in the dmd front-end (PR97842)

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd b6a779e49, fixing two segmentation faults. One when encountering an incomplete static if, and another when resolving typeof() expressions whilst gagging is on. Bootstrapped and regression tested on x86_64-linux-gnu, committed

[PATCH] d: Fix LHS of array concatentation evaluated before the RHS.

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, In an array append expression: array ~= fun(array); The array in the left hand side of the expression was extended before evaluating the result of the right hand side, which resulted in the newly uninitialized array index being used before set. This fixes that so that the result of the

Re: [PATCH v5] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-11-18 Thread Segher Boessenkool
On Wed, Nov 18, 2020 at 08:31:28AM +0100, Richard Biener wrote: > On Tue, 17 Nov 2020, Jeff Law wrote: > > On 11/4/20 8:10 AM, Raoni Fassina Firmino via Gcc-patches wrote: > > > On Wed, Nov 04, 2020 at 10:35:03AM +0100, Richard Biener wrote: > > >>> +/* Expand call EXP to the fegetround builtin

openmp: Fix ICE on non-rectangular loop with known 0 iterations [PR97862]

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! The loops in the testcase are non-rectangular and have 0 iterations (the outer loop iterates, but the inner one never). In this case we just have the overall number of iterations computed (0), and don't have factor and other values computed. We never need to map logical iterations to the

Re: [Ada] Build support units for 128-bit integer types on 64-bit platforms

2020-11-18 Thread Matthias Klose
On 10/22/20 2:12 PM, Pierre-Marie de Rodat wrote: > This enables the build of the support units for 128-bit integer types > in the full runtime of 64-bit platforms. > > Tested on x86_64-pc-linux-gnu, committed on trunk > > gcc/ada/ > > * Makefile.rtl (64-bit platforms): Add

Re: Improve handling of memory operands in ipa-icf 3/4

2020-11-18 Thread Martin Liška
On 11/13/20 6:50 PM, Jan Hubicka wrote: Bootstrapped/regtested x86_64-linux. I plan to commit it on monday if there are no complains. Hello Honza. Thank you very much for the patch set. It's a nice improvement and it will eventually fix the WPA slowness caused by IPA ICF. I made some

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-18 Thread Martin Liška
On 11/16/20 1:21 PM, Richard Biener wrote: but the most trivial thing would be to feed the pass the balanced-tree generated by switch expansion where I would expect us to be able to detect it as the original switch again. Well, if we want to support such matching, then please deffer it to a

[PATCH] plugins: Allow plugins to handle global_options changes

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! Reposting with self-contained description per Joseph's request: Any time somebody adds or removes an option in some *.opt file (which e.g. on the 10 branch after branching off 11 happened 7 times already), many offsets in global_options variable change and so plugins that ever access GCC

[PATCH] configury: --enable-link-serialization support

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! Reposting with self-contained description per Joseph's request: When performing LTO bootstraps, especially when using tmpfs for /tmp, one can run a machine to halt when using higher levels of parallelism and a large number of FEs, because there are too many concurrent LTO link commands

C++ patch ping^2

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! I'd like to ping the updated bit_cast patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557781.html Thanks Jakub

[committed][GCC-10 backport] d: Fix undefined template references with circular module imports

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports r11-4424 to GCC-10, as it fixes a critical link-time error that occurred whilst bootstrapping the D implementation of the DMD front-end. Regression tested on x86_64-linux-gnu and committed to branch. Regards Iain --- gcc/d/ChangeLog: * dmd/dtemplate.c

[committed][GCC-10 backport] d: Explicitly determine which built-in copysign function to call.

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports r11-4980 to GCC-10, as it fixes an ICE that could occur on some targets. Regression tested on x86_64-linux-gnu and committed to branch. Regards Iain --- gcc/d/ChangeLog: * intrinsics.cc (expand_intrinsic_copysign): Explicitly determine which built-in

Re: [Patch] Fortran: cleanup OpenMP's OMP_LIST_* handling

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 16, 2020 at 03:08:36PM +0100, Tobias Burnus wrote: > as discussed the other day (I think via IRC or in a patch review), > omp_list_clauses > did grow quite a bit: it has 26 entries and I am about to add two > more. > > This variable is used as: > typedef struct gfc_omp_clauses > {

Re: [Patch] varasm.c: Always output flags in merged .section for LLVM assembler compatibility [PR97827]

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 18, 2020 at 12:51:02PM +0100, Tobias Burnus wrote: > As noted by Matthias when bootstrapping with AMD GCN support [PR97827]: > Assembler source code generated by GCC might no longer assembly with > LLVM's 'mc' since LLVM 11. > > The reason is that GCC generates on purpose first the

[Patch] testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN

2020-11-18 Thread Tobias Burnus
At least here newlib is build without HAVE_POSIX / 'posix' subdirectory and, hence, among others without 'usleep'. For nvptx, the same issue exists – and there 'omp declare variant' is used to call a burn-cycles loop as replacement. Affects target-32.c and thread-limit-2.c. OK? Tobias

Re: [PATCH 1/5] testsuite: Fix vect/vect-sdiv-pow2-1.c

2020-11-18 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, Nov 17, 2020 at 2:02 PM Richard Sandiford > wrote: >> >> Richard Biener via Gcc-patches writes: >> > On Tue, Nov 17, 2020 at 12:24 PM Richard Sandiford via Gcc-patches >> > wrote: >> >> >> >> We're now able to vectorise the set-up loop: >> >> >> >> int p

preprocessor: Add support for header unit translation

2020-11-18 Thread Nathan Sidwell
This adds preprocessor support for header units. Every #include directive needs to go through the include-translation hook to determine if it is to be treated as 'import $file;'. This is that code. when include translation occurs, the hook creates a buffer containing the translation. We

Re: [PATCH 1/X] libsanitizer: Tie the hwasan library into our build system

2020-11-18 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > This patch tries to tie libhwasan into the GCC build system in the same way > that the other sanitizer runtime libraries are handled. > > libsanitizer/ChangeLog: > > * Makefile.am: Build libhwasan. > * Makefile.in: Build libhwasan. > *

Re: [32/32] fixinclude

2020-11-18 Thread Nathan Sidwell
This is what I've pushed. This fixes an ODR violation in the AIX headers that is detected by C++ modules. While unnamed structs with typedef names for linkage purposes are accepted, this case is an anonymous struct without such a typedef name -- the typedef is attached to the pointer-to-struct

Re: [PATCH] configury: --enable-link-serialization support

2020-11-18 Thread Joseph Myers
On Wed, 18 Nov 2020, Jakub Jelinek via Gcc-patches wrote: > Bootstrapped/regtested again last night on x86_64-linux and i686-linux, ok > for trunk? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] openmp: Retire nest-var ICV

2020-11-18 Thread Kwok Cheung Yeung
On 18/11/2020 11:41 am, Jakub Jelinek wrote: On Thu, Nov 12, 2020 at 10:44:35PM +, Kwok Cheung Yeung wrote: + /* OMP_NESTED is deprecated in OpenMP 5.0. */ + if (parse_boolean ("OMP_NESTED", )) + gomp_global_icv.max_active_levels_var = + nested ?

[PATCH] options, lto: Optimize streaming of optimization nodes

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! Reposting with self-contained description per Joseph's request: Honza mentioned that especially for the new param machinery, most of streamed values are probably going to be the default values. Perhaps somehow we could stream them more effectively. This patch implements it and brings

Re: [PATCH] plugins: Allow plugins to handle global_options changes

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 18, 2020 at 10:39:46AM +0100, Richard Biener wrote: > We already have --{enable,disable}-plugin, so could remove it when > those are not enabled. Here is a variant that does that: 2020-11-18 Jakub Jelinek * opts.h (struct cl_var): New type. (cl_vars): Declare.

[Patch] varasm.c: Always output flags in merged .section for LLVM assembler compatibility [PR97827]

2020-11-18 Thread Tobias Burnus
As noted by Matthias when bootstrapping with AMD GCN support [PR97827]: Assembler source code generated by GCC might no longer assembly with LLVM's 'mc' since LLVM 11. The reason is that GCC generates on purpose first the section with the flags, e.g. (via mergeable_constant_section) .section

Re: [Ada] Build support units for 128-bit integer types on 64-bit platforms

2020-11-18 Thread Eric Botcazou
> that broke the build of an ada cross compiler targeting > powerpc64le-linux-gnu. target_cpu is powerpc64le which is not matched by > the Makefile logic. > > Ok for the trunk? > > PR ada/97859 > * Makefile.rtl (powerpc% linux%): Also match powerpc64le cpu. Yes, thanks. -- Eric

Re: [PATCH] plugins: Allow plugins to handle global_options changes

2020-11-18 Thread Joseph Myers
On Wed, 18 Nov 2020, Jakub Jelinek via Gcc-patches wrote: > On Wed, Nov 18, 2020 at 10:39:46AM +0100, Richard Biener wrote: > > We already have --{enable,disable}-plugin, so could remove it when > > those are not enabled. > > Here is a variant that does that: > > 2020-11-18 Jakub Jelinek >

New Chinese (traditional) PO file for 'gcc' (version 10.2.0)

2020-11-18 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Chinese (traditional) team of translators. The file is available at: https://translationproject.org/latest/gcc/zh_TW.po (This file,

Re: [PATCH 2/X] libsanitizer: Only build libhwasan when targeting AArch64

2020-11-18 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > Though the library has limited support for x86, we don't have any > support for generating code targeting x86 so there is no point building > for that target. > > Ensure we build for AArch64 but not for AArch64 ilp32. > > libsanitizer/ChangeLog: > > *

preprocessor: C++ module-directives

2020-11-18 Thread Nathan Sidwell
C++20 modules introduces a new kind of preprocessor directive -- a module directive. These are directives but without the leading '#'. We have to detect them by sniffing the start of a logical line. When detected we replace the initial identifiers with unspellable tokens and pass them through

Re: [PATCH] openmp: Retire nest-var ICV

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 18, 2020 at 07:05:19PM +, Kwok Cheung Yeung wrote: > From a75481979c86aa1da5b5da641fc776bc71d156f7 Mon Sep 17 00:00:00 2001 > From: Kwok Cheung Yeung > Date: Wed, 18 Nov 2020 10:02:00 -0800 > Subject: [PATCH] openmp: Retire nest-var ICV for OpenMP 5.1 > > This removes the

Re: [PATCH] PowerPC: Restrict long double test to use IBM long double.

2020-11-18 Thread Segher Boessenkool
Hi! On Sun, Nov 15, 2020 at 12:23:50PM -0500, Michael Meissner wrote: > --- a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c > +++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c > @@ -1,4 +1,5 @@ > /* { dg-skip-if "" { ! "powerpc*-*-linux*" } } */ > +/* { dg-require-effective-target

Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/17/20 12:57 AM, Richard Biener via Gcc-patches wrote: > On Tue, Nov 17, 2020 at 3:19 AM Eugene Rozenfeld > wrote: >> Thank you for the review Richard! >> >> I re-worked the patch based on your suggestions (attached). >> I made the change to reuse the first bit_xor in both patterns and I

Re: [PATCH 3/X] libsanitizer: Add option to bootstrap using HWASAN

2020-11-18 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > This is an analogous option to --bootstrap-asan to configure. It allows > bootstrapping GCC using HWASAN. > > For the same reasons as for ASAN we have to avoid using the HWASAN > sanitizer when compiling libiberty and the lto-plugin. > > Also add a function to query

Re: [AArch64] Add --with-tune configure flag

2020-11-18 Thread Pop, Sebastian via Gcc-patches
Hi, On 11/18/20, 10:17 AM, "Wilco Dijkstra" wrote: >I presume you're trying to unify the --with- options across most targets? Yes, my intention was to provide the same configure options on arm64 as on x86, such that projects that already use those options can change cpu name to

Re: [PATCH 4/X] libsanitizer: options: Add hwasan flags and argument parsing

2020-11-18 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index > 5320e6c1e1e3c8d1482c20590049f763e11f8ff0..84050058be8eaa306b07655737e49ea8b6eb21a9 > 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -13709,6 +13709,53 @@ is greater or equal to this

Re: [PATCH] c++: Allow template lambdas without lambda-declarator [PR97839]

2020-11-18 Thread Marek Polacek via Gcc-patches
On Tue, Nov 17, 2020 at 01:05:20PM -0500, Marek Polacek via Gcc-patches wrote: > Our implementation of template lambdas incorrectly requires the optional > lambda-declarator. This was probably required by an early draft of > generic lambdas, but now the production is [expr.prim.lambda.general]: >

Re: [PATCH] options, lto: Optimize streaming of optimization nodes

2020-11-18 Thread Joseph Myers
On Wed, 18 Nov 2020, Jakub Jelinek via Gcc-patches wrote: > Hi! > > Reposting with self-contained description per Joseph's request: > > Honza mentioned that especially for the new param machinery, most of > streamed values are probably going to be the default values. Perhaps > somehow we could

Re: PR97849: aarch64: ICE (segfault) during GIMPLE pass: ifcvt

2020-11-18 Thread Richard Biener
On Wed, 18 Nov 2020, Prathamesh Kulkarni wrote: > Hi, > For the following test-case (slightly reduced from PR) > int a, b, c; > > int g() { > char i = 0; > for (c = 0; c <= 8; c++) > --i; > > while (b) { > _Bool f = i <= 0; > a = (a == 0) ? 0 : f / a; > } > } > > The

[PATCH] libstdc++: Fix ranges::join_view::_Iterator::operator-> [LWG 3500]

2020-11-18 Thread Patrick Palka via Gcc-patches
This applies the proposed resolution of LWG 3500, which corrects the return type and constraints of this member function to use the right iterator type. Additionally, a nearby local variable is uglified. Tested on x86_64-pc-linux-gnu, does this look OK for trunk and the 10 branch?

Re: [Patch] varasm.c: Always output flags in merged .section for LLVM assembler compatibility [PR97827]

2020-11-18 Thread Richard Biener via Gcc-patches
On Wed, Nov 18, 2020 at 1:04 PM Jakub Jelinek via Gcc-patches wrote: > > On Wed, Nov 18, 2020 at 12:51:02PM +0100, Tobias Burnus wrote: > > As noted by Matthias when bootstrapping with AMD GCN support [PR97827]: > > Assembler source code generated by GCC might no longer assembly with > > LLVM's

Re: [PATCH] libstdc++: Fix ranges::join_view::_Iterator::operator-> [LWG 3500]

2020-11-18 Thread Jonathan Wakely via Gcc-patches
On 18/11/20 09:10 -0500, Patrick Palka via Libstdc++ wrote: This applies the proposed resolution of LWG 3500, which corrects the return type and constraints of this member function to use the right iterator type. Additionally, a nearby local variable is uglified. Tested on x86_64-pc-linux-gnu,

Re: [PATCH] recognize implied ranges for modulo.

2020-11-18 Thread Andrew MacLeod via Gcc-patches
On 11/18/20 3:35 AM, Aldy Hernandez wrote: On 11/17/20 11:01 PM, Andrew MacLeod wrote: PR 91029 observes when   a % b > 0 && b >= 0, then a has an implied range of  a >=0.  likewise Shouldn't that be && b > 0?  b == 0 is undefined. If you were folding, sure, but  I think its OK for

Re: [PATCH] AArch64: Add cost table for Cortex-A76

2020-11-18 Thread Richard Earnshaw via Gcc-patches
On 18/11/2020 14:55, Wilco Dijkstra via Gcc-patches wrote: > Add an initial cost table for Cortex-A76 - this is copied from > cotexa57_extra_costs but updates it based on the Optimization Guide. > Use the new cost table on all Neoverse tunings and ensure the tunings > are consistent for all. As a

Re: [Patch] testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 18, 2020 at 01:58:58PM +0100, Tobias Burnus wrote: > At least here newlib is build without HAVE_POSIX / 'posix' subdirectory > and, hence, among others without 'usleep'. > > For nvptx, the same issue exists – and there 'omp declare variant' is used > to call a burn-cycles loop as

preprocessor: Update mkdeps for modules

2020-11-18 Thread Nathan Sidwell
This is slightly different to the original patch I posted. This adds separate module target and dependency functions (rather than a single bi-modal function). libcpp/ * include/cpplib.h (struct cpp_options): Add modules to dep-options. * include/mkdeps.h

PING^5 [PATCH] Use the section flag 'o' for __patchable_function_entries

2020-11-18 Thread H.J. Lu via Gcc-patches
On Sat, Nov 7, 2020 at 7:47 AM H.J. Lu wrote: > > On Sat, Oct 31, 2020 at 5:01 AM H.J. Lu wrote: > > > > On Fri, Oct 23, 2020 at 5:41 AM H.J. Lu wrote: > > > > > > On Fri, Oct 2, 2020 at 6:00 AM H.J. Lu wrote: > > > > > > > > On Thu, Feb 6, 2020 at 6:57 PM H.J. Lu wrote: > > > > > > > > > >

Re: [AArch64] Add --with-tune configure flag

2020-11-18 Thread Wilco Dijkstra via Gcc-patches
Hi Sebastian, I presume you're trying to unify the --with- options across most targets? That would be very useful! However there are significant differences between targets in how they interpret options like --with-arch=native (or -march). So those differences also need to be looked at and fixed

[PATCH] AArch64: Add cost table for Cortex-A76

2020-11-18 Thread Wilco Dijkstra via Gcc-patches
Add an initial cost table for Cortex-A76 - this is copied from cotexa57_extra_costs but updates it based on the Optimization Guide. Use the new cost table on all Neoverse tunings and ensure the tunings are consistent for all. As a result more compact code is generated with more combined shift+alu

[COMMITTED] Patch fixing PR97870

2020-11-18 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97870 The patch was successfully bootstrapped and tested on x86-64. [PR97870] LRA: don't remove asm goto, just nullify it. gcc/ 2020-11-18 Vladimir Makarov PR target/97870

Re: [PATCH] Include math.h in nextafter-2.c test.

2020-11-18 Thread will schmidt via Gcc-patches
On Wed, 2020-11-18 at 00:55 -0500, Michael Meissner wrote: > On Tue, Nov 17, 2020 at 11:33:23PM -0600, will schmidt wrote: > > On Sun, 2020-11-15 at 12:12 -0500, Michael Meissner via Gcc-patches > > wrote: > > > Include math.h in nextafter-2.c test. > > > > > > I previously posted this with two

Re: [PATCH] PowerPC: Restrict long double test to use IBM long double.

2020-11-18 Thread will schmidt via Gcc-patches
On Wed, 2020-11-18 at 01:03 -0500, Michael Meissner wrote: > On Tue, Nov 17, 2020 at 11:33:29PM -0600, will schmidt wrote: > > On Sun, 2020-11-15 at 12:23 -0500, Michael Meissner via Gcc-patches > > wrote: > > > PowerPC: Restrict long double test to use IBM long double. > > > > > > I posted this

Re: Improve handling of memory operands in ipa-icf 3/4

2020-11-18 Thread Jan Hubicka
> On 11/13/20 6:50 PM, Jan Hubicka wrote: > > Bootstrapped/regtested x86_64-linux. I plan to commit it on monday if there > > are > > no complains. > > Hello Honza. > > Thank you very much for the patch set. > It's a nice improvement and it will eventually fix the WPA slowness caused by > IPA

Re: [PATCH] AArch64: Improve inline memcpy expansion

2020-11-18 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra via Gcc-patches writes: >>> +  || (size <= (max_copy_size / 2) >>> +  && (aarch64_tune_params.extra_tuning_flags >>> +  & AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS))) >>> +    copy_bits = GET_MODE_BITSIZE (TImode); >> >> (Looks like the mailer has eaten some tabs here.) > > The

Re: [PATCH] PR 83938 Reduce memory consumption in stable_sort/inplace_merge

2020-11-18 Thread François Dumont via Gcc-patches
Gentle reminder now that we are in stage 3 ? On 24/06/20 7:39 pm, Jonathan Wakely wrote: On 11/06/20 08:32 +0200, François Dumont via Libstdc++ wrote: As we are on patching algos we still have this old one.     From the original patch I only kept the memory optimization part as the new

[pushed] Objective-C++ : Avoid ICE on invalid with empty attributes.

2020-11-18 Thread Iain Sandoe
Hi Empty prefix attributes like: __attribute__ (()) @interface MyClass @end cause an ICE at present. Check for that case and skip them. tested on x86_64-darwin, pushed to master, thanks Iain gcc/cp/ChangeLog: * parser.c (cp_parser_objc_valid_prefix_attributes): Check for

[committed] analyzer: only use CWE-690 for unchecked return value [PR97893]

2020-11-18 Thread David Malcolm via Gcc-patches
CWE-690 is only for dereferencing an unchecked return value; for other kinds of NULL dereference, use the parent classification, CWE-476. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-5148-gf3f312b535f57b5773953746f6ad0d890ce09b88. gcc/analyzer/ChangeLog:

Re: [PATCH, rs6000] Add Power10 scheduling description

2020-11-18 Thread Pat Haugen via Gcc-patches
On 11/17/20 10:31 PM, will schmidt wrote: > On Fri, 2020-11-13 at 16:04 -0600, Pat Haugen via Gcc-patches wrote: >> +(define_automaton "power10dsp,power10issue,power10div") >> + >> +; Decode/dispatch slots >> +(define_cpu_unit "du0_power10,du1_power10,du2_power10,du3_power10, >> +

Re: [PATCH] lto: Fix typo in comment of gcc/lto/lto-symtab.c

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/14/20 3:18 AM, Jerry Clcanny via Gcc-patches wrote: > Hi, thanks for reviewing this patch. This patch just change a typo in > comment of gcc/lto/lto-symtab.c. The original comment is "because after > removing one of duplicate decls the hash is not correcly updated to the > ohter

Re: [PATCH v1 1/2] Simplify shifts wider than the bitwidth of types

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/17/20 9:58 AM, Jakub Jelinek wrote: > On Tue, Nov 17, 2020 at 09:54:46AM -0700, Jeff Law wrote: >>> So, e.g. if we had __builtin_warning (dunno where Martin S. is with that), >>> we could e.g. queue a __builtin_warning and add __builtin_unreachable (or >>> other possibilities), or e.g.

Re: [PATCH] pru: Add builtins for HALT and LMBD

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/13/20 1:07 PM, Dimitar Dimitrov wrote: > Add builtins for HALT and LMBD, per Texas Instruments document > SPRUHV7C. Use the new LMBD pattern to define an expand for clz. > > Binutils [1] and sim [2] support for LMBD instruction are merged now. > > [1]

Re: [PATCH] Include math.h in nextafter-2.c test.

2020-11-18 Thread Segher Boessenkool
On Sun, Nov 15, 2020 at 12:12:34PM -0500, Michael Meissner wrote: > --- a/gcc/testsuite/gcc.dg/nextafter-2.c > +++ b/gcc/testsuite/gcc.dg/nextafter-2.c > @@ -6,6 +6,18 @@ > > #include > > +/* In order to run on systems like the PowerPC that have 3 different long > + double types, include

Re: [committed] libstdc++: Use custom timespec in system calls [PR 93421]

2020-11-18 Thread Mike Crowe via Gcc-patches
On Wednesday 18 November 2020 at 20:22:53 +, Jonathan Wakely wrote: > On 18/11/20 00:01 +, Jonathan Wakely wrote: > > On 14/11/20 14:23 +, Jonathan Wakely wrote: > > > On Sat, 14 Nov 2020, 13:30 Mike Crowe wrote: > > > > > @@ -195,7 +205,7 @@ namespace > > > > > if

[PATCH] libstdc++: Fix detection of intrinsics for __GNUC__ < 11

2020-11-18 Thread Jonathan Wakely via Gcc-patches
The previous code would never use __is_identifier and __is_builtin for a compiler that defines __GNU_C__ >= 7. A hypothetical compiler that supports __is_identifier and __is_builtin might define __GNUC__ to 8 and therefore the macros for BUILTIN_IS_CONSTANT_EVALUATED and BUILTIN_IS_SAME would not

Re: Ping: [PATCH] Ensure colorization doesn't corrupt multibyte sequences in diagnostics

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/14/20 1:33 PM, Lewis Hyatt wrote: > On Fri, Nov 13, 2020 at 5:27 PM Jeff Law wrote: >> >> On 1/14/20 5:05 PM, Lewis Hyatt wrote: >>> Hello- >>> >>> I thought I might ping this short patch please, just in case it may >>> make sense to include in GCC 10 along with the other UTF-8-related

[committed] vrp: Fix operator_trunc_mod::op1_range [PR97888]

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the PR, in (x % y) >= 0 && y >= 0, we can't deduce x's range to be x >= 0, as e.g. -7 % 7 is 0. But we can deduce it from (x % y) > 0. The patch also fixes up the comments. Bootstrapped/regtested on x86_64-linux and i686-linux, preapproved in the PR by Andrew, committed to

Re: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.

2020-11-18 Thread Segher Boessenkool
Hi! On Sun, Nov 15, 2020 at 12:17:47PM -0500, Michael Meissner wrote: > --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c > @@ -9,9 +9,11 @@ > 128-bit floating point, because the type is not enabled on those > systems. */ > #define

[PATCH] tighten up attribute access validation (PR 97879)

2020-11-18 Thread Martin Sebor via Gcc-patches
The access attribute handler doesn't check to make sure the mode argument is an identifier and readily accepts string arguments which are assumed to be the condensed internal representation the user attribute is translated to. This can cause all sorts of unintended behavior when the user

[PATCH] c, tree: Fix ICE from get_parm_array_spec [PR97860]

2020-11-18 Thread Jakub Jelinek via Gcc-patches
Hi! The C and C++ FEs handle zero sized arrays differently, C uses NULL TYPE_MAX_VALUE on non-NULL TYPE_DOMAIN on complete ARRAY_TYPEs with bitsize_zero_node TYPE_SIZE, while C++ FE likes to set TYPE_MAX_VALUE to the largest value (and min to the lowest). Martin has used array_type_nelts in

Re: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.

2020-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 18, 2020 at 03:43:20PM -0600, Segher Boessenkool wrote: > Hi! > > On Sun, Nov 15, 2020 at 12:17:47PM -0500, Michael Meissner wrote: > > --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c > > +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c > > @@ -9,9 +9,11 @@ > > 128-bit floating

Re: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.

2020-11-18 Thread Segher Boessenkool
On Wed, Nov 18, 2020 at 10:53:49PM +0100, Jakub Jelinek wrote: > On Wed, Nov 18, 2020 at 03:43:20PM -0600, Segher Boessenkool wrote: > > Hi! > > > > On Sun, Nov 15, 2020 at 12:17:47PM -0500, Michael Meissner wrote: > > > --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c > > > +++

Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-18 Thread David Edelsohn via Gcc-patches
On Wed, Nov 4, 2020 at 11:44 AM Carl Love wrote: > > David: > > I have reworked the patch moving the new vector instruction patterns to > vsx.md. Also, cleaned up the vector division instructions. The > div3 pattern definitions are the only ones that should be > defined. > > I have retested the

Re: [committed] libstdc++: Use custom timespec in system calls [PR 93421]

2020-11-18 Thread Jonathan Wakely via Gcc-patches
On 18/11/20 00:01 +, Jonathan Wakely wrote: On 14/11/20 14:23 +, Jonathan Wakely wrote: On Sat, 14 Nov 2020, 13:30 Mike Crowe wrote: @@ -195,7 +205,7 @@ namespace if (__s.count() < 0) [[unlikely]] return false; - struct timespec rt; +

Re: [PATCH] RFC: add "deallocated_by" attribute for use by analyzer

2020-11-18 Thread David Malcolm via Gcc-patches
On Mon, 2020-11-16 at 17:49 -0700, Martin Sebor wrote: > On 11/13/20 2:44 PM, Jeff Law via Gcc-patches wrote: > > On 10/5/20 5:12 PM, David Malcolm via Gcc-patches wrote: > > > This work-in-progress patch generalizes the malloc/free problem- > > > checking > > > in -fanalyzer so that it can work

Re: [PATCH v5] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/18/20 12:31 AM, Richard Biener wrote: > On Tue, 17 Nov 2020, Jeff Law wrote: > >> >> On 11/4/20 8:10 AM, Raoni Fassina Firmino via Gcc-patches wrote: >>> On Wed, Nov 04, 2020 at 10:35:03AM +0100, Richard Biener wrote: > +/* Expand call EXP to the fegetround builtin (from C99 fenv.h),

Re: [PATCH] tighten up attribute access validation (PR 97879)

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/18/20 3:41 PM, Martin Sebor via Gcc-patches wrote: > The access attribute handler doesn't check to make sure the mode > argument is an identifier and readily accepts string arguments > which are assumed to be the condensed internal representation > the user attribute is translated to. 

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

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/18/20 12:28 AM, Richard Biener wrote: > On Tue, 17 Nov 2020, Jeff Law wrote: > >> Minor questions for Jan and Richi embedded below... >> >> On 10/9/20 4:12 AM, guojiufu via Gcc-patches wrote: >>> When investigating the issue from >>>

Re: [PATCH] RFC: add "deallocated_by" attribute for use by analyzer

2020-11-18 Thread Martin Sebor via Gcc-patches
On 11/18/20 1:41 PM, David Malcolm wrote: On Mon, 2020-11-16 at 17:49 -0700, Martin Sebor wrote: On 11/13/20 2:44 PM, Jeff Law via Gcc-patches wrote: On 10/5/20 5:12 PM, David Malcolm via Gcc-patches wrote: This work-in-progress patch generalizes the malloc/free problem- checking in

Re: [PATCH] [libiberty] Fix write buffer overflow in cplus_demangle

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/14/20 6:08 AM, Tim Rühsen wrote: > Hey, > > On 13.11.20 05:45, Jeff Law wrote: >> >> On 11/29/19 12:15 PM, Tim Rühsen wrote: >>> * cplus-dem.c (ada_demangle): Correctly calculate the demangled >>>    size by using two passes. >> >> So I'm not sure why, but I can't get this patch to apply. 

Re: Support to check vliw overlapping register constraint created by regrename, please help to review, thanks

2020-11-18 Thread Jeff Law via Gcc-patches
On 6/20/20 5:18 AM, Zhongyunde wrote: > In some target, it is limited to issue two insns with change the same > register.(The insn 73 start with insn:TI, so it will be issued together with > others insns until a new insn start with insn:TI, such as insn 71) > The regrename can known the mode

[PATCH] rs6000: Fix p8_mtvsrd_df's insn type

2020-11-18 Thread Kewen.Lin via Gcc-patches
Hi, The insn type of p8_mtvsrd_df looks missed to be updated with mtvsr. Here I supposed mtvsrd's all usages should be with the same insn type. This patch is to fix its current insn type mfvsr by mtvsr. Is it ok for trunk? BR, Kewen - gcc/ChangeLog: * config/rs6000/rs6000.md

Re: [PATCH] c, tree: Fix ICE from get_parm_array_spec [PR97860]

2020-11-18 Thread Richard Biener
On Wed, 18 Nov 2020, Jakub Jelinek wrote: > Hi! > > The C and C++ FEs handle zero sized arrays differently, C uses > NULL TYPE_MAX_VALUE on non-NULL TYPE_DOMAIN on complete ARRAY_TYPEs > with bitsize_zero_node TYPE_SIZE, while C++ FE likes to set > TYPE_MAX_VALUE to the largest value (and min to

Re: [PATCH] middle-end: Fix PR middle-end/85811: Introduce tree_expr_maybe_nan_p et al.

2020-11-18 Thread Jeff Law via Gcc-patches
On 8/15/20 5:10 AM, Roger Sayle wrote: > The motivation for this patch is PR middle-end/85811, a wrong-code > regression entitled "Invalid optimization with fmax, fabs and nan". > The optimization involves assuming max(x,y) is non-negative if (say) > y is non-negative, i.e. max(x,2.0).

Minor H8 shift code generation change in preparation for cc0 removal

2020-11-18 Thread Jeff Law via Gcc-patches
So I didn't stay up late to work from Pago Pago this year and beat the stage1 close, but I do want to flush out the removal of cc0 from the H8 port this cycle.  Given these patches only affect the H8 and the H8 would be killed this cycle without the conversion, I think this is suitable even though

[C PATCH] Drop qualifiers during lvalue conversion

2020-11-18 Thread Uecker, Martin
Here is another version of the patch. The only difference is the additional the check using 'tree_ssa_useless_type_conversion'. Best, Martin C: Drop qualifiers during lvalue conversion. PR97702 2020-11-XX  Martin Uecker   gcc/ * gcc/gimplify.c

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/15/20 6:00 AM, J.W. Jagersma wrote: > On 2020-11-12 16:51, Jeff Law wrote: >> On 3/11/20 6:38 PM, J.W. Jagersma via Gcc-patches wrote: >>> The following patch extends the generation of exception handling >>> information, so that it is possible to catch exceptions thrown from >>> volatile

Re: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.

2020-11-18 Thread Paul A. Clarke via Gcc-patches
On Wed, Nov 18, 2020 at 04:29:09PM -0600, Segher Boessenkool wrote: > On Wed, Nov 18, 2020 at 10:53:49PM +0100, Jakub Jelinek wrote: > > On Wed, Nov 18, 2020 at 03:43:20PM -0600, Segher Boessenkool wrote: > > > On Sun, Nov 15, 2020 at 12:17:47PM -0500, Michael Meissner wrote: > > > > ---

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/13/20 1:45 AM, Richard Biener wrote: > On Thu, Nov 12, 2020 at 4:53 PM Jeff Law via Gcc-patches > wrote: >> >> On 3/11/20 6:38 PM, J.W. Jagersma via Gcc-patches wrote: >>> The following patch extends the generation of exception handling >>> information, so that it is possible to catch

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/15/20 6:04 AM, J.W. Jagersma via Gcc-patches wrote: > On 2020-11-13 09:41, Richard Biener wrote: >> On Thu, Mar 12, 2020 at 1:41 AM J.W. Jagersma via Gcc-patches >> wrote: >>> diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c >>> index 2a409dcaffe..58b16aa763a 100644 >>> --- a/gcc/tree-eh.c >>>

Re: [PATCH] Remove lambdas from _Rb_tree

2020-11-18 Thread François Dumont via Gcc-patches
On 18/11/20 12:50 am, Jonathan Wakely wrote: On 17/11/20 21:51 +0100, François Dumont via Libstdc++ wrote: This is a change that has been done to _Hashtable and that I forgot to propose for _Rb_tree. The _GLIBCXX_XREF macro can be easily removed of course.     libstdc++: _Rb_tree code

PING^5 [PATCH 1/4] unroll: Add middle-end unroll factor estimation

2020-11-18 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping^5 for: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html BR, Kewen on 2020/11/2 下午5:13, Kewen.Lin via Gcc-patches wrote: > Hi, > > Gentle ping^4 this: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html > > BR, > Kewen > > on 2020/10/13 下午3:06,