Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-06 Thread Martin Liška
On 10/5/20 6:34 PM, Ian Lance Taylor wrote: On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: The previous patch was not correct. This one should be. Ready for master? I don't understand why this code uses symtab_indices_shndx at all. There should only be one SHT_SYMTAB_SHNDX section. The

Re: make sincos take type from intrinsic formal, not from result assignment

2020-10-06 Thread Alexandre Oliva
On Oct 6, 2020, Richard Biener wrote: > On October 6, 2020 3:15:02 AM GMT+02:00, Alexandre Oliva > wrote: >> >> This is a first step towards enabling the sincos optimization in Ada. >> >> The issue this patch solves is that sincos takes the type to be looked >> up with mathfn_built_in from v

[committed] openmp: Fix ICE in omp_discover_declare_target_tgt_fn_r [PR97289]

2020-10-06 Thread Jakub Jelinek via Gcc-patches
Hi! This ICEs because node->alias_target is (not yet) a FUNCTION_DECL, but IDENTIFIER_NODE. I guess we should retry the discovery before LTO streaming out, the reason to do it this early is that it can affect the gimplification and omp lowering. Bootstrapped/regtested on x86_64-linux and i686-li

Re: [PATCH] RISC-V: Derive ABI from -march if -mabi is not present.

2020-10-06 Thread Andreas Schwab
On Okt 06 2020, Kito Cheng wrote: > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index f623467b7637..c6ba738aa0b7 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -25928,7 +25928,14 @@ allows floating-point values up to 32 bits long to > be passed in registers; or >

[PATCH] divmod: Match and expand DIVMOD even in some cases of constant divisor [PR97282]

2020-10-06 Thread Jakub Jelinek via Gcc-patches
Hi! As written in the comment, tree-ssa-math-opts.c wouldn't create a DIVMOD ifn call for division + modulo by constant for the fear that during expansion we could generate better code for those cases. If the divisoris a power of two, that is certainly the case always, but otherwise expand_divmod

[PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Aldy Hernandez via Gcc-patches
Pushed as obvious. gcc/ChangeLog: * value-range.h (irange_allocator::allocate): Increase newir storage by one. --- gcc/value-range.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/value-range.h b/gcc/value-range.h index 94b48e55e77..7031a823138 100644 --

Re: [PATCH] optimize permutes in SLP, remove vect_attempt_slp_rearrange_stmts

2020-10-06 Thread Richard Biener
On Fri, 2 Oct 2020, Richard Sandiford wrote: > Richard Biener writes: > > This introduces a permute optimization phase for SLP which is > > intended to cover the existing permute eliding for SLP reductions > > plus handling commonizing the easy cases. > > > > It currently uses graphds to compute

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

2020-10-06 Thread Richard Biener via Gcc-patches
On Fri, Oct 2, 2020 at 3:23 PM Martin Liška wrote: > > On 9/24/20 2:41 PM, Richard Biener wrote: > > On Wed, Sep 2, 2020 at 1:53 PM Martin Liška wrote: > >> > >> On 9/1/20 4:50 PM, David Malcolm wrote: > >>> Hope this is constructive > >>> Dave > >> > >> Thank you David. All of them very very use

Re: [PATCH][ftracer] Factor out can_duplicate_bb_p

2020-10-06 Thread Richard Biener
On Mon, 5 Oct 2020, Tom de Vries wrote: > [ was: Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region ] > > On 10/5/20 9:05 AM, Tom de Vries wrote: > > Ack, updated the patch accordingly, and split it up in two bits, one > > that does refactoring, and one that adds the actual caching:

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 09:37:21AM +0200, Aldy Hernandez via Gcc-patches wrote: > Pushed as obvious. > > gcc/ChangeLog: > > * value-range.h (irange_allocator::allocate): Increase > newir storage by one. > --- > gcc/value-range.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH][ftracer] Add caching of can_duplicate_bb_p

2020-10-06 Thread Richard Biener
On Mon, 5 Oct 2020, Tom de Vries wrote: > [ was: Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region ] > > On 10/5/20 9:05 AM, Tom de Vries wrote: > > Ack, updated the patch accordingly, and split it up in two bits, one > > that does refactoring, and one that adds the actual caching:

Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-06 Thread Richard Biener via Gcc-patches
On Tue, Oct 6, 2020 at 9:01 AM Martin Liška wrote: > > On 10/5/20 6:34 PM, Ian Lance Taylor wrote: > > On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: > >> > >> The previous patch was not correct. This one should be. > >> > >> Ready for master? > > > > I don't understand why this code uses sym

Re: make sincos take type from intrinsic formal, not from result assignment

2020-10-06 Thread Richard Biener via Gcc-patches
On Tue, Oct 6, 2020 at 9:21 AM Alexandre Oliva wrote: > > On Oct 6, 2020, Richard Biener wrote: > > > On October 6, 2020 3:15:02 AM GMT+02:00, Alexandre Oliva > > wrote: > >> > >> This is a first step towards enabling the sincos optimization in Ada. > >> > >> The issue this patch solves is tha

