Re: Implement iterative dataflow in modref to track parameters

2020-09-26 Thread Richard Biener
On September 26, 2020 10:20:20 AM GMT+02:00, Jan Hubicka wrote: >Hi, >this patchs finishes the parameter tracking by implementing the >iterative >dataflow in propagation stage. This is necessary since we now can >propagate how the pointers are passed around recursive calls (as done >in >a testcase

Re: [PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-09-28 Thread Richard Biener
On Fri, 25 Sep 2020, Jason Merrill wrote: > On 9/25/20 2:30 AM, Richard Biener wrote: > > On Thu, 24 Sep 2020, Jason Merrill wrote: > > > >> On 9/24/20 3:43 AM, Richard Biener wrote: > >>> On Wed, 23 Sep 2020, Jason Merrill wrote: > >>> > >&g

Re: Export info about side effects of builtins out of tree-ssa-alias.c

2020-09-28 Thread Richard Biener
ef_may_alias_errno (ref))); > - } > - /* Freeing memory kills the pointed-to memory. More importantly > -the call has to serve as a barrier for moving loads and stores > -across it. */ > - case BUILT_IN_FREE: > - case BUILT_IN_VA_END: > - { > - tree ptr = gimple_call_arg (call, 0); > - return ptr_deref_may_alias_ref_p_1 (ptr, ref); > - } > - /* Realloc serves both as allocation point and deallocation point. */ > - case BUILT_IN_REALLOC: > - { > - tree ptr = gimple_call_arg (call, 0); > - /* Unix98 specifies that errno is set on allocation failure. */ > - return ((flag_errno_math > - && targetm.ref_may_alias_errno (ref)) > - || ptr_deref_may_alias_ref_p_1 (ptr, ref)); > - } > - case BUILT_IN_GAMMA_R: > - case BUILT_IN_GAMMAF_R: > - case BUILT_IN_GAMMAL_R: > - case BUILT_IN_LGAMMA_R: > - case BUILT_IN_LGAMMAF_R: > - case BUILT_IN_LGAMMAL_R: > - { > - tree out = gimple_call_arg (call, 1); > - if (ptr_deref_may_alias_ref_p_1 (out, ref)) > - return true; > - if (flag_errno_math) > - break; > - return false; > - } > - case BUILT_IN_FREXP: > - case BUILT_IN_FREXPF: > - case BUILT_IN_FREXPL: > - case BUILT_IN_MODF: > - case BUILT_IN_MODFF: > - case BUILT_IN_MODFL: > - { > - tree out = gimple_call_arg (call, 1); > - return ptr_deref_may_alias_ref_p_1 (out, ref); > - } > - case BUILT_IN_REMQUO: > - case BUILT_IN_REMQUOF: > - case BUILT_IN_REMQUOL: > - { > - tree out = gimple_call_arg (call, 2); > - if (ptr_deref_may_alias_ref_p_1 (out, ref)) > - return true; > - if (flag_errno_math) > - break; > - return false; > - } > - case BUILT_IN_SINCOS: > - case BUILT_IN_SINCOSF: > - case BUILT_IN_SINCOSL: > - { > - tree sin = gimple_call_arg (call, 1); > - tree cos = gimple_call_arg (call, 2); > - return (ptr_deref_may_alias_ref_p_1 (sin, ref) > - || ptr_deref_may_alias_ref_p_1 (cos, ref)); > - } > - /* __sync_* builtins and some OpenMP builtins act as threading > -barriers. */ > -#undef DEF_SYNC_BUILTIN > -#define DEF_SYNC_BUILTIN(ENUM, NAME, TYPE, ATTRS) case ENUM: > -#include "sync-builtins.def" > -#undef DEF_SYNC_BUILTIN > - case BUILT_IN_GOMP_ATOMIC_START: > - case BUILT_IN_GOMP_ATOMIC_END: > - case BUILT_IN_GOMP_BARRIER: > - case BUILT_IN_GOMP_BARRIER_CANCEL: > - case BUILT_IN_GOMP_TASKWAIT: > - case BUILT_IN_GOMP_TASKGROUP_END: > - case BUILT_IN_GOMP_CRITICAL_START: > - case BUILT_IN_GOMP_CRITICAL_END: > - case BUILT_IN_GOMP_CRITICAL_NAME_START: > - case BUILT_IN_GOMP_CRITICAL_NAME_END: > - case BUILT_IN_GOMP_LOOP_END: > - case BUILT_IN_GOMP_LOOP_END_CANCEL: > - case BUILT_IN_GOMP_ORDERED_START: > - case BUILT_IN_GOMP_ORDERED_END: > - case BUILT_IN_GOMP_SECTIONS_END: > - case BUILT_IN_GOMP_SECTIONS_END_CANCEL: > - case BUILT_IN_GOMP_SINGLE_COPY_START: > - case BUILT_IN_GOMP_SINGLE_COPY_END: > - return true; > - default: > - /* Fallthru to general call handling. */; > - } > + } > +} > >/* Check if base is a global static variable that is not written > by the function. */ > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: Export info about side effects of builtins out of tree-ssa-alias.c

2020-09-28 Thread Richard Biener
): > > > - CASE_BUILT_IN_TM_STORE (4): > > > - CASE_BUILT_IN_TM_STORE (8): > > > - CASE_BUILT_IN_TM_STORE (FLOAT): > > > - CASE_BUILT_IN_TM_STORE (DOUBLE): > > > - CASE_BUILT_IN_TM_STORE (LDOUBLE): > > > - CASE_BUILT_IN_TM_STORE (M64): > &g

Re: Export info about side effects of builtins out of tree-ssa-alias.c

2020-09-28 Thread Richard Biener
On Mon, 28 Sep 2020, Jan Hubicka wrote: > > > > Hmm, no - it expects the gimple_call_use/clobber_set to include > > actions of the called function itself (const functions none here) > > but for passed-by-value the loads may be in the call itself > > which is where it uses gimple_call_arg_flags to

