Re: [PATCH] Fix zero-masking for vcvtps2ph when dest operand is memory.

2020-06-03 Thread Hongtao Liu via Gcc-patches
On Thu, Jun 4, 2020 at 2:43 PM Richard Biener wrote: > > On Thu, 4 Jun 2020, Hongtao Liu wrote: > > > Hi Richard: > > Could you help review this patch. > > uros said he wouldn't review patches related to x86 vector ISA anymore. > > I can't spot anything wrong but I know nothing about what a >

Re: [PATCH] Fix typo in expander trunc2 [AVX512]

2020-06-03 Thread Richard Biener via Gcc-patches
On Thu, Jun 4, 2020 at 8:09 AM Hongtao Liu via Gcc-patches wrote: > > This patch to is fix uppercase of mode in trunc2, it > should be lowercase for standard pattern name. > > Bootstrap is ok, regression test on i386/x86-64 backend is ok. OK. Richard. > gcc/ChangeLog: > * config/i386/

Re: [PATCH V2 1/2] Introduce flag_cunroll_grow_size for cunroll

2020-06-03 Thread Richard Biener via Gcc-patches
On Thu, Jun 4, 2020 at 5:34 AM Jiufu Guo wrote: > > Jiufu Guo writes: > > Hi, > > Patch is updated a little according to comments. > Please see if this is ok to commit. OK with a proper ChangeLog after bootstrap / testing. It's also OK to backport this to the GCC 10 branch if powerpc folks want

Re: [PATCH] extend cselim to check non-trapping for more references (PR tree-optimizaton/89430)

2020-06-03 Thread Richard Biener
On Thu, 4 Jun 2020, Hao Liu OS wrote: > Hi Jakub, > > I've updated the incorrect ChangLog. > > gcc/: > > PR tree-optimization/89430 > * tree-ssa-phiopt.c > (struct name_to_bb): Rename to ref_to_bb; add a new field exp; > remove ssa_name_ver, store, offset fields

Re: [PATCH] extend cselim to check non-trapping for more references (PR tree-optimizaton/89430)

2020-06-03 Thread Jakub Jelinek via Gcc-patches
Hi! The usual way to write it would be: On Thu, Jun 04, 2020 at 06:17:13AM +, Hao Liu OS wrote: > gcc/: > > PR tree-optimization/89430 > * tree-ssa-phiopt.c > (struct name_to_bb): Rename to ref_to_bb; add a new field exp; > remove ssa_name_ver, store, offset fi

Re: [PATCH] Fix zero-masking for vcvtps2ph when dest operand is memory.

2020-06-03 Thread Richard Biener
On Thu, 4 Jun 2020, Hongtao Liu wrote: > Hi Richard: > Could you help review this patch. > uros said he wouldn't review patches related to x86 vector ISA anymore. I can't spot anything wrong but I know nothing about what a define_subst is. You say "Bootstrap is ok, regression test on i386/x8

Re: [PATCH] extend cselim to check non-trapping for more references (PR tree-optimizaton/89430)

2020-06-03 Thread Hao Liu OS via Gcc-patches
Hi Jakub, I've updated the incorrect ChangLog. gcc/: PR tree-optimization/89430 * tree-ssa-phiopt.c (struct name_to_bb): Rename to ref_to_bb; add a new field exp; remove ssa_name_ver, store, offset fields. (struct ssa_names_hasher): Rename to refs_hasher;

[PATCH] Fix typo in expander trunc2 [AVX512]

2020-06-03 Thread Hongtao Liu via Gcc-patches
This patch to is fix uppercase of mode in trunc2, it should be lowercase for standard pattern name. Bootstrap is ok, regression test on i386/x86-64 backend is ok. gcc/ChangeLog: * config/i386/sse.md (pmov_dst_3_lower): New mode attribute. (trunc2): Refine from trunc2. g

Re: [PATCH] extend cselim to check non-trapping for more references (PR tree-optimizaton/89430)

2020-06-03 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 04, 2020 at 04:47:43AM +, Hao Liu OS wrote: > The patch is refactored a little according to the last comment. Do you have > more comments? If no, I will commit it later. > > Tested on X86_64 and AArch64. > > gcc/: > > PR tree-optimization/89430 > * tree-ssa-phiop

Re: [PATCH] extend cselim to check non-trapping for more references (PR tree-optimizaton/89430)

2020-06-03 Thread Hao Liu OS via Gcc-patches
Hi All, The patch is refactored a little according to the last comment. Do you have more comments? If no, I will commit it later. Tested on X86_64 and AArch64. gcc/: PR tree-optimization/89430 * tree-ssa-phiopt.c (cond_store_replacement): Extend non-trap checking to sup