Re: [PATCH] divmod: Match and expand DIVMOD even in some cases of constant divisor [PR97282]

2020-10-06 Thread Richard Biener
On Tue, 6 Oct 2020, Jakub Jelinek wrote: > Hi! > > As written in the comment, tree-ssa-math-opts.c wouldn't create a DIVMOD > ifn call for division + modulo by constant for the fear that during > expansion we could generate better code for those cases. > If the divisoris a power of two, that is c

[PATCH] arm: [MVE] Remove illegal intrinsics

2020-10-06 Thread Christophe Lyon via Gcc-patches
A few MVE intrinsics had an unsigned variant implement while they are supported by the hardware. This patch removes them: __arm_vqrdmlashq_n_u8 __arm_vqrdmlahq_n_u8 __arm_vqdmlahq_n_u8 __arm_vqrdmlashq_n_u16 __arm_vqrdmlahq_n_u16 __arm_vqdmlahq_n_u16 __arm_vqrdmlashq_n_u32 __arm_vqrdmlahq_n_u32 __

Re: [PATCH] arm: Fix multiple inheritance thunks for thumb-1 with -mpure-code

2020-10-06 Thread Christophe Lyon via Gcc-patches
ping? On Tue, 29 Sep 2020 at 21:50, Christophe Lyon wrote: > > When mi_delta is > 255 and -mpure-code is used, we cannot load delta > from code memory (like we do without -mpure-code). > > This patch builds the value of mi_delta into r3 with a series of > movs/adds/lsls. > > We also do some clean

Re: [PATCH] assorted improvements for fold_truth_andor_1

2020-10-06 Thread Richard Biener via Gcc-patches
On Fri, Oct 2, 2020 at 10:43 AM Alexandre Oliva wrote: > > Here's what I got so far, passing regstrap except for field-merge-1.c, > that relies on combining non-adjacent compares, which I haven't > implemented yet. Thanks for trying. > I had to retain some parts of fold_truth_andor_1 to avoid re

Re: [committed] libstdc++: Add deduction guide for std::ranges::join_view [LWG 3474]

2020-10-06 Thread Jonathan Wakely via Gcc-patches
On 06/10/20 00:05 -0500, Tim Song via Libstdc++ wrote: I thought LWG approved the other option in the PR (changing views::join to not use CTAD)? Oops, good point. Fixed like so. Tested powerpc64le-linux, pushed. On Mon, Aug 24, 2020 at 10:22 AM Jonathan Wakely via Gcc-patches < gcc-patches@

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Andreas Schwab
On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote: > I mean, we could just use: > size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs; > irange *r = (irange *) obstack_alloc (&m_obstack, nbytes); > return new (r) irange ((tree *) (r + 1), num_pairs); > without any new type. Mo

Re: [PATCH 2/2] arm: Improve handling of relocations with small offsets with -mpure-code on v6m (PR96770)

2020-10-06 Thread Christophe Lyon via Gcc-patches
ping? On Mon, 28 Sep 2020 at 11:09, Christophe Lyon wrote: > > With -mpure-code on v6m (thumb-1), we can use small offsets with > upper/lower relocations to avoid the extra addition of the > offset. > > This patch accepts expressions symbol+offset as legitimate constants > when the literal pool i

Re: [PATCH 1/2] arm: Avoid indirection with -mpure-code on v6m (PR96967)

2020-10-06 Thread Christophe Lyon via Gcc-patches
ping? On Mon, 28 Sep 2020 at 11:09, Christophe Lyon wrote: > > With -mpure-code on v6m (thumb-1), to avoid a useless indirection when > building the address of a symbol, we want to consider SYMBOL_REF as a > legitimate constant. This way, we build the address using a series of > upper/lower reloc

[Patch] configure: Fix in-tree building of GMP on BSD (PR97302)

2020-10-06 Thread Tobias Burnus
As reported in the PR, the in-tree build of GMP fails for BSD. The reason is that with_gmp is set if there is a gmp.h under /usr/local – such that in-tree GMP is build but later not used, which causes build fails if /usr/local has no proper GMP. Fixed by skipping the setting of with_gmp if there

Re: Fix handling of stores in modref_summary::useful_p

2020-10-06 Thread Szabolcs Nagy via Gcc-patches
The 10/05/2020 23:45, Jan Hubicka wrote: > > The 10/05/2020 17:28, Szabolcs Nagy via Gcc-patches wrote: > > minimal reproducer: > > > > #include > > int main() > > { > > int r,t; > > r = sscanf("01", "%2x", &t); > > printf("scanf: %d %02x\n", r, t); > > return 0;

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 10:47:34AM +0200, Andreas Schwab wrote: > On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote: > > > I mean, we could just use: > > size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs; > > irange *r = (irange *) obstack_alloc (&m_obstack, nbytes); > > retu