Re: Export info about side effects of builtins out of tree-ssa-alias.c

2020-09-28 Thread Richard Biener
On Mon, 28 Sep 2020, Jan Hubicka wrote: > > On Mon, 28 Sep 2020, Jan Hubicka wrote: > > > > > > > > > > Hmm, no - it expects the gimple_call_use/clobber_set to include > > > > actions of the called function itself (const functions none here) > > > > but for passed-by-value the loads may be in th

Re: [PATCH v2 0/16][RFC][AArch64/Arm/SVE/SVE2/MVE]middle-end Add support for SLP vectorization of complex number instructions.

2020-09-28 Thread Richard Biener
On Fri, 25 Sep 2020, Tamar Christina wrote: > Hi All, > > This patch series adds support for SLP vectorization of complex instructions > [1]. > > These instructions exist only in their vector forms and require you to > recognize > two statements in parallel. Complex operations usually require

Re: [PATCH v2 1/16]middle-end: Refactor refcnt to use SLP_TREE_REF_COUNT for consistency

2020-09-28 Thread Richard Biener
gt; * tree-vect-slp.c (_slp_tree::_slp_tree, _slp_tree::~_slp_tree, > vect_free_slp_tree, vect_build_slp_tree, vect_print_slp_tree, > slp_copy_subtree, vect_attempt_slp_rearrange_stmts): Use it. > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: [PATCH v2 3/16]middle-end Add basic SLP pattern matching scaffolding.

2020-09-28 Thread Richard Biener
> Thanks, > Tamar > > gcc/ChangeLog: > > * Makefile.in (tree-vect-slp-patterns.o): New. > * doc/passes.texi: Update documentation. > * tree-vect-slp.c (vect_match_slp_patterns_2, vect_match_slp_patterns): > New. > (vect_analyze_slp_

Re: [PATCH v2 4/16]middle-end: Add dissolve code for when SLP fails and non-SLP loop vectorization is to be tried.

2020-09-28 Thread Richard Biener
MT simply gets replaced). I wonder if it would be easier to record the SLP pattern stmt only in SLP_TREE_REPRESENTATIVE but _not_ in SLP_TREE_SCALAR_STMTS (just leave those alone)? Richard. > Thanks, > Tamar > > gcc/ChangeLog: > > * tree-vect-loop.c (vect_dissolve_sl

Re: [PATCH v2 5/16]middle-end: Add shared machinery for matching patterns involving complex numbers.

2020-09-28 Thread Richard Biener
seem to share the initial mixed plus/minus, then we have the multiplication on one or both operand cases. Richard. > Thanks, > Tamar > > gcc/ChangeLog: > > * tree-vect-slp-patterns.c (complex_operation_t,class ComplexPattern): > New. > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

RE: [PATCH v2 5/16]middle-end: Add shared machinery for matching patterns involving complex numbers.

2020-09-28 Thread Richard Biener
On Mon, 28 Sep 2020, Tamar Christina wrote: > Hi Richi, > > > -Original Message- > > From: rguent...@c653.arch.suse.de On > > Behalf Of Richard Biener > > Sent: Monday, September 28, 2020 2:22 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc

RE: [PATCH v2 3/16]middle-end Add basic SLP pattern matching scaffolding.

2020-09-28 Thread Richard Biener
On Mon, 28 Sep 2020, Tamar Christina wrote: > > > > -Original Message- > > From: Gcc-patches On Behalf Of Tamar > > Christina > > Sent: Monday, September 28, 2020 3:56 PM > > To: Richard Biener > > Cc: nd ; gcc-patches@gcc.gnu.org; o...@ucw

Re: [PATCH v2 3/16]middle-end Add basic SLP pattern matching scaffolding.

2020-09-29 Thread Richard Biener
On Tue, 29 Sep 2020, Richard Sandiford wrote: > Richard Biener writes: > >> > > @@ -2192,6 +2378,17 @@ vect_analyze_slp_instance (vec_info *vinfo, > >> > > &tree_size, bst_map); > >> > >if (node != NULL)

Re: [PATCH v2 6/16]middle-end Add Complex Addition with rotation detection

2020-09-29 Thread Richard Biener
gt; +OPTAB_D (cadd270_optab, "cadd270$a3") > > OPTAB_D (cos_optab, "cos$a2") > > OPTAB_D (cosh_optab, "cosh$a2") > > OPTAB_D (exp10_optab, "exp10$a2") > > diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c > > index > > 6453a5b1b6464dba833adc2c2a194db5e712bb79..b2b0ac62e9a69145470f41d2bac736dd970be735 > > 100644 > > --- a/gcc/tree-vect-slp-patterns.c > > +++ b/gcc/tree-vect-slp-patterns.c > > @@ -663,12 +663,94 @@ graceful_exit: > > } > > }; > > > > +class ComplexAddPattern : public ComplexPattern > > Another nitpick, sorry, but type names should be lower case rather than > CamelCase. > > Thanks, > Richard > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

[PATCH] tree-optimization/97238 - fix typo causing ICE

2020-09-29 Thread Richard Biener
This fixes a typo causing a NULL dereference. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-09-29 Richard Biener PR tree-optimization/97238 * tree-ssa-reassoc.c (ovce_extract_ops): Fix typo. * gcc.dg/pr97238.c: New testcase. --- gcc/testsuite

[PATCH] move permute optimization to optimize-slp

2020-09-29 Thread Richard Biener
This moves optimizing permutes of SLP reductions to vect_optimize_slp, eliding the global slp_loads array. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-09-29 Richard Biener * tree-vect-slp.c (vect_analyze_slp): Move SLP reduction re-arrangement and SLP

[PATCH] tree-optimization/97241 - fix ICE in reduction vectorization

2020-09-29 Thread Richard Biener
The following moves an ad-hoc attempt at discovering the SLP node for a stmt to the place where we can find it in lock-step when we find the stmt itself. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2020-09-29 Richard Biener PR tree-optimization/97241 * tree