Re: [PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-06-03 Thread Asher Gordon via Gcc-patches
Hello, I accidentally wrote 'free(loc)' instead of 'free (loc)'. Please see the fixed patch attached below (contrib/check_GNU_style.sh says it's OK now): From 0445fba96ee9030feb00ebec893f8dfed153b12d Mon Sep 17 00:00:00 2001 From: Asher Gordon Date: Wed, 3 Jun 2020 17:20:08 -0400 Subject: [PATCH]

Re: [PATCH V2 2/2] rs6000: allow cunroll to grow size according to -funroll-loop or -fpeel-loops

2020-06-03 Thread Jiufu Guo via Gcc-patches
guojiufu writes: > From: Jiufu Guo > > --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -4567,7 +4567,12 @@ rs6000_option_override_internal (bool global_init_p) > unroll_only_small_loops = 0; > if (!global_options_set.x_flag_rename_registers) >

Re: [PATCH V2 1/2] Introduce flag_cunroll_grow_size for cunroll

2020-06-03 Thread Jiufu Guo via Gcc-patches
Jiufu Guo writes: Hi, Patch is updated a little according to comments. Please see if this is ok to commit. diff --git a/gcc/common.opt b/gcc/common.opt index 4464049fc1f..570e2aa53c8 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2856,6 +2856,10 @@ funroll-all-loops Common Report Var(fla

Re: [PATCH] Fix zero-masking for vcvtps2ph when dest operand is memory.

2020-06-03 Thread Hongtao Liu via Gcc-patches
Hi Richard: Could you help review this patch. uros said he wouldn't review patches related to x86 vector ISA anymore. On Wed, Jun 3, 2020 at 10:26 AM Hongtao Liu wrote: > > Hi: > When dest is memory, zero-masking is not valid, only merging-masking > is available, > > Bootstrap is ok, regr

[PATCH] tree-ssa-threadbackward.c (profitable_jump_thread_path): Do not allow __builtin_constant_p.

2020-06-03 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux and s390x-redhat-linux. Linux Kernel (specifically, drivers/leds/trigger/ledtrig-cpu.c) build with GCC 10 fails on s390 with "impossible constraint". The problem is that jump threading makes __builtin_constant_p lie when an

Re: std::optional defaut constructor

2020-06-03 Thread Ville Voutilainen via Gcc-patches
On Thu, 4 Jun 2020 at 03:05, Ville Voutilainen wrote: > > > "noexcept" is a red herring, what matters is defaulted vs user-provided. > > > In one case, we end up zero-initializing the whole buffer, and not in the > > > other. > > > > Yes, I just came to that conclusion. This is value-init, so the

Re: std::optional defaut constructor

2020-06-03 Thread Ville Voutilainen via Gcc-patches
On Thu, 4 Jun 2020 at 02:20, Ville Voutilainen wrote: > > On Thu, 4 Jun 2020 at 02:13, Marc Glisse wrote: > > > > On Thu, 4 Jun 2020, Ville Voutilainen wrote: > > > > > On Thu, 4 Jun 2020 at 01:52, Marc Glisse wrote: > > >> > > >> Hello, > > >> > > >> is there any drawback to the attached patch?

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-03 Thread Gerald Pfeifer
On Wed, 3 Jun 2020, Martin Liška wrote: > Sorry for the breakage. Can you please paste full build output for the > problematic .o file? > > I bet it's a C file compilation, where we should use: > > __sync_val_compare_and_swap (counter, 0, (intptr_t)node); > > Can you please test it? c++ -std=c

Re: [PATCH 3/6] rs6000, Add vector replace builtin support

2020-06-03 Thread Segher Boessenkool
Hi! On Mon, Jun 01, 2020 at 09:14:47AM -0700, Carl Love wrote: > * config/rs6000/altivec.h: Add define for vec_replace_elt and > vec_replace_unaligned. * config/rs6000/altivec.h (vec_replace_elt, vec_replace_unaligned): New defines. > * config/rs6000/vsx.md

Re: std::optional defaut constructor

2020-06-03 Thread Ville Voutilainen via Gcc-patches
On Thu, 4 Jun 2020 at 02:13, Marc Glisse wrote: > > On Thu, 4 Jun 2020, Ville Voutilainen wrote: > > > On Thu, 4 Jun 2020 at 01:52, Marc Glisse wrote: > >> > >> Hello, > >> > >> is there any drawback to the attached patch? It changes the code generated > >> for > > > > I don't get it. The noexce

Re: [PATCH 1/2] Provide diagnostic hints for missing C inttypes.h string constants.

2020-06-03 Thread Joseph Myers
On Mon, 1 Jun 2020, Mark Wielaard wrote: > On Sun, May 24, 2020 at 02:30:13AM +0200, Mark Wielaard wrote: > > This adds a flag to c_parser so we know when we were trying to > > construct a string literal. If there is a parse error and we were > > constructing a string literal, and the next token i

Re: [PATCH 2/6] rs6000 Add vector insert builtin support

2020-06-03 Thread Segher Boessenkool
Hi! On Mon, Jun 01, 2020 at 09:14:40AM -0700, Carl Love wrote: > * config/rs6000/altivec.h: Add define vec_insertl, vec_inserth. * config/rs6000/altivec.h (vec_insertl, vec_inserth): New defines. > * config/rs6000/rs6000-builtin.def (BU_FUTURE_V_3): Add definition for >

Re: [PATCH] diagnostics: Add function call parens matching to c_parser.

2020-06-03 Thread Joseph Myers
On Sun, 31 May 2020, Mark Wielaard wrote: > On Sun, May 24, 2020 at 11:46:34PM +0200, Mark Wielaard wrote: > > The C++ parser already tracks function call parens matching, but the C > > parser doesn't. This adds the same functionality to the C parser and adds > > a testcase showing the C++ and C p

Re: std::optional defaut constructor

2020-06-03 Thread Marc Glisse
On Thu, 4 Jun 2020, Ville Voutilainen wrote: On Thu, 4 Jun 2020 at 01:52, Marc Glisse wrote: Hello, is there any drawback to the attached patch? It changes the code generated for I don't get it. The noexceptness of the defaulted default constructor should be a computation of the noexceptne

Re: std::optional defaut constructor

2020-06-03 Thread Ville Voutilainen via Gcc-patches
On Thu, 4 Jun 2020 at 01:52, Marc Glisse wrote: > > Hello, > > is there any drawback to the attached patch? It changes the code generated for I don't get it. The noexceptness of the defaulted default constructor should be a computation of the noexceptness of the subobjects, and that should boil d

Re: [PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-06-03 Thread Asher Gordon via Gcc-patches
Asher Gordon writes: > Also note that this patch does not implement a -Wno-designated-init > flag, but that shouldn't be too hard to implement. Sorry, I meant -Wno-universal-initializer, not -Wno-designated-init. Asher -- Vimes grunted. "Where there are policemen there's crime, sergeant, rem

Re: [Patch] Inline optimization for tanh(x)/sinh(x) -> 1.0/cosh(x)

2020-06-03 Thread Jeff Law via Gcc-patches
On Fri, 2020-01-31 at 15:50 -0300, Vitor Guidi wrote: > I took the required steps. The patch is attached to this email, I hope > I got it right this time. I did not forward the patch to gcc-patches > the first time, sorry for the inconvenience. > > Thank you for your attention, > > Vitor. > > in

Re: [PATCH 1/6] rs6000, Update support for vec_extract

2020-06-03 Thread Segher Boessenkool
Hi carl, On Mon, Jun 01, 2020 at 09:14:33AM -0700, Carl Love wrote: > * config/rs6000/altivec.md: Move UNSPEC_EXTRACTL, UNSPEC_EXTRACTR > declarations to gcc/config/rs6000/vsx.md. > (define_expand): Move vextractl and vextractr to > gcc/config/rs6000/vsx.md. > (defi

[PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-06-03 Thread Asher Gordon via Gcc-patches
Closes #95379. gcc/ChangeLog: * doc/extend.texi: Document { 0 } as a special case for the designated_init attribute. gcc/c/ChangeLog: * c-typeck.c (struct location_list): New type. (struct initializer_stack): Add positional_init_locs for -Wdesignated-init

std::optional defaut constructor

2020-06-03 Thread Marc Glisse
Hello, is there any drawback to the attached patch? It changes the code generated for std::optional>f(){return{};} from movq$0, (%rdi) movq%rdi, %r8 leaq8(%rdi), %rdi xorl%eax, %eax movq$0, 4084(%rdi) movq%r8, %rcx

Re: [PATCH] Fix missing assemble_external in ASM_OUTPUT_FDESC

2020-06-03 Thread Jeff Law via Gcc-patches
On Mon, 2020-05-18 at 12:02 +0200, Andreas Schwab wrote: > When TARGET_VTABLE_USES_DESCRIPTORS is defined then function pointers in > the vtable are output by ASM_OUTPUT_FDESC. The only current user of > this is ia64, but its implementation of ASM_OUTPUT_FDESC lacks a call to > assemble_external.

[pushed][PATCH] identify lfs prefixed case PR95347

2020-06-03 Thread Aaron Sawdey via Gcc-patches
This passed regstrap and was approved offline by Segher, posting the final form (minus my debug code, oops). The same problem also arises for plfs where prefixed_load_p() doesn't recognize it so we get just lfs in the asm output with an @pcrel address. PR target/95347 * config/rs6

Re: [PATCH 0/6] Permute Class Operations

2020-06-03 Thread Segher Boessenkool
Hi Carl, On Mon, Jun 01, 2020 at 09:14:25AM -0700, Carl Love wrote: > Based on previous IBM internal reviews of the patch set, the desire is > for all of the vector insert and extract support to be in vsx.md as > there is a longer term plan to re-work this support for PPC. Very long time ago, it

Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments

2020-06-03 Thread Jeff Law via Gcc-patches
On Wed, 2020-06-03 at 21:56 +0200, Romain Naour wrote: > Hi Jeff, > > Le 03/06/2020 à 20:33, Jeff Law a écrit : > > On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote: > > > As reported by several Buildroot users [1][2][3], the gcc build > > > may fail while running selftests ma

Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments

2020-06-03 Thread Romain Naour via Gcc-patches
Hi Jeff, Le 03/06/2020 à 20:33, Jeff Law a écrit : > On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote: >> As reported by several Buildroot users [1][2][3], the gcc build >> may fail while running selftests makefile target. >> >> The problem only occurs when ccache is used with

Re: [PATCH] FAT library support for libatomic, libgfortran, libgomp, libstdc++

2020-06-03 Thread Iain Sandoe via Gcc-patches
David Edelsohn wrote: On Wed, Jun 3, 2020 at 3:14 PM Iain Sandoe wrote: libstdc++-v3/ * Makefile.am (tmake_file): Build and install AIX-style FAT libraries. * Makefile.in: Regenerate. * configure.ac (tmake_file): Substitute. * configure: Regenerate. * configure

Re: [PATCH] FAT library support for libatomic, libgfortran, libgomp, libstdc++

2020-06-03 Thread David Edelsohn via Gcc-patches
On Wed, Jun 3, 2020 at 3:14 PM Iain Sandoe wrote: > > Hi David, > > thanks for working on this! > > David Edelsohn wrote: > > > [I'll start by repeating what I wrote about a similar libgcc change to > > provide background and context.] > > > > When AIX added 64 bit support, it implemented what Ap

Re: [PATCH] c++: more constrained nested partial specialization

2020-06-03 Thread Jason Merrill via Gcc-patches
On 6/2/20 5:45 PM, Patrick Palka wrote: When checking that a constrained partial specialization is more constrained than the primary template, we pass only the innermost level of generic template arguments to strictly_subsumes. This leads to us doing a nonsensical substitution from normalize_con

Re: [PATCH] FAT library support for libatomic, libgfortran, libgomp, libstdc++

2020-06-03 Thread Iain Sandoe via Gcc-patches
Hi David, thanks for working on this! David Edelsohn wrote: [I'll start by repeating what I wrote about a similar libgcc change to provide background and context.] When AIX added 64 bit support, it implemented what Apple MacOS Darwin calls "FAT" libraries for its equivalent functionality --

Re: [PATCH] c++: constrained nested partial specialization [PR92103]

2020-06-03 Thread Jason Merrill via Gcc-patches
On 6/2/20 3:43 PM, Patrick Palka wrote: When determining the most specialized partial specialization of a primary template that is nested inside a class template, we first tsubst the outer template arguments into the TEMPLATE_DECL of each partial specialization, and then check for satisfaction of

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 03, 2020 at 02:09:11PM -0500, Segher Boessenkool wrote: > Yeah, but that is specific to the vectoriser, not something that the > RTL expander should have to deal with. A big impedance mismatch there. It isn't specific to vectorizer, many named patterns aren't allowed to FAIL and many

Optimize ODR enum streaming

2020-06-03 Thread Jan Hubicka
Hi, it turns out that half of the global decl stream of cc1 LTO build consits TREE_LISTS, identifiers and integer cosntats representing TYPE_VALUES of enums. Those are streamed only to produce ODR warning and used otherwise, so this patch moves the info to a separate section that is represented and

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Segher Boessenkool
On Wed, Jun 03, 2020 at 08:38:04PM +0200, Richard Biener wrote: > On June 3, 2020 8:23:14 PM GMT+02:00, Segher Boessenkool > wrote: > >On Wed, Jun 03, 2020 at 07:23:47PM +0200, Richard Biener wrote: > >> >> mask = vec_cmp of the comparison > >> >> true_masked = true_op & mask; > >> >> false

Re: [PATCH] c++: Reject some further reinterpret casts in constexpr [PR82304, PR95307]

2020-06-03 Thread Jason Merrill via Gcc-patches
On 6/1/20 6:50 PM, Jakub Jelinek wrote: On Fri, May 29, 2020 at 01:26:32PM -0400, Jason Merrill via Gcc-patches wrote: This is a diagnostic quality regression, moving the error message away from the line where the actual problem is. Maybe use error_at (loc, ...)? That works fine, bootstrapped

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread David Edelsohn via Gcc-patches
On Wed, Jun 3, 2020 at 2:38 PM Richard Biener wrote: > > On June 3, 2020 8:23:14 PM GMT+02:00, Segher Boessenkool > wrote: > >On Wed, Jun 03, 2020 at 07:23:47PM +0200, Richard Biener wrote: > >> >> mask = vec_cmp of the comparison > >> >> true_masked = true_op & mask; > >> >> false_masked

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Richard Biener via Gcc-patches
On June 3, 2020 8:23:14 PM GMT+02:00, Segher Boessenkool wrote: >On Wed, Jun 03, 2020 at 07:23:47PM +0200, Richard Biener wrote: >> >> mask = vec_cmp of the comparison >> >> true_masked = true_op & mask; >> >> false_masked = false_op & ~mask; >> >> result = true_masked | false_masked; >>

Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments

2020-06-03 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote: > As reported by several Buildroot users [1][2][3], the gcc build > may fail while running selftests makefile target. > > The problem only occurs when ccache is used with gcc 9 and 10, > probably due to a race condition. > > W

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Segher Boessenkool
Hi Martin, Okay, let's try this out. Okay for trunk. Thanks for the work! On Tue, Jun 02, 2020 at 05:00:56PM +0200, Martin Liška wrote: > >From 22db04d058c9bbd140041e7aa2caf1613767095a Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Tue, 2 Jun 2020 15:29:37 +0200 > Subject: [PATCH] rs600

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Segher Boessenkool
On Wed, Jun 03, 2020 at 07:23:47PM +0200, Richard Biener wrote: > >> mask = vec_cmp of the comparison > >> true_masked = true_op & mask; > >> false_masked = false_op & ~mask; > >> result = true_masked | false_masked; > >> > >> but I believe this would be dead code never triggered. > > > >B

[pushed] c++: Fix VLA in template [PR95232]

2020-06-03 Thread Jason Merrill via Gcc-patches
In a non-template, grokdeclarator notices when we build a pointer to a variably-modified type, and inserts a TYPE_DECL to make sure that type gets gimplified. But in a template we can't always recognize a variably-modified type, so we need to deal with it at instantiation time. Tested x86_64-pc-l

Re: [Patch, fortran] PR fortran/66833,67938,95214 ICE on using assumed rank character array

2020-06-03 Thread Thomas Koenig via Gcc-patches
Hi Jose, Proposed patch to PRs 66833, 67938 and 95214 ICE(s) on using assumed rank character array in different situations. Reviewed and committed with some trival changes: It is better not to use STOP codes > 255, so I just counted them up. Some changes to the ChangeLog: Mentioned all PRs t

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Richard Biener via Gcc-patches
On June 3, 2020 7:01:39 PM GMT+02:00, Segher Boessenkool wrote: >Hi! > >On Wed, Jun 03, 2020 at 04:46:12PM +0200, Richard Biener wrote: >> On Wed, Jun 3, 2020 at 4:17 PM David Edelsohn >wrote: >> > On Wed, Jun 3, 2020 at 9:41 AM Richard Sandiford >> > wrote: >> > > Well, it seems unfortunate to

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Segher Boessenkool
Hi! On Wed, Jun 03, 2020 at 04:46:12PM +0200, Richard Biener wrote: > On Wed, Jun 3, 2020 at 4:17 PM David Edelsohn wrote: > > On Wed, Jun 3, 2020 at 9:41 AM Richard Sandiford > > wrote: > > > Well, it seems unfortunate to have to do that. > > > > > > I think Martin's powerpc patch is the correc

Re: [PATCH] libgccjit: Add new gcc_jit_context_new_blob entry point

2020-06-03 Thread Andrea Corallo
David Malcolm writes: > Thanks for the patch. > > Is this entrypoint only needed for the ahead-of-time use case? If the > client code is instead going to do an in-memory compilation, then I > believe it can simply build the buffer of data in memory and expose it > to the jitted code via gcc_jit_

Re: [PATCH 2/7] [OpenACC] Adjust dynamic reference count semantics

2020-06-03 Thread Thomas Schwinge
Hi Julian! On 2020-06-03T14:36:14+0200, I wrote: > On 2020-05-22T15:16:05-0700, Julian Brown wrote: >> This patch adjusts the semantics of dynamic reference counts, as described >> in the parent email. > > Thanks! > > A few questions, but no need to send an updated patch. > >> --- a/libgomp/oacc-

[committed] jit: implement BT_CONST_VOLATILE_PTR [PR 95306]

2020-06-03 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-877-g6d36cc21b69d952967a4df6653954f572a101796. gcc/jit/ChangeLog: PR jit/95306 * jit-builtins.c (builtins_manager::make_primitive_type): Implement BT_CONST_VOLATILE_PTR. gcc/testsuite/Ch

Re: [PATCH] libgccjit: Add new gcc_jit_context_new_blob entry point

2020-06-03 Thread David Malcolm via Gcc-patches
On Wed, 2020-06-03 at 12:11 +0200, Andrea Corallo wrote: > Hi all, > > I'd like to submit this patch to extend libgccjit to allow for > storing > binary blobs (equivalent to initialized char arrays). > > The use-case is when libgccjit is used as a back-end for dynamic > programming languages. In

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Richard Biener via Gcc-patches
On Wed, Jun 3, 2020 at 4:17 PM David Edelsohn wrote: > > On Wed, Jun 3, 2020 at 9:41 AM Richard Sandiford > wrote: > > > > Richard Biener writes: > > > On Tue, Jun 2, 2020 at 5:00 PM Martin Liška wrote: > > >> > > >> On 6/2/20 1:09 PM, Richard Biener wrote: > > >> > So please be constructive.

Re: [PATCH] Add pattern for pointer-diff on addresses with same base/offset (PR 94234)

2020-06-03 Thread Marc Glisse
On Wed, 3 Jun 2020, Feng Xue OS via Gcc-patches wrote: Ah, looking at the PR, you decided to perform the operation as unsigned because that has fewer NOP conversions, which, in that particular testcase where the offsets are originally unsigned, means we simplify better. But I would expect it to

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread David Edelsohn via Gcc-patches
On Wed, Jun 3, 2020 at 9:41 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Jun 2, 2020 at 5:00 PM Martin Liška wrote: > >> > >> On 6/2/20 1:09 PM, Richard Biener wrote: > >> > So please be constructive. Like, provide a testcase that ICEs > >> > with the FAILs replaced by gcc

[PATCH] tree-optimization/95495 - use SLP_TREE_REPRESENTATIVE in assertion

2020-06-03 Thread Richard Biener
This fixes a place where I missed to use SLP_TREE_REPRESENTATIVE after its introduction. 2020-06-03 Richard Biener PR tree-optimization/95495 * tree-vect-slp.c (vect_slp_analyze_node_operations): Use SLP_TREE_REPRESENTATIVE in the shift assertion. * gcc.dg/vect

[PATCH] tree-optimization/95487 - use a truth type for scatter masks

2020-06-03 Thread Richard Biener
I am testing the following patch on x86_64-unknown-linux-gnu. Test coverage for autovectorization of scatters seems rare. Richard. This makes sure to get a truth type for scatter masks even when they are invariant. 2020-06-03 Richard Biener PR tree-optimization/95487 * tr

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-03 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jun 2, 2020 at 5:00 PM Martin Liška wrote: >> >> On 6/2/20 1:09 PM, Richard Biener wrote: >> > So please be constructive. Like, provide a testcase that ICEs >> > with the FAILs replaced by gcc_unreachable (). Martin, may I suggest >> > to do this replacement and

Re: arm: Fix vfp_operand_register for VFP HI regs

2020-06-03 Thread Christophe Lyon via Gcc-patches
Hi, On Thu, 14 May 2020 at 17:08, Christophe Lyon wrote: > > On Fri, 1 May 2020 at 12:57, Kyrylo Tkachov wrote: > > > > > > > > > -Original Message- > > > From: Christophe Lyon > > > Sent: 30 April 2020 09:51 > > > To: Kyrylo Tkachov > > > Cc: gcc-patches@gcc.gnu.org > > > Subject: Re

Re: [PATCH] middle-end/95493 - bogus MEM_ATTRs from variable ARRAY_REFs

2020-06-03 Thread Richard Biener
On Wed, 3 Jun 2020, Richard Biener wrote: > > The following patch avoids keeping the inherited MEM_ATTRs when > set_mem_attributes_minus_bitpos is called with a variable ARRAY_REF. > The inherited ones may not reflect the correct offset. > > We try to preserve the MEM_EXPR from the base object e

Re: [PATCH v2] arm: Warn if IRQ handler is not compiled with -mgeneral-regs-only [PR target/94743]

2020-06-03 Thread Christophe Lyon via Gcc-patches
Ping? https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545747.html On Wed, 27 May 2020 at 13:52, Christophe Lyon wrote: > > Ping? > > On Thu, 14 May 2020 at 16:57, Christophe Lyon > wrote: > > > > The interrupt attribute does not guarantee that the FP registers are > > saved, which can result

Re: [PATCH 2/7] [OpenACC] Adjust dynamic reference count semantics

2020-06-03 Thread Thomas Schwinge
Hi Julian! On 2020-05-22T15:16:05-0700, Julian Brown wrote: > This patch adjusts the semantics of dynamic reference counts, as described > in the parent email. Thanks! A few questions, but no need to send an updated patch. > --- a/libgomp/oacc-mem.c > +++ b/libgomp/oacc-mem.c > @@ -1018,13 +1

[Patch, fortran] PR fortran/94022 - Array slices of assumed-size arrays

2020-06-03 Thread José Rui Faustino de Sousa via Gcc-patches
Hi All! Proposed patch to Bug 94022 - Array slices of assumed-size arrays. Patch tested only on x86_64-pc-linux-gnu. Make sure that when passing array sections of assumed-size arrays to procedures expecting an assumed-rank array the upper bound of the last dimension of the array section does

[PATCH] middle-end/95493 - bogus MEM_ATTRs from variable ARRAY_REFs

2020-06-03 Thread Richard Biener
The following patch avoids keeping the inherited MEM_ATTRs when set_mem_attributes_minus_bitpos is called with a variable ARRAY_REF. The inherited ones may not reflect the correct offset. We try to preserve the MEM_EXPR from the base object expansion but we have to make sure to also preserve the

[PATCH] simplify visited flag unsetting in SLP scalar cost computation

2020-06-03 Thread Richard Biener
This changes the loop over all stmts to a loop over all costed stmts. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. 2020-06-03 Richard Biener * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Loop over the cost vector to unset the visited flag on stmts. ---

Re: [PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-06-03 Thread Richard Sandiford
"Kewen.Lin" writes: > on 2020/6/3 下午5:27, Richard Biener wrote: >> On Wed, 3 Jun 2020, Kewen.Lin wrote: >> >>> on 2020/6/3 下午3:07, Richard Biener wrote: On Wed, 3 Jun 2020, Kewen.Lin wrote: > Hi Richi, > > > snip ... > >> >> I'd just mention there are other targets that

Re: [PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-06-03 Thread Kewen.Lin via Gcc-patches
on 2020/6/3 下午5:27, Richard Biener wrote: > On Wed, 3 Jun 2020, Kewen.Lin wrote: > >> on 2020/6/3 下午3:07, Richard Biener wrote: >>> On Wed, 3 Jun 2020, Kewen.Lin wrote: >>> Hi Richi, snip ... > > I'd just mention there are other targets that have the choice between > the ab

RE: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-03 Thread Naveen Hurugalawadi via Gcc-patches
Hi Richard, Thanks for reviewing the patch and sharing your comments. >> pattern should be guarded with !TYPE_OVERFLOW_SANITIZED >> and/or !TYPE_OVERFLOW_TRAPS Done. >> can you add some cases with unsigned types and types >> smaller than int (thus with integral promotion applied)? Done. Please

[PATCH] libgccjit: Add new gcc_jit_context_new_blob entry point

2020-06-03 Thread Andrea Corallo
Hi all, I'd like to submit this patch to extend libgccjit to allow for storing binary blobs (equivalent to initialized char arrays). The use-case is when libgccjit is used as a back-end for dynamic programming languages. In this case is often necessary to store serialized objects into the compil

Re: [PATCH 1/2] [aarch64] Rework fpcr fpsr getter/setter builtins

2020-06-03 Thread Andrea Corallo
Andrea Corallo writes: > Andrea Corallo writes: > >> Hi all, >> >> I'd like to submit this patch introducing the following 64bit builtins >> variants as FPCR and FPSR registers getter/setter: >> >> unsigned long long __builtin_aarch64_get_fpcr64 () >> void __builtin_aarch64_set_fpcr64 (unsigned

[Ada] Spurious ineffective with clause warnings on use type clause

2020-06-03 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler generates spurious ineffective with_clause warnings under -gnatwr when the only use of the with'ed package occurs in a use_type clause in the context area of the body of the target package and such use_type clause has multiple prefixes. Tested on x86_

[Ada] Fix for missing calls to Adjust primitive with nested generics

2020-06-03 Thread Pierre-Marie de Rodat
This changes the strategy for dealing with the limitations of the Has_Private_View mechanism, which is responsible for updating the views in instantiations of a type first declared as private; this is necessary because the views of a type may be different at the declaration point of a generic and a

[Ada] Add detection of uninitialized big reals

2020-06-03 Thread Pierre-Marie de Rodat
This was there for big integers after the previous code changes but not (yet) for big reals, now done. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Arnaud Charlet gcc/ada/ * libgnat/a-nbnbin.ads: Minor reformatting. * libgnat/a-nbnbre.ads, libgnat/a-nbnbre.adb

[Ada] Get rid of more references to Universal_Integer in expanded code

2020-06-03 Thread Pierre-Marie de Rodat
This changes a few places in the System.Atomic_Operations packages to using static expressions, which guarantees that contant folding is done in the front-end instead of the code generator. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Eric Botcazou gcc/

[Ada] Get rid of more references to Universal_Integer in expanded code

2020-06-03 Thread Pierre-Marie de Rodat
This further tweaks the expanded code generated by the front-end for attributes returning Universal_Integer, in particular removes hardcoded references to it and fixes a couple of type mismatches in the process. The only observable change is that 'Val is now expanded by the front-end for integer t

[Ada] Improve 'Val implementation for some enumeration types

2020-06-03 Thread Pierre-Marie de Rodat
This improves the expanded code generated by the front-end for the Val, Pred and Succ attributes when they are applied to an enumeration type with a non-standard but contiguous representation. There is no need to call the Rep_To_Pos routine to generate the required constraint checks in this case,

[Ada] Support pragma Allow_Integer_Address on 64-bit targets

2020-06-03 Thread Pierre-Marie de Rodat
This implements the documented semantics of the pragma for operators, that is to say, introduces an implicit unchecked conversion from the integer value to type System.Address, thus making the pragma work on 64-bit targets as well. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Eri

[Ada] Iterate with procedural versions of Next_... routines where possible

2020-06-03 Thread Pierre-Marie de Rodat
Routines like Next_Index and Next_Formal are implemented both as procedures and functions. The procedure variant seems meant to be used when iterating, e.g.: Next_Formal (Formal); because it is more readable than the corresponding functions: Formal := Next_Formal (Formal); (and it is inli

[Ada] Remove more cases of empty loops

2020-06-03 Thread Pierre-Marie de Rodat
We introduce new functions to detect a list of statements with no side effects as well as a loop with no side effect so that we can then mark them for removal. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Arnaud Charlet gcc/ada/ * sem_util.ads, sem_util.adb (Side_Effe

[Ada] Initial infrastructure for adding a tree checker

2020-06-03 Thread Pierre-Marie de Rodat
This is part of a larger project to add a tree checker in GNAT to check that the GNAT tree out of expansion is properly formed before passing it to the code generator. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Arnaud Charlet gcc/ada/ * frontend.adb (Frontend): Call

[Ada] Avoid creating temporaries in Universal_Integer, continued

2020-06-03 Thread Pierre-Marie de Rodat
This gets rid of one more case where the front-end would create a temporary in Universal_Integer type, which is unnecessary. The reason is that Universal_Integer must be a type as large as the largest supported integer type and, therefore, can be much larger than what is really needed here. No fu

[Ada] Improve handling of SPARK_Mode in generic instances

2020-06-03 Thread Pierre-Marie de Rodat
SPARK_Mode aspect/pragma used to signal parts of the code in SPARK is now allowed to be Off inside generic instantiations for parts of the code that should not be considered in SPARK. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Yannick Moy gcc/ada/ * rtsfind.adb (Loa

[Ada] Small improvement to Expand_N_Unchecked_Type_Conversion

2020-06-03 Thread Pierre-Marie de Rodat
This extends the constant folding done in the procedure to literals of enumeration types. This is just a matter of calling Expr_Rep_Value in lieu of Expr_Value on the operand, since the result is the bit pattern. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-0

[Ada] Small housekeeping work in Check_Private_View

2020-06-03 Thread Pierre-Marie de Rodat
This reverts a series of 3 old changes made without real explanation to the second main case of Check_Private_View, which appear to be largely obsolete by now and have made it quite hard to follow, and also changes it to using In_Open_Scopes as the other cases. No functional changes. Tested on x8

[Ada] Incorrect accessibility checking on aliased formals

2020-06-03 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler incorrectly omits static and dynamic accessibility checks on explicitly aliased parameters within functions. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Justin Squirek gcc/ada/ * libgnat/a-cborse.adb, libgnat/a-cihase.ad

[Ada] Avoid creating temporaries in Universal_Integer for range checks

2020-06-03 Thread Pierre-Marie de Rodat
This extends the exception made for attribute references in the code generating range checks to the simple expressions containing a single attribute reference, thus avoiding to create a temporary whose type is Universal_Integer when the attribute returns Universal_Integer, which is the common case.

[Ada] Minor change to comment in System.Regexp spec

2020-06-03 Thread Pierre-Marie de Rodat
Fix the comment about the form of a 'term'. Allow a sequence of elmts, in {...}, but not nested {...}. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Bob Duff gcc/ada/ * libgnat/s-regexp.ads: Fix comment--- gcc/ada/libgnat/s-regexp.ads +++ gcc/ada/libgnat/s-regexp.ads @

[Ada] Get rid of more references to Universal_Integer in expanded code

2020-06-03 Thread Pierre-Marie de Rodat
This fixes a couple of places to using the standard idiom for choosing an appropriately-sized integer type. No practical change since the old and the new type are effectively identical. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Eric Botcazou gcc/ada/ * exp_attr.ad

[Ada] Debug info not available on subp having a class-wide precondition

2020-06-03 Thread Pierre-Marie de Rodat
The debugger doesn't allow stepping into a subprogram when the subprogram has a class-wide precondition (or postcondition). The compiler generates wrappers for such subprograms and creates a new "class-wide clone" of the subprogram, and the Needs_Debug_Info flag isn't set on the clone subprogram's

[Ada] Unnesting problems with expansion of Loop_Entry attribute

2020-06-03 Thread Pierre-Marie de Rodat
For expansion of a Loop_Entry attribute, a function body is generated in association with the condition of a generated while loop, and the entities within the function need to have their scopes reset to the function Entity_Id, for proper handling of up-level-reference processing in the GNAT-LLVM co

[Ada] Remove -gnatt switch processing

2020-06-03 Thread Pierre-Marie de Rodat
ASIS is now maintained on a separate branch, so newer compilers no longer need to generate ASIS trees. First remove processing of -gnatt, then in a second stage, we'll remove all associated code. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Arnaud Charlet gcc/ada/ * s

[Ada] Remove ASIS tree generation

2020-06-03 Thread Pierre-Marie de Rodat
This patch removes completely the processing associated with -gnatt. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-03 Arnaud Charlet gcc/ada/ * aspects.adb, aspects.ads, atree.adb, atree.ads, elists.adb, elists.ads, fname.adb, fname.ads, gnat1drv.adb, lib.adb,

[Ada] More efficient System.Random_Numbers.Random_Discrete for 32-bit types

2020-06-03 Thread Pierre-Marie de Rodat
The current implementation is suboptimal for 32-bit or smaller types because it does the computation in Universal_Integer and can generate checks. That's unnecessary in the common case, i.e. for integer types or enumeration types with contiguous representation. No functional changes. Tested on x

Re: [PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-06-03 Thread Richard Biener
On Wed, 3 Jun 2020, Kewen.Lin wrote: > on 2020/6/3 下午3:07, Richard Biener wrote: > > On Wed, 3 Jun 2020, Kewen.Lin wrote: > > > >> Hi Richi, > >> > >> on 2020/6/2 下午7:38, Richard Biener wrote: > >>> On Thu, 28 May 2020, Kewen.Lin wrote: > >>> > Hi, > > This is one repost and you ca

Re: [PATCH 2/2] Tune memcpy and memset for Zen cores.

2020-06-03 Thread Martin Liška
On 6/1/20 1:40 PM, Martin Liška wrote: Adding Honza as Uros recommended him for a review. @Honza asked me personally to remind him this patch ;) Martin

  1   2   >