Re: [Patch] configure: Fix in-tree building of GMP on BSD (PR97302)

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 10:56:35AM +0200, Tobias Burnus wrote: > As reported in the PR, the in-tree build of GMP fails for BSD. > The reason is that with_gmp is set if there is a gmp.h under > /usr/local – such that in-tree GMP is build but later not used, > which causes build fails if /usr/local h

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Aldy Hernandez via Gcc-patches
On 10/6/20 9:52 AM, Jakub Jelinek wrote: On Tue, Oct 06, 2020 at 09:37:21AM +0200, Aldy Hernandez via Gcc-patches wrote: Pushed as obvious. gcc/ChangeLog: * value-range.h (irange_allocator::allocate): Increase newir storage by one. --- gcc/value-range.h | 2 +- 1 file cha

Re: [patch] convert -Walloca pass to ranger

2020-10-06 Thread Aldy Hernandez via Gcc-patches
On 10/5/20 7:12 PM, Martin Sebor wrote: It the future, I would even like to remove the specific range the ranger was able to compute from the error message itself.  As will become obvious, the ranger can get pretty outrageous ranges that are entirely non-obvious by looking at the code.  Pep

Re: [PATCH] options: Save and restore opts_set for Optimization and Target options

2020-10-06 Thread Andreas Schwab
options-save.c: In function 'void cl_target_option_save(cl_target_option*, gcc_options*, gcc_options*)': options-save.c:8526:26: error: unused variable 'mask' [-Werror=unused-variable] 8526 | unsigned HOST_WIDE_INT mask = 0; | ^~~~ options-save.c: In function 'voi

Re: make sincos take type from intrinsic formal, not from result assignment

2020-10-06 Thread Alexandre Oliva
On Oct 6, 2020, Richard Biener wrote: > OK, I see. mathfn_built_in expects a type inter-operating with > the C ABI types (float_type_node, double_type_node, etc.) where > "inter-operating" means having the same main variant. Yup. > Now, I guess for the sincos pass we want to combine sinl + co

Re: [PATCH] divmod: Match and expand DIVMOD even in some cases of constant divisor [PR97282]