Re: Fix internal fnspec

2020-09-29 Thread Richard Biener
On September 29, 2020 4:17:30 PM GMT+02:00, Jan Hubicka wrote: >Hi, >this patch fixes accidental \000 in fnspec strings for internal fns. >OK? OK. Richard. >Honza > > * internal-fn.c (DEF_INTERNAL_FN): Fix call of build_string. >diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c >index

Re: Add trailing dots to fortran io fnspecs to match signature

2020-09-29 Thread Richard Biener
On September 29, 2020 4:20:42 PM GMT+02:00, Jan Hubicka wrote: >Hi, >this patch is not needed but makes it possible to sanity check that >fnspec match function signature. It turns out that there are quite few >mistakes in that in trans-decl and one mistake here. >Transfer_derived has additional pa

Re: Add trailing dots to fortran io fnspecs to match signature

2020-09-29 Thread Richard Biener
node, 4, dt_parm_type, pvoid_type_node, > > > integer_type_node, gfc_charlen_type_node); > > > > > >iocall[IOCALL_X_ARRAY_WRITE] = > > >gfc_build_library_function_decl_with_spec ( > > >- get_identifier (PREFIX("transfer_array_write")), ".wr&

Re: [SLP][VECT] Add check to fix 96837

2020-09-29 Thread Richard Biener
vector constructors. > > gcc/testsuite/ChangeLog: > > 2020-09-29 Joel Hutton > > PR target/96837 > * gcc.dg/vect/bb-slp-49.c: New test. -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

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

2020-09-30 Thread Richard Biener
*/ > > +/* { dg-require-effective-target fenv_exceptions } */ > > +/* { dg-options "-lm -fno-builtin" } */ > > That -fno-builtin looks very strange... Comment what it is for? > > > +#define FAIL(v, e) printf("ERROR, __builtin_fegetround() returned %d," \ > > + " not the expecected value %d\n", v, e); > > (Typo, "expected") > > The rs6000 part is okay for trunk (with those modifications), after the > generic parts is approved. Thanks! > > > Segher > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

[PATCH] amend SLP reduction testcases

2020-09-30 Thread Richard Biener
This amends SLP reduction testcases that currently trigger vect_attempt_slp_rearrange_stmts eliding load permutations to verify this is actually happening. tested on x86_64-unknown-linux-gnu, pushed 2020-09-30 Richard Biener * gcc.dg/vect/pr37027.c: Amend. * gcc.dg/vect

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

2020-09-30 Thread Richard Biener
On Wed, 30 Sep 2020, Segher Boessenkool wrote: > On Wed, Sep 30, 2020 at 09:02:34AM +0200, Richard Biener wrote: > > On Tue, 29 Sep 2020, Segher Boessenkool wrote: > > > I don't see much about optabs in the docs either. Add some text to > > > optabs.def itse

[PATCH] tree-optimization/97255 - missing vector bool pattern of SRAed bool

2020-10-01 Thread Richard Biener
-gnu, pushed to trunk. 2020-10-01 Richard Biener * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle VIEW_CONVERT_EXPR. * g++.dg/vect/pr97255.cc: New testcase. --- gcc/testsuite/g++.dg/vect/pr97255.cc | 44 gcc/tree-vect-patterns.c

Re: [PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-10-01 Thread Richard Biener
On Wed, 30 Sep 2020, Jason Merrill wrote: > On 9/28/20 3:09 PM, Jason Merrill wrote: > > On 9/28/20 3:56 AM, Richard Biener wrote: > >> On Fri, 25 Sep 2020, Jason Merrill wrote: > >> > >>> On 9/25/20 2:30 AM, Richard Biener wrote: > >>>> On Th

[PATCH] tree-optimization/97236 - fix bad use of VMAT_CONTIGUOUS

2020-10-01 Thread Richard Biener
This avoids using VMAT_CONTIGUOUS with single-element interleaving when using V1mode vectors. Instead keep VMAT_ELEMENTWISE but continue to avoid load-lanes and gathers. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2020-10-01 Richard Biener PR tree

Re: Commonize handling of attr-fnspec

2020-10-01 Thread Richard Biener
ol > + arg_direct_p (unsigned int i) > + { > +unsigned int idx = arg_idx (i); > +gcc_checking_assert (arg_specified_p (i)); > +return str[idx] == 'R' || str[idx] == 'W'; > + } > + > + /* True if argument is used. */ > + bool > + arg_use

Re: Commonize handling of attr-fnspec

2020-10-01 Thread Richard Biener
e fnspec = lookup_attribute ("fn spec", > - TYPE_ATTRIBUTES (TREE_TYPE (fun->decl))); > - if (fnspec) > + tree fnspec_tree > + = lookup_attribute ("fn spec", > + TYPE_ATTRIBUTES (TREE_TYPE (fun->decl))); > + if (fnspec_tree) > { > - fnspec = TREE_VALUE (TREE_VALUE (fnspec)); > - unsigned i = 1; > + attr_fnspec fnspec (TREE_VALUE (TREE_VALUE (fnspec_tree))); > + unsigned i = 0; >for (tree arg = DECL_ARGUMENTS (cfun->decl); > arg; arg = DECL_CHAIN (arg), ++i) > { > - if (i >= (unsigned) TREE_STRING_LENGTH (fnspec)) > - break; > - if (TREE_STRING_POINTER (fnspec)[i] == 'R' > - || TREE_STRING_POINTER (fnspec)[i] == 'r') > + if (!fnspec.arg_specified_p (i)) > +break; > + if (fnspec.arg_readonly_p (i)) > { > tree name = ssa_default_def (fun, arg); > if (name) > diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c > index fe390d4ffbe..2b2d53ebb88 100644 > --- a/gcc/tree-ssa-alias.c > +++ b/gcc/tree-ssa-alias.c > @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see > #include "varasm.h" > #include "ipa-modref-tree.h" > #include "ipa-modref.h" > +#include "attr-fnspec.h" > > /* Broad overview of how alias analysis on gimple works: > > @@ -3984,3 +3985,42 @@ walk_aliased_vdefs (ao_ref *ref, tree vdef, >return ret; > } > > +/* Verify validity of the fnspec string. > + See attr-fnspec.h for details. */ > + > +void > +attr_fnspec::verify () > +{ > + /* FIXME: Fortran trans-decl.c contains multiple wrong fnspec strings. > + re-enable verification after these are fixed. */ > + return; > + bool err = false; > + > + /* Check return value specifier. */ > + if (len < return_desc_size) > +err = true; > + else if (str[0] < '1' || str[0] > '4') > +&& str[0] != '.' && str[0] != 'm') > +err = true; > + > + /* Now check all parameters. */ > + for (unsigned int i = 0; arg_specified_p (i); i++) > +{ > + unsigned int idx = arg_idx (i); > + switch (str[idx]) > + { > + case 'x': > + case 'X': > + case 'r': > + case 'R': > + case 'w': > + case 'W': > + case '.': > + break; > + default: > + err = true; > + } > +} > + if (err) > +internal_error ("invalid fn spec attribute %s", str); > +} > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: Add streaming of poly_int64

2020-10-02 Thread Richard Biener
; > +poly_int64 streamer_read_poly_int64 (class lto_input_block *); > gcov_type streamer_read_gcov_count (class lto_input_block *); > wide_int streamer_read_wide_int (class lto_input_block *); > widest_int streamer_read_widest_int (class lto_input_block *); > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: [PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-10-02 Thread Richard Biener
On Thu, 1 Oct 2020, Jason Merrill wrote: > On 10/1/20 5:26 AM, Richard Biener wrote: > > On Wed, 30 Sep 2020, Jason Merrill wrote: > > > >> On 9/28/20 3:09 PM, Jason Merrill wrote: > >>> On 9/28/20 3:56 AM, Richard Biener wrote: > >>>> On Fri,

Re: Break out ao_ref_init_from_ptr_and_range from ao_ref_init_from_ptr_and_size

2020-10-02 Thread Richard Biener
& poly_int_tree_p (size, &size_hwi) > + && coeffs_in_range_p (size_hwi, 0, HOST_WIDE_INT_MAX / BITS_PER_UNIT)) > +{ > + size_hwi = size_hwi * BITS_PER_UNIT; > + ao_ref_init_from_ptr_and_range (ref, ptr, true, 0, size_hwi, size_hwi); > +} > + else > +ao_ref_init_from_ptr_and_range (ref, ptr, false, 0, -1, -1); > +} > + > /* S1 and S2 are TYPE_SIZE or DECL_SIZE. Compare them: > Return -1 if S1 < S2 > Return 1 if S1 > S2 > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: Perforate fnspec attribute strings

2020-10-02 Thread Richard Biener
On Fri, 2 Oct 2020, Jan Hubicka wrote: > Hi, > as discussed this patch makes return value and arg specifiers to be 2 > characters long and updates (I hope) all fnspec strings. > I also enabled part of the verification (just accepting the fortran bug > with 'R' and 'W' in return value specifiers) t

[PATCH] optimize permutes in SLP, remove vect_attempt_slp_rearrange_stmts

2020-10-02 Thread Richard Biener
ux-gnu, testing in progress. Richard. 2020-10-02 Richard Biener * tree-vect-data-refs.c (vect_slp_analyze_instance_dependence): Use SLP_TREE_REPRESENTATIVE. * tree-vectorizer.h (_slp_tree::vertex): New member used for graphds interfacing. *

Re: Track access ranges in ipa-modref

2020-10-02 Thread Richard Biener
5,8 +2505,8 @@ modref_may_conflict (const gimple *stmt, > } > > /* TBAA checks did not disambiguate, try to use base pointer, for > - that we however need to have ref->ref. */ > - if (ref_node->every_access || !ref->ref) > + tha

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

2020-10-03 Thread Richard Biener
On October 3, 2020 10:41:26 AM GMT+02:00, Jakub Jelinek wrote: >On Fri, Oct 02, 2020 at 04:21:12PM +0200, Stefan Schulze Frielinghaus >via Gcc-patches wrote: >> > > Sure, no problem at all. In that case I stop to investigate >further and >> > > wait for you. >> > >> > Here is a patch that imple

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

2020-10-05 Thread Richard Biener
On October 5, 2020 9:08:41 AM GMT+02:00, Jakub Jelinek wrote: >On Sun, Oct 04, 2020 at 09:16:00PM +0200, Jakub Jelinek via Gcc-patches >wrote: >> On Sun, Oct 04, 2020 at 09:13:29AM +0200, Andreas Schwab wrote: >> > This breaks ia64: >> > >> > In file included from ./tm.h:23, >> >

Re: [r11-3641 Regression] FAIL: gcc.dg/torture/pta-ptrarith-1.c -Os scan-tree-dump alias "ESCAPED = {[^\n}]* i f [^\n}]*}" on Linux/x86_64 (-m32 -march=cascadelake)

2020-10-05 Thread Richard Biener
is necessary. > Without going through this folding we are unable to disambiguate base > pointers: MEM_REF containing ADDR_EXPR of DECL does not go through the > usual decl compares. > > Honza > > > > > > > > > I'm not sure that automatically openi

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

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: [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] divmod: Match and expand DIVMOD even in some cases of constant divisor [PR97282]

2020-10-06 Thread Richard Biener
0200 > +++ gcc/testsuite/gcc.target/i386/pr97282.c 2020-10-05 15:28:51.864499619 > +0200 > @@ -0,0 +1,25 @@ > +/* PR rtl-optimization/97282 */ > +/* { dg-do compile } */ > +/* { dg-options "-O2" } */ > +/* { dg-final { scan-assembler "call\[^\n\r]*__udivmod\[dt]i4" } } */ > + > +#ifdef __SIZEOF_INT128__ > +typedef __uint128_t T; > +#else > +typedef unsigned long long T; > +#endif > + > +unsigned long > +foo (T x) > +{ > + if (x == 0) > +return 0; > + > + unsigned long ret = 0; > + while (x > 0) > +{ > + ret = ret + x % 10; > + x = x / 10; > +} > + return ret; > +} > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

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

2020-10-06 Thread Richard Biener
or (i = 0; i < n_target_char; i++) { > + if (j == 0 && k == 0) { > + print " unsigned HOST_WIDE_INT mask = 0;"; > + } > print " if (opts_set->x_" var_target_char[i] ") mask |= > HOST_WIDE_INT_1U << " j ";"; > j++; > if (j == 64) { > @@ -676,6 +693,9 @@ for (i = 0; i < n_target_char; i++) { > } > > for (i = 0; i < n_target_string; i++) { > + if (j == 0 && k == 0) { > + print " unsigned HOST_WIDE_INT mask = 0;"; > + } > print " if (opts_set->x_" var_target_string[i] ") mask |= > HOST_WIDE_INT_1U << " j ";"; > j++; > if (j == 64) { > @@ -732,7 +752,9 @@ for (i = 0; i < n_target_string; i++) { > } > > print ""; > -print " unsigned HOST_WIDE_INT mask;"; > +if (has_target_explicit_mask) { > + print " unsigned HOST_WIDE_INT mask;"; > +} > > j = 64; > k = 0; > > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

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 >

Re: [PATCH][tree-ssa-loop-ch] Add missing NULL test for dump_file

2020-10-06 Thread Richard Biener
n_bbs, copied_bbs, >true)) > { > - fprintf (dump_file, "Duplication failed.\n"); > + if (dump_file && (dump_flags & TDF_DETAILS)) > + fprintf (dump_file, "Duplication failed.\n"); > continue; > } >copied.safe_push (std::make_pair (entry, loop)); > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: [patch][DOC]PR97309--improve documentation of -fallow-store-data-races

2020-10-06 Thread Richard Biener
ritten with that same value. Such re-writing is safe in a single > +threaded context but may be unsafe in a multi-threaded context. Note that on > +some processors, if-conversions may be required in order to enable > +vectorization. > > Enabled at level @option{-Ofast}. > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

[PATCH] bootstrap/95582 - adjust what types we consider boolean for vectorization

2020-10-07 Thread Richard Biener
This excludes BOOLEAN_TYPE which are signed or have TYPE_PRECISION != 1 from being handled as VECTOR_BOOLEAN_TYPE_P. This fixes a bootstrap ICE with LTO and PGO in the Ada frontend. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2020-10-07 Richard Biener PR

[PATCH] tree-optimization/97307 - improve sinking of loads

2020-10-07 Thread Richard Biener
This improves the heuristics finding a sink location for loads that does not cross any store. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-10-07 Richard Biener PR tree-optimization/97307 * tree-ssa-sink.c (statement_sink_location): Change heuristic

Re: [r11-3641 Regression] FAIL: gcc.dg/torture/pta-ptrarith-1.c -Os scan-tree-dump alias "ESCAPED = {[^\n}]* i f [^\n}]*}" on Linux/x86_64 (-m32 -march=cascadelake)

2020-10-08 Thread Richard Biener
ref2.ref_alias_set = ref_set; > + ref2.base_alias_set = base_set; > + if (refs_may_alias_p_1 (&ref2, ref, tbaa_p)) > + return true; > + } > + else if (ptr_deref_may_alias_ref_p_1 (arg, ref)) > return true; > } > num_tests++; > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

[PATCH] adjust BB vectorization dump scanning

2020-10-08 Thread Richard Biener
(not) vectorized loops instead of relying on fragile counts. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. Richard. 2020-10-08 Richard Biener * tree-vectorizer.c (try_vectorize_loop_1): Do not dump "basic block vectorized". (pass_slp_vectorize::exe

[PATCH] tree-optimization/97330 - fix bad load sinking

2020-10-08 Thread Richard Biener
This fixes bad placement of sunk loads. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2020-10-08 Richard Biener PR tree-optimization/97330 * tree-ssa-sink.c (statement_sink_location): Avoid skipping PHIs when they dominate the insert location

[PATCH] SLP vectorize multiple BBs at once

2020-10-08 Thread Richard Biener
as well. Final re-bootstrap/regtest running on x86_64-unknown-linux-gnu. Richard. 2020-10-08 Martin Liska Richard Biener * tree-vectorizer.h (_bb_vec_info::const_iterator): Remove. (_bb_vec_info::const_reverse_iterator): Likewise. (_bb_vec_info::region_st

Re: [PATCH] match.pd: Fix up FFS -> CTZ + 1 optimization [PR97325]

2020-10-08 Thread Richard Biener
25.c 2020-10-08 > 14:27:22.518708841 +0200 > @@ -0,0 +1,15 @@ > +/* PR tree-optimization/97325 */ > + > +unsigned long long > +foo (unsigned long long c) > +{ > + return c ? __builtin_ffs (-(unsigned short) c) : 0; > +} > + > +int > +main () > +{ > + if (foo (2) != 2) > +__builtin_abort (); > + return 0; > +} > > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

Re: Disable tbaa for some call to call_may_clobber_ref_p

2020-10-08 Thread Richard Biener
tail_calls (basic_block bb, struct tailcall **ret) >if (TREE_CODE (var) != PARM_DECL > && auto_var_in_fn_p (var, cfun->decl) > && may_be_aliased (var) > - && (ref_maybe_used_by_stmt_p (call, var) > - || call_may_clobber_ref_p (call, var))) > + && (ref_maybe_used_by_stmt_p (call, var, false) > + || call_may_clobber_ref_p (call, var, false))) > { > if (!VAR_P (var)) > { > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imend

[PATCH] fix ICE with BB vectorization of PHIs

2020-10-08 Thread Richard Biener
This fixes a vector CTOR insertion issue when we try to insert after a PHI node. Bootstrap / regtest running on x86_64-unknown-linux-gnu. 2020-10-09 Richard Biener * tree-vect-slp.c (vect_create_constant_vectors): Properly insert after PHIs. * gcc.dg/vect/bb-slp-phis

[PATCH] random memory leak fixes

2020-10-09 Thread Richard Biener
This fixes leaks discovered checking whether I introduced new ones with the last vectorizer changes. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Parts are also applicable for branches. 2020-10-09 Richard Biener * cgraphunit.c (expand_all_functions): Free

Re: [PATCH] adjust BB vectorization dump scanning

2020-10-09 Thread Richard Biener
On Thu, 8 Oct 2020, Thomas Schwinge wrote: > Hi Richard! > > On 2020-10-08T13:34:02+0200, Richard Biener wrote: > > It might be interesting to work on adding sth like > > dg-warning to look for -fopt-info-{optimized,missing} so > > we could directly annotate (not)

[PATCH] tree-optimization/97347 - fix another SLP constant insertion issue

2020-10-09 Thread Richard Biener
Just use edge insertion which will appropriately handle the situation from botan. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. 2020-10-09 Richard Biener PR tree-optimization/97347 * tree-vect-slp.c (vect_create_constant_vectors): Use edge insertion when

Re: [r11-3723 Regression] FAIL: gcc.dg/vect/bb-slp-subgroups-3.c scan-tree-dump-times slp2 "optimized: basic block" 2 on Linux/x86_64

2020-10-09 Thread Richard Biener
On Thu, 8 Oct 2020, sunil.k.pandey wrote: > On Linux/x86_64, > > 532e882f8872b1b4437e3a0fa8c61d2af2d999d4 is the first bad commit > commit 532e882f8872b1b4437e3a0fa8c61d2af2d999d4 > Author: Richard Biener > Date: Thu Oct 8 11:53:51 2020 +0200 > > adjust BB vec

[PATCH] tree-optimization/97334 - improve BB SLP discovery

2020-10-09 Thread Richard Biener
following patch makes the case work where the first stmt has a good operand by not fatally failing the SLP build for the operand but communicating upwards how to commutate. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2020-10-09 Richard Biener PR tree-optimization/97334

[PATCH] Fixup gcc.dg/vect/pr65947-3.c when masked loads are available

2020-10-09 Thread Richard Biener
The following adds a effective target to properly allow the gcc.dg/vect/pr65947-3.c expected vectorization to be adjusted when run with, say, -march=cascadelake. Tested on x86_64-unknown-linux-gnu, pushed. 2020-10-09 Richard Biener gcc/ * doc/sourcebuild.texi (vect_masked_load

Re: [RFC][gimple] Move can_duplicate_bb_p to gimple_can_duplicate_bb_p

2020-10-12 Thread Richard Biener
te_bb_no_insn_iter_p (bb)) > +return false; > + > + for (gimple_stmt_iterator gsi = gsi_start_bb (CONST_CAST_BB (bb)); > + !gsi_end_p (gsi); gsi_next (&gsi)) > +if (!can_duplicate_insn_p (gsi_stmt (gsi))) > + return false; > + > return true; > } &g

[PATCH] tree-optimization/97357 - avoid abnormals in loop splitting conditions

2020-10-12 Thread Richard Biener
This avoids abnormals in another place. Bootstrap / regtest in progress on x86_64-unknown-linux-gnu. 2020-10-12 Richard Biener PR tree-optimization/97357 * tree-ssa-loop-split.c (ssa_semi_invariant_p): Abnormal SSA names are not semi invariant. * gcc.dg

[PATCH] More consistently split SLP groups

2020-10-12 Thread Richard Biener
This appropriately makes matches all true after successful SLP discovery to reliably succeed splitting. We were picking up an eventual all false built-up from scalars state in some cases. Bootstrap / regtest in progress on x86_64-unknown-linux-gnu. 2020-10-12 Richard Biener * tree

[PATCH] Adjust BB vect from-scalar build

2019-10-22 Thread Richard Biener
profitable to vectorize (we can at least use a vector load from the constant pool). Bootstrapped & tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-10-23 Richard Biener * tree-vect-slp.c (vect_build_slp_tree_2): Do not build op from scalars in case there's a

Re: [PATCH] Do not ICE in IPA inliner.

2019-10-23 Thread Richard Biener
On Tue, Oct 22, 2019 at 2:47 PM Martin Liška wrote: > > Hi. > > We should not call to_gcov_type on a count that is uninitialized. > That's the case for a THUNK cgraph_node that we inline. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. >

Re: [patch] Fix PR tree-optimization/92131

2019-10-23 Thread Richard Biener
On Wed, Oct 23, 2019 at 10:33 AM Eric Botcazou wrote: > > This is a regression present on mainline, 9 and 8 branches, but the underlying > issue is probably latent on the 7 branch. compare_values in tree-vrp.c can > rely on undefined overflow to compare symbolic expressions with constants so > we

Re: [PATCH V3] Loop split upon semi-invariant condition (PR tree-optimization/89134)

2019-10-23 Thread Richard Biener
On Wed, Oct 23, 2019 at 5:36 AM Feng Xue OS wrote: > > Michael, > > > I've only noticed a couple typos, and one minor remark. > Typos corrected. > > > I just wonder why you duplicated these three loops instead of integrating > > the real body into the existing LI_FROM_INNERMOST loop. I would have

[PATCH] Fix PR92179

2019-10-23 Thread Richard Biener
More vectorizable_shift fallout - I've removed another disparity of SLP vs. non-SLP plus allowed type but not mode changing cases for SLP to go through (which originally caused the reported ICEs). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-10-23 Ri

Re: [PATCH V3] Loop split upon semi-invariant condition (PR tree-optimization/89134)

2019-10-23 Thread Richard Biener
nal splitting I guess). Don't we eventually want to recurse on that? Otherwise the patch looks reasonable. Sorry for the many bits above and the late real review from me... Thanks, Richard. > Feng > > > From: Richard Biener > S

Re: RFC/A: Add a targetm.vectorize.related_mode hook

2019-10-23 Thread Richard Biener
On Wed, Oct 23, 2019 at 1:00 PM Richard Sandiford wrote: > > This patch is the first of a series that tries to remove two > assumptions: > > (1) that all vectors involved in vectorisation must be the same size > > (2) that there is only one vector mode for a given element mode and > number of

Re: RFC/A: Add a targetm.vectorize.related_mode hook

2019-10-23 Thread Richard Biener
On Wed, Oct 23, 2019 at 1:51 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Wed, Oct 23, 2019 at 1:00 PM Richard Sandiford > > wrote: > >> > >> This patch is the first of a series that tries to remove two > >> assumptions: > >&g

Re: [PR47785] COLLECT_AS_OPTIONS

2019-10-23 Thread Richard Biener
On Mon, Oct 21, 2019 at 10:04 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > Thanks for the pointers. > > > > On Fri, 11 Oct 2019 at 22:33, Richard Biener > wrote: > > > > On Fri, Oct 11, 2019 at 6:15 AM Kugan Vivekanandarajah > > wrote:

[PATCH] Fix the easy part of PR65930

2019-10-23 Thread Richard Biener
ces of the above thus I refrained from adding another testcase. Bootstraped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-10-23 Richard Biener PR tree-optimization/65930 * tree-vect-loop.c (check_reduction_path): Allow conversions th

[PATCH] Fall back to SLP reduction discovery when reduction group fails

2019-10-23 Thread Richard Biener
This helps saving some IVs (though I guess the situation where it matches in practice is scarce). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2019-10-24 Richard Biener * tree-vect-slp.c (vect_analyze_slp): When reduction group SLP

[PATCH] Fix testsuite fallout from partial PR65930 fix

2019-10-24 Thread Richard Biener
The no longer xfailed testcases lacked appropriate target restriction. The following should fix the sparc fallout. Applied to trunk. Richard. 2019-10-24 Richard Biener PR tree-optimization/65930 * gcc.dg/vect/vect-reduc-2char-big-array.c: Adjust again. * gcc.dg

[PATCH] Fix typo

2019-10-24 Thread Richard Biener
Committed. Richard. 2019-10-24 Richard Biener PR tree-optimization/65930 * gcc.dg/vect/vect-reduc-2short.c: Fix typo. Index: gcc/testsuite/gcc.dg/vect/vect-reduc-2short.c === --- gcc/testsuite/gcc.dg/vect/vect

[PATCH] Fix PR92203

2019-10-24 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-10-24 Richard Biener PR tree-optimization/92203 * treee-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Skip eliminating conversion stmts inserted by insertion. * gcc.dg/torture

[PATCH] Fix PR92205

2019-10-24 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-10-24 Richard Biener PR tree-optimization/92205 * tree-vect-loop.c (vectorizable_reduction): Restrict search for alternate vectype_in to lane-reducing patterns we support

Re: Report heap memory use into -Q output

2019-10-24 Thread Richard Biener
nc" "$as_ac_var" > @@ -11448,6 +11460,61 @@ fi > done > > > +for ac_func in mallinfo > +do > + ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is > declared" >&5 > +$as_echo_n "checking whether $ac_func is declared... " >&6; } > +if eval \${gcc_cv_have_decl_$ac_func+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#undef $ac_tr_decl > +#define $ac_tr_decl 1 > + > +#include "ansidecl.h" > +#include "system.h" > +#ifdef HAVE_MALLOC_H > +#include > +#endif > + > + > +int > +main () > +{ > +#ifndef $ac_func > +char *(*pfn) = (char *(*)) $ac_func ; > +#endif > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_cxx_try_compile "$LINENO"; then : > + eval "gcc_cv_have_decl_$ac_func=yes" > +else > + eval "gcc_cv_have_decl_$ac_func=no" > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +fi > + > +if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 > +$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF > +#define $ac_tr_decl 1 > +_ACEOF > + > +else > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > +$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF > +#define $ac_tr_decl 0 > +_ACEOF > + > +fi > + > +done > + > + > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > @@ -18851,7 +18918,7 @@ else >lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >lt_status=$lt_dlunknown >cat > conftest.$ac_ext <<_LT_EOF > -#line 18854 "configure" > +#line 18921 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -18957,7 +19024,7 @@ else >lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >lt_status=$lt_dlunknown >cat > conftest.$ac_ext <<_LT_EOF > -#line 18960 "configure" > +#line 19027 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

[PATCH] Change SLP representation of reduction chains

2019-10-24 Thread Richard Biener
-gnu, applied. Richard. 2019-10-24 Richard Biener * tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction chains try harder with operand swapping and instead of putting a shifted chain into the reduction operands put a repetition of the final

Re: RFC/A: Add a targetm.vectorize.related_mode hook

2019-10-25 Thread Richard Biener
On Wed, Oct 23, 2019 at 2:12 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Wed, Oct 23, 2019 at 1:51 PM Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Wed, Oct 23, 2019 at 1:00 PM Richard Sandiford > &

Re: Type representation in CTF and DWARF

2019-10-25 Thread Richard Biener
On Fri, Oct 25, 2019 at 1:52 AM Indu Bhagat wrote: > > > > On 10/11/2019 04:41 AM, Jakub Jelinek wrote: > > On Fri, Oct 11, 2019 at 01:23:12PM +0200, Richard Biener wrote: > >>> (coreutils-0.22) > >>>.debug_info(D1) | .debug_abbrev(D2) | .debug_st

Re: PR92163

2019-10-25 Thread Richard Biener
On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni wrote: > > Hi, > The attached patch tries to fix PR92163 by calling > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup. > Does it look OK ? Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp whi

[PATCH] Transfer STMT_VINFO_REDUC_IDX to patterns

2019-10-25 Thread Richard Biener
... Seeing Richard using STMT_VINFO_REDUC_IDX more I'm committing this now. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-10-25 Richard Biener * tree-vect-loop.c (vectorizable_reduction): Verify STMT_VINFO_REDUC_IDX on the to be vectorized

Re: Fix reductions for fully-masked loops

2019-10-25 Thread Richard Biener
On Thu, Oct 24, 2019 at 9:29 AM Richard Sandiford wrote: > > Now that vectorizable_operation vectorises most loop stmts involved > in a reduction, it needs to be aware of reductions in fully-masked loops. > The LOOP_VINFO_CAN_FULLY_MASK_P parts of vectorizable_reduction now only > apply to cases t

Re: Pass the data vector mode to get_mask_mode

2019-10-25 Thread Richard Biener
On Thu, Oct 24, 2019 at 9:45 AM Richard Sandiford wrote: > > Bernhard Reutner-Fischer writes: > > On 23 October 2019 13:16:19 CEST, Richard Sandiford > > wrote: > > > >>+++ gcc/config/gcn/gcn.c 2019-10-23 12:13:54.091122156 +0100 > >>@@ -3786,8 +3786,7 @@ gcn_expand_builtin (tree exp, rtx

Re: Add build_truth_vector_type_for_mode

2019-10-25 Thread Richard Biener
On Wed, Oct 23, 2019 at 1:10 PM Richard Sandiford wrote: > > Callers of vect_halve_mask_nunits and vect_double_mask_nunits > already know what mode the resulting vector type should have, > so we might as well create the vector type directly with that mode, > just like build_vector_type_for_mode le

Re: Remove build_{same_sized_,}truth_vector_type

2019-10-25 Thread Richard Biener
On Wed, Oct 23, 2019 at 1:13 PM Richard Sandiford wrote: > > build_same_sized_truth_vector_type was confusingly named, since for > SVE and AVX512 the returned vector isn't the same byte size (although > it does have the same number of elements). What it really returns > is the "truth" vector type

[PATCH] Fix PR92222

2019-10-25 Thread Richard Biener
-gnu. Richard. 2019-10-25 Richard Biener PR tree-optimization/9 * tree-vect-slp.c (_slp_oprnd_info::first_pattern): Remove. (_slp_oprnd_info::second_pattern): Likewise. (_slp_oprnd_info::any_pattern): New. (vect_create_oprnd_info): Ad

[PATCH] Relax SLP operand swapping

2019-10-25 Thread Richard Biener
When I remove the swapping of operands in the IL I didn't actually relax swapping restrictions. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-10-25 Richard Biener * tree-vect-slp.c (vect_get_and_check_slp_defs): Only fail swapping

[PATCH] Use STMT_VINFO_REDUC_IDX instead of recomputing it

2019-10-25 Thread Richard Biener
parts). Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2019-10-25 Richard Biener * tree-vect-loop.c (vect_create_epilog_for_reduction): Use STMT_VINFO_REDUC_IDX from the actual stmt. (vect_transform_reduction): Likewise. (vectorizable_redu

Re: introduce -fcallgraph-info option

2019-10-26 Thread Richard Biener
On October 26, 2019 6:35:43 AM GMT+02:00, Alexandre Oliva wrote: >This was first submitted many years ago >https://gcc.gnu.org/ml/gcc-patches/2010-10/msg02468.html > >The command line option -fcallgraph-info is added and makes the >compiler generate another output file (xxx.ci) for each compilati

Re: [PATCH] rs6000: Enable limited unrolling at -O2

2019-10-28 Thread Richard Biener
powerpc/pr78604.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr78604.c > @@ -1,7 +1,7 @@ > /* { dg-do compile { target { powerpc*-*-* } } } */ > /* { dg-skip-if "" { powerpc*-*-darwin* } } */ > /* { dg-require-effective-target powerpc_p8vector_ok } */ > -/* { dg-opti

Re: introduce -fcallgraph-info option

2019-10-28 Thread Richard Biener
On Sun, 27 Oct 2019, Alexandre Oliva wrote: > On Oct 26, 2019, Alexandre Oliva wrote: > > > E.g., the reason we gather expanded calls rather than just use > > cgraph_edges is that the latter would dump several "calls" that are > > builtins expanded internally by the compiler, and would NOT dump

Re: [PATCH] Fix PR92222

2019-10-28 Thread Richard Biener
On Sat, 26 Oct 2019, Richard Sandiford wrote: > Richard Biener writes: > > We have to check each operand for being in a pattern, not just the > > first when avoiding build from scalars (we could possibly handle > > the special case of some of them being the pattern stmt roo

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-10-28 Thread Richard Biener
On Sun, Oct 27, 2019 at 6:32 PM Jeff Law wrote: > > On 9/29/19 1:51 PM, Martin Sebor wrote: > > -Wstringop-overflow detects a subset of past-the-end read and write > > accesses by built-in functions such as memcpy and strcpy. It relies > > on the functions' effects the knowledge of which is hardw

Re: [PATCH] rs6000: Enable limited unrolling at -O2

2019-10-28 Thread Richard Biener
On Mon, 28 Oct 2019, Jiufu Guo wrote: > Richard Biener writes: > > > On Fri, 25 Oct 2019, Jiufu Guo wrote: > > > >> Hi, > >> > >> In PR88760, there are a few disscussion about improve or tune unroller for > >> targets. And we would agree to

[PATCH] Fix PR92252

2019-10-28 Thread Richard Biener
Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2019-10-28 Richard Biener PR tree-optimization/92252 * tree-vect-slp.c (vect_get_and_check_slp_defs): Adjust STMT_VINFO_REDUC_IDX when swapping operands. * gcc.dg/torture/pr92252.c: New

<    3   4   5   6   7   8   9   10   11   12   >