2020-10-06 Thread Christophe Lyon via Gcc-patches
Hi Jakub, On Tue, 6 Oct 2020 at 10:13, Richard Biener wrote: > > On Tue, 6 Oct 2020, Jakub Jelinek wrote: > > > Hi! > > > > As written in the comment, tree-ssa-math-opts.c wouldn't create a DIVMOD > > ifn call for division + modulo by constant for the fear that during > > expansion we could gener

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Aldy Hernandez via Gcc-patches
-  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, call, src, srcsize);     /* Create a descriptor of the access.  This may adjust both DSTREF    and SRCREF based on one anoth

Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-06 Thread Martin Liška
On 10/6/20 10:00 AM, Richard Biener wrote: On Tue, Oct 6, 2020 at 9:01 AM Martin Liška wrote: On 10/5/20 6:34 PM, Ian Lance Taylor wrote: On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: The previous patch was not correct. This one should be. Ready for master? I don't understand why t

[PATCH][obvious] dbgcnt: report upper limit when lower == upper

2020-10-06 Thread Martin Liška
Hey. There's one obvious patch that should inform about upper limit reach of a debug counter. I'm going to install the patch. Martin gcc/ChangeLog: * dbgcnt.c (dbg_cnt): Report also upper limit. --- gcc/dbgcnt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/g

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 11:20:52AM +0200, Aldy Hernandez wrote: > > > diff --git a/gcc/value-range.h b/gcc/value-range.h > > > index 94b48e55e77..7031a823138 100644 > > > --- a/gcc/value-range.h > > > +++ b/gcc/value-range.h > > > @@ -670,7 +670,7 @@ irange_allocator::allocate (unsigned num_pairs)

Re: [PATCH] RISC-V: Derive ABI from -march if -mabi is not present.

2020-10-06 Thread Maciej W. Rozycki
On Tue, 6 Oct 2020, Kito Cheng wrote: > I think this patch is kind of major change for GCC RISC-V port, so I cc all > RISC-V gcc maintainer to make sure this change is fine with you guys. > > - Motivation of this patch: >1. Sync behavior between clang/llvm. >2. Preparation for -mcpu opti

[PATCH] dbgcnt: print list after compilation

2020-10-06 Thread Martin Liška
Hello. Motivation of the patch is to display debug counter values after a compilation. It's handy for bisection of a debug counter. The new output is printed to stderr (instead of stdout) and it works fine with LTO as well. Sample output: counter name counter value closed

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Andreas Schwab
On Okt 06 2020, Jakub Jelinek wrote: > On Tue, Oct 06, 2020 at 10:47:34AM +0200, Andreas Schwab wrote: >> On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote: >> >> > I mean, we could just use: >> > size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs; >> > irange *r = (irange *) o

[RFC] Add support for the "retain" attribute utilizing SHF_GNU_RETAIN

2020-10-06 Thread Jozef Lawrynowicz
Hi, I'd like to propose a new "retain" attribute, which can be applied to function and variable declarations. The attribute is used to protect the function or variable declaration it is applied to from linker garbage collection, by applying the SHF_GNU_RETAIN section flag to the section containin

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

2020-10-06 Thread Martin Liška
On 10/2/20 4:19 PM, Andrew MacLeod wrote: On 10/2/20 9:26 AM, Martin Liška wrote: Yes, you simply get all sorts of conditions that hold when a condition is true, not just those based on the SSA name you put in.  But it occured to me that the use-case is somewhat different - for switch-conversion

[PATCH] openmp: Improve composite simd vectorization

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 08:22:13AM +0200, Richard Biener wrote: > > I was really hoping bbs 4 and 5 would be one loop (the one I set safelen > > and force_vectorize etc. for) and that basic blocks 6 and 7 would be > > together with that inner loop another loop, but apparently loop discovery > > thi

[PATCH][GCC] arm: Move iterators from mve.md to iterators.md to maintain consistency.

2020-10-06 Thread Srinath Parvathaneni via Gcc-patches
Hello, To maintain consistency with other Arm Architectures backend, iterators and iterator attributes are moved from mve.md file to iterators.md. Also move enumerators for MVE unspecs from mve.md file to unspecs.md file. Regression tested on arm-none-eabi and found no regressions. Ok for mast

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 6:40 AM, Andreas Schwab wrote: On Okt 06 2020, Jakub Jelinek wrote: On Tue, Oct 06, 2020 at 10:47:34AM +0200, Andreas Schwab wrote: On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote: I mean, we could just use: size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs;

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 6:22 AM, Jakub Jelinek via Gcc-patches wrote: On Tue, Oct 06, 2020 at 11:20:52AM +0200, Aldy Hernandez wrote: diff --git a/gcc/value-range.h b/gcc/value-range.h index 94b48e55e77..7031a823138 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -670,7 +670,7 @@ irange_allocator::

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 08:47:53AM -0400, Andrew MacLeod wrote: > > I think the proper alignment will be guaranteed if irange and tree[] are > > obstack_alloc'd separately. They don't need to be adjacent, do they? > > > > > They do not, it just seemed wasteful to do 2 allocs each time, and it'd

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

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 8:09 AM, Martin Liška wrote: On 10/2/20 4:19 PM, Andrew MacLeod wrote: On 10/2/20 9:26 AM, Martin Liška wrote: Yes, you simply get all sorts of conditions that hold when a condition is true, not just those based on the SSA name you put in.  But it occured to me that the use-case is

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 8:55 AM, Jakub Jelinek wrote: On Tue, Oct 06, 2020 at 08:47:53AM -0400, Andrew MacLeod wrote: I think the proper alignment will be guaranteed if irange and tree[] are obstack_alloc'd separately. They don't need to be adjacent, do they? They do not, it just seemed wasteful to do 2

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

2020-10-06 Thread Martin Liška
On 10/6/20 2:56 PM, Andrew MacLeod wrote: Ah, by just using the outgoing_range class, all you are getting is static  edges.  so a TRUE edge is always a [1,1] and a false edge is [0,0] I provided that class so you could get the constant edges on switches. if you want to get actual ranges for ssa-

[PATCH] options: Avoid unused variable mask warning [PR97305]

2020-10-06 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Oct 06, 2020 at 11:28:22AM +0200, Andreas Schwab wrote: > options-save.c: In function 'void cl_target_option_save(cl_target_option*, > gcc_options*, gcc_options*)': > options-save.c:8526:26: error: unused variable 'mask' > [-Werror=unused-variable] > 8526 | unsigned HOST_WIDE_INT

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

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 9:09 AM, Martin Liška wrote: On 10/6/20 2:56 PM, Andrew MacLeod wrote: Ah, by just using the outgoing_range class, all you are getting is static edges.  so a TRUE edge is always a [1,1] and a false edge is [0,0] I provided that class so you could get the constant edges on switches.

[PATCH][openacc] Fix acc declare for VLAs

2020-10-06 Thread Tom de Vries
Hi, Consider test-case test.c, with VLA A: ... int main (void) { int N = 1000; int A[N]; #pragma acc declare copy(A) return 0; } ... compiled using: ... $ gcc test.c -fopenacc -S -fdump-tree-all ... At original, we have: ... #pragma acc declare map(tofrom:A); ... but at gimple, we have

Re: [PATCH] options: Avoid unused variable mask warning [PR97305]

2020-10-06 Thread Richard Biener
On Tue, 6 Oct 2020, Jakub Jelinek wrote: > Hi! > > On Tue, Oct 06, 2020 at 11:28:22AM +0200, Andreas Schwab wrote: > > options-save.c: In function 'void cl_target_option_save(cl_target_option*, > > gcc_options*, gcc_options*)': > > options-save.c:8526:26: error: unused variable 'mask' > > [-Wer

Re: [PATCH] optimize permutes in SLP, remove vect_attempt_slp_rearrange_stmts

2020-10-06 Thread Richard Biener
On Tue, 6 Oct 2020, Richard Biener wrote: > On Fri, 2 Oct 2020, Richard Sandiford wrote: > > > Richard Biener writes: > > > This introduces a permute optimization phase for SLP which is > > > intended to cover the existing permute eliding for SLP reductions > > > plus handling commonizing the ea

Re: make sincos take type from intrinsic formal, not from result assignment

2020-10-06 Thread Richard Biener via Gcc-patches
On Tue, Oct 6, 2020 at 11:34 AM Alexandre Oliva wrote: > > On Oct 6, 2020, Richard Biener wrote: > > > OK, I see. mathfn_built_in expects a type inter-operating with > > the C ABI types (float_type_node, double_type_node, etc.) where > > "inter-operating" means having the same main variant. > >

Ping: [PATCH][Arm] Enable MVE SIMD modes for vectorization

2020-10-06 Thread Dennis Zhang via Gcc-patches
On 9/16/20 4:00 PM, Dennis Zhang wrote: > Hi all, > > This patch enables SIMD modes for MVE auto-vectorization. > In this patch, the integer and float MVE SIMD modes are returned by > arm_preferred_simd_mode (TARGET_VECTORIZE_PREFERRED_SIMD_MODE hook) when > MVE or MVE_FLOAT is enabled. > Then the

Re: [PATCH] dbgcnt: print list after compilation

2020-10-06 Thread Richard Biener via Gcc-patches
On Tue, Oct 6, 2020 at 12:29 PM Martin Liška wrote: > > Hello. > > Motivation of the patch is to display debug counter values after a > compilation. > It's handy for bisection of a debug counter. The new output is printed to > stderr > (instead of stdout) and it works fine with LTO as well. > >

[PATCH][GCC-10 backport] arm: Remove coercion from scalar argument to vmin & vmax intrinsics.

2020-10-06 Thread Srinath Parvathaneni via Gcc-patches
Hello, Straight backport of Joe's patch with no changes. This patch fixes an issue with vmin* and vmax* intrinsics which accept a scalar argument. Previously when the scalar was of different width to the vector elements this would generate __ARM_undef. This change allows the scalar argument to be

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

2020-10-06 Thread Richard Biener via Gcc-patches
On Tue, Oct 6, 2020 at 3:09 PM Martin Liška wrote: > > On 10/6/20 2:56 PM, Andrew MacLeod wrote: > > Ah, by just using the outgoing_range class, all you are getting is static > > edges. so a TRUE edge is always a [1,1] and a false edge is [0,0] > > I provided that class so you could get the cons

RE: [PATCH][GCC-10 backport] arm: Remove coercion from scalar argument to vmin & vmax intrinsics.

2020-10-06 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 06 October 2020 14:37 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC-10 backport] arm: Remove coercion from scalar > argument to vmin & vmax intrinsics. > > Hello, > > Straight backport of Joe's patc

RE: [PATCH][GCC] arm: Move iterators from mve.md to iterators.md to maintain consistency.

2020-10-06 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 06 October 2020 13:27 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC] arm: Move iterators from mve.md to iterators.md to > maintain consistency. > > Hello, > > To maintain consistency with other Arm

RE: Ping: [PATCH][Arm] Enable MVE SIMD modes for vectorization

2020-10-06 Thread Kyrylo Tkachov via Gcc-patches
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 06 October 2020 14:37 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; nd ; > Richard Earnshaw ; Ramana Radhakrishnan > > Subject: Ping: [PATCH][Arm] Enable MVE SIMD modes for vectorization > > On 9/16/20 4:00 PM, Dennis Z

RE: [PATCH][GCC] arm: Move iterators from mve.md to iterators.md to maintain consistency.

2020-10-06 Thread Srinath Parvathaneni via Gcc-patches
Hi Kyrill, > -Original Message- > From: Kyrylo Tkachov > Sent: 06 October 2020 14:42 > To: Srinath Parvathaneni ; gcc- > patc...@gcc.gnu.org > Subject: RE: [PATCH][GCC] arm: Move iterators from mve.md to iterators.md > to maintain consistency. > > > > > -Original Message- > > F

RE: [PATCH][GCC] arm: Move iterators from mve.md to iterators.md to maintain consistency.

2020-10-06 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Srinath Parvathaneni > Sent: 06 October 2020 14:55 > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH][GCC] arm: Move iterators from mve.md to iterators.md > to maintain consistency. > > Hi Kyrill, > > > -Original Message- > > Fro

[PATCH][middle-end][i386][version 3]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-06 Thread Qing Zhao via Gcc-patches
Hi, Gcc team, This is the 3rd version of the implementation of patch -fzero-call-used-regs. We will provide a new feature into GCC: Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all] command-line option and zero_call_used_regs("skip|used-gpr-arg|used-arg|a

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

2020-10-06 Thread Martin Liška
On 10/6/20 9:47 AM, Richard Biener wrote: But is it really extensible with the current implementation? I doubt so. I must agree with the statement. So let's make the pass properly. I would need a help with the algorithm where I'm planning to do the following steps: 1) for each BB ending with

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

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 03:48:38PM +0200, Martin Liška wrote: > On 10/6/20 9:47 AM, Richard Biener wrote: > > But is it really extensible with the current implementation? I doubt so. > > I must agree with the statement. So let's make the pass properly. > I would need a help with the algorithm whe

[GCC-10 backport][COMMITTED] arm: Move iterators from mve.md to iterators.md to maintain consistency.

2020-10-06 Thread Srinath Parvathaneni via Gcc-patches
Backport approved here https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555618.html . To maintain consistency with other Arm Architectures backend, iterators and iterator attributes are moved from mve.md file to iterators.md. Also move enumerators for MVE unspecs from mve.md file to unspe

Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 12:20:14PM +0200, Martin Liška wrote: > On 10/6/20 10:00 AM, Richard Biener wrote: > > On Tue, Oct 6, 2020 at 9:01 AM Martin Liška wrote: > > > > > > On 10/5/20 6:34 PM, Ian Lance Taylor wrote: > > > > On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: > > > > > > > > >

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Martin Sebor via Gcc-patches
On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, call, src, srcsize);     /* Create a descriptor of the access.  This may adjust both

[PATCH][GCC-10 backport] arm: Add +nomve and +nomve.fp options to -mcpu=cortex-m55.

2020-10-06 Thread Srinath Parvathaneni via Gcc-patches
Backport of Joe's patch wit no changes. This patch rearranges feature bits for MVE and FP to implement the following flags for -mcpu=cortex-m55. - +nomve:equivalent to armv8.1-m.main+fp.dp+dsp. - +nomve.fp: equivalent to armv8.1-m.main+mve+fp.dp (+dsp is implied by +mve). - +nofp: e

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 10:30 AM, Martin Sebor wrote: On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, call, src, srcsize);     /* Create a descri

Re: [PATCH][openacc] Fix acc declare for VLAs

2020-10-06 Thread Tobias Burnus
LGTM. Thanks, Tobias On 10/6/20 3:28 PM, Tom de Vries wrote: Hi, Consider test-case test.c, with VLA A: ... int main (void) { int N = 1000; int A[N]; #pragma acc declare copy(A) return 0; } ... compiled using: ... $ gcc test.c -fopenacc -S -fdump-tree-all ... At original, we have

Re: [PATCH] xfail and improve some failing libgomp tests

2020-10-06 Thread Tom de Vries
On 10/5/20 3:15 PM, Tom de Vries wrote: > On 2/7/20 4:29 PM, Jakub Jelinek wrote: >> On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: >>> * {target-32.c, thread-limit-2.c}: >>> no "usleep" implemented for nvptx. Cf. https://gcc.gnu.org/PR81690 >> >> Please don't, I want to deal wi

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Martin Sebor via Gcc-patches
On 10/6/20 8:42 AM, Andrew MacLeod wrote: On 10/6/20 10:30 AM, Martin Sebor wrote: On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, c

Re: [PATCH, 1/3, OpenMP] Target mapping changes for OpenMP 5.0, front-end parts

2020-10-06 Thread Chung-Lin Tang
On 2020/9/29 6:16 PM, Jakub Jelinek wrote: On Tue, Sep 01, 2020 at 09:16:23PM +0800, Chung-Lin Tang wrote: this patch set implements parts of the target mapping changes introduced in OpenMP 5.0, mainly the attachment requirements for pointer-based list items, and the clause ordering. The first

Re: [PATCH] xfail and improve some failing libgomp tests

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 04:48:40PM +0200, Tom de Vries wrote: > On 10/5/20 3:15 PM, Tom de Vries wrote: > > On 2/7/20 4:29 PM, Jakub Jelinek wrote: > >> On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: > >>> * {target-32.c, thread-limit-2.c}: > >>> no "usleep" implemented for nvpt

[committed, wwwdocs] gcc-11/changes: Add notes about column number changes

2020-10-06 Thread David Malcolm via Gcc-patches
I've taken the liberty of pushing this website patch, having checked that it validates. It covers the changes by Lewis in 004bb936d6d5f177af26ad4905595e843d5665a5 (PR 49973 and PR 86904). --- htdocs/gcc-11/changes.html | 39 ++ 1 file changed, 39 insertions(+)

Re: [PATCH] rs6000: Fix extraneous characters in the documentation

2020-10-06 Thread will schmidt via Gcc-patches
On Mon, 2020-10-05 at 17:23 -0300, Tulio Magno Quites Machado Filho via Gcc-patches wrote: > Ping? +cc Segher :-) > > Tulio Magno Quites Machado Filho via Gcc-patches > writes: > > > Replace them with a whitespace in order to avoid artifacts in the HTML > > document. > > > > 2020-08-19 Tul

Re: [PATCH] xfail and improve some failing libgomp tests

2020-10-06 Thread Tom de Vries
On 10/6/20 5:02 PM, Jakub Jelinek wrote: > On Tue, Oct 06, 2020 at 04:48:40PM +0200, Tom de Vries wrote: >> On 10/5/20 3:15 PM, Tom de Vries wrote: >>> On 2/7/20 4:29 PM, Jakub Jelinek wrote: On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: > * {target-32.c, thread-limit-

[committed][GCC 8] arm: Add missing part number for Neoverse V1

2020-10-06 Thread Alex Coplan via Gcc-patches
This patch adds the part number for Neoverse V1 which was missing from the initial AArch32 support in GCC 8. Bootstrapped and regtested on arm-none-linux-gnueabihf, pushing as obvious. Thanks, Alex --- gcc/ChangeLog: * config/arm/driver-arm.c (arm_cpu_table): Add neoverse-v1. diff --gi

Re: [PATCH] debug: Pass --gdwarf-N to assembler if fixed gas is detected during configure

2020-10-06 Thread Mark Wielaard
Hi, On Fri, 2020-09-18 at 17:21 +0200, Mark Wielaard wrote: > On Tue, 2020-09-15 at 20:40 +0200, Jakub Jelinek wrote: > > Ok, here it is in patch form. > > I've briefly tested it, with the older binutils I have around (no --gdwarf-N > > support), with latest gas (--gdwarf-N that can be passed to a

[PATCH v2] arm: [MVE[ Add vqdmlashq intrinsics

2020-10-06 Thread Christophe Lyon via Gcc-patches
This patch adds: vqdmlashq_m_n_s16 vqdmlashq_m_n_s32 vqdmlashq_m_n_s8 vqdmlashq_n_s16 vqdmlashq_n_s32 vqdmlashq_n_s8 v2: rebased after Srinath's reorganization patch 2020-10-05 Christophe Lyon gcc/ PR target/96914 * config/arm/arm_mve.h (vqdmlashq, vqdmlashq_m): Define

[PATCH v2] arm: [MVE] Remove illegal intrinsics

2020-10-06 Thread Christophe Lyon via Gcc-patches
A few MVE intrinsics had an unsigned variant implement while they are supported by the hardware. This patch removes them: __arm_vqrdmlashq_n_u8 __arm_vqrdmlahq_n_u8 __arm_vqdmlahq_n_u8 __arm_vqrdmlashq_n_u16 __arm_vqrdmlahq_n_u16 __arm_vqdmlahq_n_u16 __arm_vqrdmlashq_n_u32 __arm_vqrdmlahq_n_u32 __

Re: [PATCH] arm: Fix multiple inheritance thunks for thumb-1 with -mpure-code

2020-10-06 Thread Richard Earnshaw via Gcc-patches
On 29/09/2020 20:50, Christophe Lyon via Gcc-patches wrote: > When mi_delta is > 255 and -mpure-code is used, we cannot load delta > from code memory (like we do without -mpure-code). > > This patch builds the value of mi_delta into r3 with a series of > movs/adds/lsls. > > We also do some cleanu

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Aldy Hernandez via Gcc-patches
On 10/6/20 4:51 PM, Martin Sebor wrote: On 10/6/20 8:42 AM, Andrew MacLeod wrote: On 10/6/20 10:30 AM, Martin Sebor wrote: On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst,

RE: [PATCH v2] arm: [MVE] Remove illegal intrinsics

2020-10-06 Thread Kyrylo Tkachov via Gcc-patches
With gcc-patches on too. Not sure why the reply-all function fails for your address Kyrill > -Original Message- > From: Kyrylo Tkachov > Sent: 06 October 2020 17:13 > To: Christophe Lyon > Subject: RE: [PATCH v2] arm: [MVE] Remove illegal intrinsics > > > > > -Original Message-

[PATCH][openacc, libgomp, testsuite] Xfail declare-5.f90

2020-10-06 Thread Tom de Vries
Hi, We're currently running into: ... FAIL: libgomp.oacc-fortran/declare-5.f90 -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 execution test FAIL: libgomp.oacc-fortran/declare-5.f90 -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O1 execution test

[committed] libstdc++: Inline std::exception_ptr members [PR 90295]

2020-10-06 Thread Jonathan Wakely via Gcc-patches
This inlines most members of std::exception_ptr so that all operations on a null exception_ptr can be optimized away. This benefits code like std::future and coroutines where an exception_ptr object is present to cope with exceptional cases, but is usually not used and remains null. Since those fu

Re: [PATCH][openacc, libgomp, testsuite] Xfail declare-5.f90

2020-10-06 Thread Tobias Burnus
Hi Tom, On 10/6/20 6:20 PM, Tom de Vries wrote: FAIL: libgomp.oacc-fortran/declare-5.f90 -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 execution test A PR was filed for this: PR92790 - "[OpenACC] declare device_resident - Fortran common blocks not handled / libgomp.o

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Martin Sebor via Gcc-patches
On 10/6/20 1:52 AM, Jakub Jelinek via Gcc-patches wrote: On Tue, Oct 06, 2020 at 09:37:21AM +0200, Aldy Hernandez via Gcc-patches wrote: Pushed as obvious. gcc/ChangeLog: * value-range.h (irange_allocator::allocate): Increase newir storage by one. --- gcc/value-range.h | 2 +-

Re: [PATCH][Arm] Auto-vectorization for MVE: vsub

2020-10-06 Thread Dennis Zhang via Gcc-patches
Hi all, On 8/17/20 6:41 PM, Dennis Zhang wrote: > > Hi all, > > This patch enables MVE vsub instructions for auto-vectorization. > It adds RTL templates for MVE vsub instructions using 'minus' instead of > unspec expression to make the instructions recognizable for vectorization. > MVE target is

[PUSHED] Ranger classes.

2020-10-06 Thread Andrew MacLeod via Gcc-patches
I have checked in the ranger classes/files.    They are being built but not being invoked until the other passes are checked in. there are 8 new files: gimple-range-cache.{h,cc} :   Various caches used by the ranger. gimple-range-edge.{h,cc} :    Outgoing edge range calculations, particularly

[PATCH][Arm] Auto-vectorization for MVE: vmul

2020-10-06 Thread Dennis Zhang via Gcc-patches
Hi all, This patch enables MVE vmul instructions for auto-vectorization. It includes MVE in expander mul3 to enable vectorization for MVE and modifies related vmul insns to support the expander by using 'mult' instead of unspec. The mul3 for vectorization in vec-common.md uses mode iterator VDQ

error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger classes.

2020-10-06 Thread Tobias Burnus
Build fails here now with: gimple-range.h:168:59: error: ‘EVRP_MODE_DEBUG’ was not declared in this scope Tobias On 10/6/20 6:49 PM, Andrew MacLeod via Gcc-patches wrote: I have checked in the ranger classes/files.They are being built but not being invoked until the other passes are checked

[PATCH][Arm] Auto-vectorization for MVE: vmin/vmax

2020-10-06 Thread Dennis Zhang via Gcc-patches
Hi all, This patch enables MVE vmin/vmax instructions for auto-vectorization. MVE target is included in expander smin3, umin3, smax3 and umax3 for vectorization. Related insns for vmin/vmax in mve.md are modified to use smin, umin, smax and umax expressions instead of unspec to support the expan

[PUSHED] Hybrid EVRP and testcases

2020-10-06 Thread Andrew MacLeod via Gcc-patches
I have now checked in the hybrid EVRP pass. We have resolved all the issue we are aware of with a full Fedora build, but if any more issues arise, please let us know. (And Im sure you will :-) I made some minor tweaks.   the option to the new -fevrp-mode  flag are now: legacy             : cl

Re: error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger classes.

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 12:56 PM, Tobias Burnus wrote: Build fails here now with: gimple-range.h:168:59: error: ‘EVRP_MODE_DEBUG’ was not declared in this scope Tobias On 10/6/20 6:49 PM, Andrew MacLeod via Gcc-patches wrote: I have checked in the ranger classes/files.    They are being built but not being

Re: error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger classes.

2020-10-06 Thread Tobias Burnus
On 10/6/20 6:56 PM, Tobias Burnus wrote: Build fails here now with: gimple-range.h:168:59: error: ‘EVRP_MODE_DEBUG’ was not declared in this scope And now builds – as the "Hybrid EVRP and testcases" was pushed as well, a bit more than a quarter of an hour later. (At least it finished building t

Re: error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger classes.

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 1:10 PM, Tobias Burnus wrote: On 10/6/20 6:56 PM, Tobias Burnus wrote: Build fails here now with: gimple-range.h:168:59: error: ‘EVRP_MODE_DEBUG’ was not declared in this scope And now builds – as the "Hybrid EVRP and testcases" was pushed as well, a bit more than a quarter of an ho

Re: [PUSHED] Fix off-by-one storage problem in irange_allocator.

2020-10-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote: > The manual documents the [0] extension and mentions but discourages > using [1]. Nothing is said about other sizes and the warnings such > as -Warray-bounds have been increasingly complaining about accesses > past the declared constan

Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-06 Thread Ian Lance Taylor via Gcc-patches
On Tue, Oct 6, 2020 at 3:20 AM Martin Liška wrote: > > On 10/6/20 10:00 AM, Richard Biener wrote: > > On Tue, Oct 6, 2020 at 9:01 AM Martin Liška wrote: > >> > >> On 10/5/20 6:34 PM, Ian Lance Taylor wrote: > >>> On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: > > The previous patch

  1   2   >