Re: [PATCH] Fix PR86462

2018-07-12 Thread Richard Biener
On Thu, 12 Jul 2018, Jakub Jelinek wrote: > On Thu, Jul 12, 2018 at 12:29:20PM +0200, Richard Biener wrote: > > After my PR86413 fix to always annotate existing lexical block DIEs with > > range attributes debuginfo grows significantly in case we previously > > had "

Re: Do not stream DECL_FCONTEXT

2018-07-12 Thread Richard Biener
) > +++ tree.c(working copy) > @@ -5280,6 +5280,7 @@ free_lang_data_in_decl (tree decl) >free_lang_data_in_one_sizepos (&DECL_SIZE_UNIT (decl)); >if (TREE_CODE (decl) == FIELD_DECL) > { > + DECL_FCONTEXT (decl) = NULL; >free_lang_data_in_one_sizepos (&DECL_FIELD_OFFS

GCC 8.2 Status Report (2018-07-12)

2018-07-12 Thread Richard Biener
Status == The GCC 8 branch is open for regression and documentation fixes. We intend to release GCC 8.2 soon starting with a release candidate mid to end of next week. This gives you some time to go over your assigned regression bug reports and consider backports. There is currently one P

Re: [RFC] Induction variable candidates not sufficiently general

2018-07-12 Thread Richard Biener
On Fri, Jul 13, 2018 at 12:05 AM Kelvin Nilsen wrote: > > A somewhat old "issue report" pointed me to the code generated for a 4-fold > manually unrolled version of the following loop: > > > while (++len != len_limit) /* this is loop */ > > if (

Re: abstract wide int binop code from VRP

2018-07-13 Thread Richard Biener
On Thu, Jul 12, 2018 at 10:12 AM Aldy Hernandez wrote: > > On 07/11/2018 01:33 PM, Richard Sandiford wrote: > > Aldy Hernandez writes: > >> On 07/11/2018 08:52 AM, Richard Biener wrote: > >>> On Wed, Jul 11, 2018 at 8:48 AM Aldy Hernandez wrote: > >>>

Re: [PATCH][testsuite, guality] Add -fno-ipa-icf in gcc.dg/guality

2018-07-13 Thread Richard Biener
On Fri, Jul 13, 2018 at 11:18 AM Tom de Vries wrote: > > Hi, > > Optimization fipa-icf breaks debug info (as is noted in PR63572 - "ICF > breaks user debugging experience"), which make guality tests clztest.c, > ctztest.c and sra-1.c unsupported for option combination "-O2 -flto > -fuse-linker-plu

Re: [PATCH][debug] Reuse debug exprs generated in remap_ssa_name

2018-07-13 Thread Richard Biener
On Fri, Jul 13, 2018 at 12:09 PM Tom de Vries wrote: > > On 07/09/2018 02:43 PM, Richard Biener wrote: > > On Sun, Jul 8, 2018 at 11:27 AM Tom de Vries wrote: > >> > >> On Sun, Jul 08, 2018 at 11:22:41AM +0200, Tom de Vries wrote: > >>> On Fri, Jul 06

[PATCH] Fix PR85974

2018-07-13 Thread Richard Biener
The following patch fixes address difference folding to consider when one operand doesn't need a conversion. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-07-13 Richard Biener PR middle-end/85974 * match.pd (addr1 - addr2): Allow either o

Re: [PATCH][testsuite/guality] Run guality tests with Og

2018-07-13 Thread Richard Biener
d_log -- "---\n$gdb_version\n---\n" > } > + > +# Argument 0 is the option list. > +# Return the option list, ensuring that at least -Og is present. > + > +proc guality_minimal_options { args } { > +set options [lindex $args 0] > +foreach opt $options { > + if { [regexp -- "-Og" $opt] } { > + return $options > + } > +} > + > +return [lappend options "-Og"] > +} > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

[PATCH] Properly unshare TYPE_SIZE_UNIT/DECL_FIELD_OFFSET (PR86216)

2018-07-13 Thread Richard Biener
fying size positions but gimplify_one_sizepos oddly enough unshares trees before gimplifying ...(!?) This would need to be removed (see patch after the tested patch below). Bootstrapped / tested on x86_64-unknown-linux-gnu. Richard. 2018-07-13 Richard Biener PR c/86216 *

Re: [PATCH] Properly unshare TYPE_SIZE_UNIT/DECL_FIELD_OFFSET (PR86216)

2018-07-13 Thread Richard Biener
On Fri, 13 Jul 2018, Jakub Jelinek wrote: > On Fri, Jul 13, 2018 at 01:49:38PM +0200, Richard Biener wrote: > > The testcase in the PR, while previously ICEing because the C++ FE doesn't > > properly capture VLA size fields, now ICEs because gimplification > > introduces

Re: abstract wide int binop code from VRP

2018-07-13 Thread Richard Biener
On Fri, Jul 13, 2018 at 10:05 AM Aldy Hernandez wrote: > > > > On 07/13/2018 03:02 AM, Richard Biener wrote: > > On Thu, Jul 12, 2018 at 10:12 AM Aldy Hernandez wrote: > > > So besides the general discussion about references/pointers for out > > parameter

Re: abstract wide int binop code from VRP

2018-07-13 Thread Richard Biener
On Fri, Jul 13, 2018 at 3:18 PM Richard Biener wrote: > > On Fri, Jul 13, 2018 at 10:05 AM Aldy Hernandez wrote: > > > > > > > > On 07/13/2018 03:02 AM, Richard Biener wrote: > > > On Thu, Jul 12, 2018 at 10:12 AM Aldy Hernandez wrote: > >

Re: [PATCH] Properly unshare TYPE_SIZE_UNIT/DECL_FIELD_OFFSET (PR86216)

2018-07-13 Thread Richard Biener
On July 13, 2018 6:52:26 PM GMT+02:00, Eric Botcazou wrote: >> It breaks Ada bootstrap. I guess Ada has variable-size types in >> non-function scope (not sure how TYPE_SIZES_GIMPLIFIED works then >> though). That said, r92495 moved the unshare_expr from layout_type >> to gimplify_one_sizepos. >

Re: [PATCH] Fix part of PR86389

2018-07-16 Thread Richard Biener
On Fri, 13 Jul 2018, Sandra Loosemore wrote: > On 07/03/2018 07:55 AM, Richard Biener wrote: > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. > > > > Richard. > > > > From 52aad98947e5cfcb5624ff24f0c557d0029c34fe Mon Sep 17 0

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

2018-07-16 Thread Richard Biener
On Mon, Jul 16, 2018 at 9:52 AM Eric Botcazou wrote: > > Hi, > > this is a regression present on the mainline and 8 branch in the form of wrong > code generated for an Ada program manipulating bit-packed boolean array types. > > The problem is in the new range optimization code of the reassoc pass

Re: [PATCH, middle-end]: Fix PR86511, traps are generated for non-trapping compares

2018-07-16 Thread Richard Biener
On Fri, Jul 13, 2018 at 5:40 PM Uros Bizjak wrote: > > As demonstrated in the PR, middle-end changes the trappines of the > compare by expanding non-trapping compare to a combination of > setcc/cmove branchless code, e.g. UNLT is split to UNORDERED setcc and > LT cmove. > > The above conversion is

Re: [PATCH] Properly unshare TYPE_SIZE_UNIT/DECL_FIELD_OFFSET (PR86216)

2018-07-16 Thread Richard Biener
On Mon, 16 Jul 2018, Eric Botcazou wrote: > > Thanks. In that light the unsharing at the places the FE builds expressions > > using TYPE_SIZE and friends looks like the way to go. > > Probably, yes. OK, let's see what C family maintainers decide on ultimatively. > > I still wonder why unsharing

Re: [RFC][debug] Add -fadd-debug-nops

2018-07-16 Thread Richard Biener
r); > + emit_insn_after (gen_nop (), insert_after); > +} > + > /* Allocate and initialize the data structures for variable tracking > and parse the RTL to get the micro operations. */ > > @@ -10224,6 +10233,13 @@ vt_initialize (void) > continue; > } > > + /* Add debug nops before ret insn. */ > + if (optimize > + && flag_add_debug_nops > + && cfun->debug_nonbind_markers > + && returnjump_p (insn)) > + emit_nop_before (insn); > + > if (MAY_HAVE_DEBUG_BIND_INSNS) > { > if (CALL_P (insn)) > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

[PATCH] Fix PR86523

2018-07-16 Thread Richard Biener
otstrap is broken on trunk). Applied to trunk. Richard. 2018-07-16 Richard Biener PR lto/86523 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents for function-local FUNCTION_DECL and RESULT_DECL immediately. * g++.dg/lto/pr86523-1_0.C: Ne

Re: [PATCH 0/4] Alignment option enhancements

2018-07-16 Thread Richard Biener
On Mon, Jul 16, 2018 at 10:54 AM marxin wrote: > > Hi. > > As you probably noticed, current trunk accepts extended format > of -falign-FOO options. > However there are some limitations that are addressed in the patchset: > > 1) E.g. align_labels_max_skip and align_labels_log are separate >valu

Re: [PATCH] Fix middle-end/86528

2018-07-16 Thread Richard Biener
On July 16, 2018 5:36:22 PM GMT+02:00, Bernd Edlinger wrote: >Hi, > >this fixes PR middle-end/86528. > > >Bootstrapped and reg-tested on x86_64-pc-linux-gnu. >Is it OK for trunk? OK. Richard. > >Thanks >Bernd.

Re: [PATCH] Fix inline memcpy ICE (PR tree-optimization/86526)

2018-07-17 Thread Richard Biener
lete the last parameter. */ > @@ -7317,7 +7314,7 @@ expand_builtin (tree exp, rtx target, rt > return target; > >/* Change it back to a BUILT_IN_STRNCMP. */ > - TREE_OPERAND (exp, 1) > + TREE_OPERAND (exp, 1) > = build_fold_addr_expr (builtin_decl_explicit (BUILT_IN_STRNCMP)); >/* FALLTHROUGH */ > > --- gcc/testsuite/gcc.c-torture/compile/pr86526.c.jj 2018-07-16 > 11:50:30.756223270 +0200 > +++ gcc/testsuite/gcc.c-torture/compile/pr86526.c 2018-07-16 > 11:50:16.205203998 +0200 > @@ -0,0 +1,8 @@ > +/* PR tree-optimization/86526 */ > + > +void > +foo (char *x) > +{ > + if (__builtin_memcmp (x, "\0a", 3)) > +__builtin_abort (); > +} > > Jakub > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

[PATCH] Fix PR86456

2018-07-17 Thread Richard Biener
ctions (also to the branch after LTO bootstrap and testing completet there). Thanks, Richard. 2018-07-17 Richard Biener PR lto/86456 * dwarf2out.c (init_sections_and_labels): Always generate a debug_line_str_section for early LTO debug. (dwarf2out

Re: [PATCH] Fix PR86523

2018-07-17 Thread Richard Biener
On Tue, 17 Jul 2018, Rainer Orth wrote: > Hi Richard, > > > The following fixes PR86523, we failed to assing DIE parents to some > > function-local entities with the idea scope vars would pick them up > > but that's not true for some of them. > > > > Bootstrapped and tested on x86_64-unknown-linu

Re: [PATCH] Make function clone name numbering independent.

2018-07-17 Thread Richard Biener
On Tue, Jul 17, 2018 at 8:10 AM Bernhard Reutner-Fischer wrote: > > On 16 July 2018 21:38:36 CEST, Michael Ploujnikov > wrote: > >Hi, > > > > >+clone_fn_ids = hash_map::create_ggc > >(1000); > > Isn't 1000 a bit excessive? What about 64 or thereabouts? I'm not sure we should throw memory at

[PATCH][C++] Fix PR86523

2018-07-17 Thread Richard Biener
2018-07-17 Richard Biener PR debug/86523 cp/ * decl2.c (c_parse_final_cleanups): Call write_out_vars before start_static_storage_duration_function sets current_function_decl. * g++.dg/lto/pr86523-3_0.C: New testcase. diff --git a/gcc/cp/decl2.c b/gcc/cp/

Re: [PATCH][Fortran] Use MIN/MAX_EXPR for intrinsics or __builtin_fmin/max when appropriate

2018-07-17 Thread Richard Biener
On Tue, Jul 17, 2018 at 2:35 PM Kyrill Tkachov wrote: > > Hi all, > > This is my first Fortran patch, so apologies if I'm missing something. > The current expansion of the min and max intrinsics explicitly expands > the comparisons between each argument to calculate the global min/max. > Some targ

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-18 Thread Richard Biener
ther prevent the folding, or it > > needs to handle it differently from an offset. > > > > The attached patch takes the conservative approach of avoiding > > the folding in this case. The remaining changes deal with > > the fallout from the fix. > > > > Tested on x

Re: [PATCH][Fortran] Use MIN/MAX_EXPR for intrinsics or __builtin_fmin/max when appropriate

2018-07-18 Thread Richard Biener
On Tue, Jul 17, 2018 at 3:46 PM Kyrill Tkachov wrote: > > Hi Richard, > > On 17/07/18 14:27, Richard Biener wrote: > > On Tue, Jul 17, 2018 at 2:35 PM Kyrill Tkachov > > wrote: > >> Hi all, > >> > >> This is my first Fortran patch, so a

Re: [PR86544] Fix Popcount detection generates different code on C and C++

2018-07-18 Thread Richard Biener
On Wed, Jul 18, 2018 at 4:19 AM Kugan Vivekanandarajah wrote: > > Attached patch fixes phi-opt not optimizing c++ testcase where we have > > if (b_4(D) == 0) instead of if (b_4(D) != 0) as shown in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86544 > > Patch bootstrapped and regression tested on

Re: [PATCH] Introduce instance discriminators

2018-07-18 Thread Richard Biener
On Wed, Jul 18, 2018 at 8:53 AM Alexandre Oliva wrote: > > This patch is a rewrite of an earlier patch submitted at > https://gcc.gnu.org/ml/gcc-patches/2012-11/msg02340.html > > With -gnateS, the Ada compiler sets itself up to output discriminators > for different instantiations of generics, but

Re: [PATCH][Fortran] Use MIN/MAX_EXPR for intrinsics or __builtin_fmin/max when appropriate

2018-07-18 Thread Richard Biener
On Wed, Jul 18, 2018 at 11:50 AM Kyrill Tkachov wrote: > > > On 18/07/18 10:44, Richard Biener wrote: > > On Tue, Jul 17, 2018 at 3:46 PM Kyrill Tkachov > > wrote: > >> Hi Richard, > >> > >> On 17/07/18 14:27, Richard Biener wrote: >

[PATCH] Fix PR86557

2018-07-18 Thread Richard Biener
The following fixes the vectorizer part of PR86557, vectorizing of EXACT_DIV_EXPR. The x86 backend still lacks arithmetic DImode right shift support for vectors without AVX512. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-07-18 Richard Biener PR

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-19 Thread Richard Biener
> a = { { 1, 2 } }, > b = { { 1, 2 } }; > > int f (void) > { > return __builtin_memcmp (&a, &b, sizeof a); > } > > which would in turn make it possible to fold the result of > such calls analogously to strlen or strcmp. > > Martin > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

Re: cleanup cross product code in VRP

2018-07-19 Thread Richard Biener
On Wed, Jul 18, 2018 at 2:05 PM Aldy Hernandez wrote: > > Hi again! > > Well, since this hasn't been reviewed and I'm about to overhaul the > TYPE_OVERFLOW_WRAPS code anyhow, might as well lump it all in one patch. > > On 07/16/2018 09:19 AM, Aldy Hernandez wrote: > > Howdy! > > > > I've abstracte

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-19 Thread Richard Biener
On Wed, Jul 18, 2018 at 3:42 PM Tom de Vries wrote: > > On 07/06/2018 12:28 PM, Richard Biener wrote: > > On Thu, Jul 5, 2018 at 4:12 PM Tom de Vries wrote: > >> > >> On 07/05/2018 01:39 PM, Richard Biener wrote: > >>> On Thu, Jul 5, 2018 at 1:25 PM To

Re: [PATCH 2/3] i386: Change indirect_return to function type attribute

2018-07-19 Thread Richard Biener
On Wed, Jul 18, 2018 at 5:33 PM H.J. Lu wrote: > > In > > struct ucontext; > typedef struct ucontext ucontext_t; > > extern int (*bar) (ucontext_t *__restrict __oucp, >const ucontext_t *__restrict __ucp) > __attribute__((__indirect_return__)); > > extern int res; > > void > f

Re: Compilation error in simple-object-elf.c

2018-07-19 Thread Richard Biener
On Wed, Jul 18, 2018 at 6:18 PM Eli Zaretskii wrote: > > Hi, > > I've built the pretest of GDB 8.2 with MinGW today, and bumped into a > compilation error in libiberty: > > if [ x"" != x ]; then \ >gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. > -I./../include

Re: [SVE ACLE] Add initial support for arm_sve.h

2018-07-19 Thread Richard Biener
On Wed, Jul 18, 2018 at 8:08 PM Richard Sandiford wrote: > > This patch adds the target framework for handling the SVE ACLE, > starting with four functions: svadd, svptrue, svsub and svsubr. > > The ACLE has both overloaded and non-overloaded names. Without > the equivalent of clang's __attribute

Re: [PATCH] Introduce instance discriminators

2018-07-19 Thread Richard Biener
On Thu, Jul 19, 2018 at 9:21 AM Alexandre Oliva wrote: > > On Jul 18, 2018, Richard Biener wrote: > > > On Wed, Jul 18, 2018 at 8:53 AM Alexandre Oliva wrote: > >> Instance discriminators are not compatible with LTO, in that the > >> instance mapping is not pres

GCC 8.2 Status Report (2018-07-19), branch frozen for release

2018-07-19 Thread Richard Biener
Status == The GCC 8 branch is frozen for preparation of the GCC 8.2 release. All changes to the branch now require release manager approval. Previous Report === https://gcc.gnu.org/ml/gcc/2018-07/msg00194.html

[PATCH] SCCVN data-structure TLC

2018-07-19 Thread Richard Biener
big enough so further cleanups (make ref operands a trailing array, go away with having two sets of hashtables) will be followups. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2018-07-19 Richard Biener * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs

Re: [PATCH 1/2] v5: Add "optinfo" framework

2018-07-19 Thread Richard Biener
On Wed, Jul 11, 2018 at 12:53 PM David Malcolm wrote: > > Changes relative to v4: > * eliminated optinfo subclasses as discussed > * eliminated optinfo-internal.h, moving what remained into optinfo.h > * added support for dump_gimple_expr_loc and dump_gimple_expr > * more selftests > > This patch

Re: [PATCH 2/2] Add "-fsave-optimization-record"

2018-07-19 Thread Richard Biener
On Wed, Jul 11, 2018 at 12:53 PM David Malcolm wrote: > > This patch implements a -fsave-optimization-record option, which > leads to a JSON file being written out, recording the dump_* calls > made (via the optinfo infrastructure in the previous patch). > > The patch includes a minimal version of

[PATCH] SCCVN Datastructure TLC, part 2

2018-07-20 Thread Richard Biener
e I fear it will require some extra churn given consumers like to work with a vector of ops that can grow. I'll probably followup with a patch merging the various globals of the VN table state into a singleton struct. Richard. 2018-07-20 Richard Biener * tree-ssa-sccvn.h (stru

Re: [PATCH] Make function clone name numbering independent.

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 4:48 AM Michael Ploujnikov wrote: > > On 2018-07-17 04:25 PM, Michael Ploujnikov wrote: > > On 2018-07-17 06:02 AM, Richard Biener wrote: > >> On Tue, Jul 17, 2018 at 8:10 AM Bernhard Reutner-Fischer > >> wrote: > >>> &g

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Richard Biener
(arg, 0); you should scale the index here by array_ref_element_size (arg). Or simply rewrite this to instead of using get_addr_base_and_unit_offset, use get_inner_reference which does all that magic for you. That is, you shouldn't need chartype. Richard. > On 07/19/2018 01:49 PM, Martin Sebor w

Re: [PATCH] Remove unused code.

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 10:52 AM Martin Liška wrote: > > Hi. > > Following was introduced in r230331 and as David confirmed > it was installed accidentally. It has never been used. > > Ready for trunk? OK > Martin > > gcc/ChangeLog: > > 2018-07-20 Martin Liska > > * tree.h (DECL_LOCATI

Re: Handle SLP of call pattern statements

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 12:22 PM Richard Sandiford wrote: > > We couldn't vectorise: > > for (int j = 0; j < n; ++j) > { > for (int i = 0; i < 16; ++i) > a[i] = (b[i] + c[i]) >> 1; > a += step; > b += step; > c += step; > } > > at -O3 because cunrolli unro

Re: Make the vectoriser drop to strided accesses for stores with gaps

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 12:57 PM Richard Sandiford wrote: > > We could vectorise: > > for (...) >{ > a[0] = ...; > a[1] = ...; > a[2] = ...; > a[3] = ...; > a += stride; >} > > (including the case when stride == 8) but not: > >

[PATCH] Fix PR86585

2018-07-20 Thread Richard Biener
would be possible as well to not lose debug info. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. 2018-07-20 Richard Biener PR debug/86585 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p to cover -flto-partition=none. lto

Re: [C++ PATCH] Avoid code generation changes with -Wnonnull-compare vs. -Wno-nonnull-compare (PR c++/86569)

2018-07-22 Thread Richard Biener
On July 22, 2018 9:15:50 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >A couple of -fcompare-debug=-Wsomething PRs have been filed recently, >this >fixes one of them. Changing code generation based on TREE_NO_WARNING >flag >which usually gets set only in the warning code, or on warn_* option is >und

Re: [PATCH] Don't create non zero terminated string constant

2018-07-23 Thread Richard Biener
On Fri, 20 Jul 2018, Bernd Edlinger wrote: > Hi! > > This fixes a not NUL terminated STRING_CST object. > > Bootstrapped and reg-tested on x86_64-pc-linux-gnu. > Is it OK for trunk? OK. Richard.

Re: [PATCH] -fsave-optimization-record: add contrib/optrecord.py

2018-07-23 Thread Richard Biener
On Fri, Jul 20, 2018 at 6:27 PM David Malcolm wrote: > > This patch adds a Python 3 module to "contrib" for reading the output of > -fsave-optimization-record. > > It can be imported from other Python code, or run standalone as a script, > in which case it prints the saved messages in a form resem

Re: [RFC] Induction variable candidates not sufficiently general

2018-07-23 Thread Richard Biener
On Sat, Jul 21, 2018 at 3:28 AM Bin.Cheng wrote: > > On Tue, Jul 17, 2018 at 2:08 AM, Kelvin Nilsen wrote: > > Thanks for looking at this for me. In simplifying the test case for a bug > > report, I've narrowed the "problem" to integer overflow considerations. My > > len variable is declared

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-23 Thread Richard Biener
On Sun, Jul 22, 2018 at 9:31 PM Jakub Jelinek wrote: > > Hi! > > As part of the PR86590 discussions that the current libstdc++ > __constant_string is extremely costly, because we don't fold the > __builtin_constant_p in the loop early enough and because Richard doesn't > want __builtin_early_const

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-23 Thread Richard Biener
On Mon, Jul 23, 2018 at 12:28 PM Jakub Jelinek wrote: > > On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: > > > Bootstrapped/regtested on x86_64-linux. > > > > Thanks for working on this. I wonder if we can completely hide this > > from the middl

Re: [PATCH] Fix folding of volatile values (PR 86617)

2018-07-23 Thread Richard Biener
On Mon, 23 Jul 2018, Bernd Edlinger wrote: > Hi! > > This fixes PR c/86617, where volatile values are folded > incorrectly, because LHS and RHS of PLUS_EXPR and > MINUS_EXPR are the same pointer. > > > Bootstrapped and reg-tested on x86_64-pc-linux-gnu. > Is it OK for trunk (and active branches

Re: [PATCH][GCC][mid-end] Allow larger copies when not slow_unaligned_access and no padding.

2018-07-23 Thread Richard Biener
On July 23, 2018 7:01:23 PM GMT+02:00, Tamar Christina wrote: >Hi All, > >This allows copy_blkmode_to_reg to perform larger copies when it is >safe to do so by calculating >the bitsize per iteration doing the maximum copy allowed that does not >read more >than the amount of bits left to copy. > >

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-23 Thread Richard Biener
On July 23, 2018 7:46:08 PM GMT+02:00, Martin Sebor wrote: >On 07/23/2018 02:05 AM, Jakub Jelinek wrote: >> On Sun, Jul 22, 2018 at 04:47:45PM -0600, Martin Sebor wrote: No, I mean something like: $ cat y.c const char a[2][3] = { "1234", "xyz" }; char b[6]; int m

Re: [PATCH] Fix up pr19476-{1,5}.C (PR testsuite/86649)

2018-07-24 Thread Richard Biener
pr19476-5.C 2018-07-24 11:39:26.190913802 > +0200 > @@ -1,5 +1,5 @@ > /* { dg-do compile } */ > -/* { dg-options "-O -fdump-tree-ccp1 -fdelete-null-pointer-checks" } */ > +/* { dg-options "-O -fdump-tree-dom2 -fdelete-null-pointer-checks" } */ > /* { dg-skip-if "" keeps_null_pointer_checks } */ > > // See pr19476-1.C for a version that includes . > @@ -8,4 +8,4 @@ int g(){ >return 42 + (0 == new int[50]); > } > > -/* { dg-final { scan-tree-dump "return 42" "ccp1" } } */ > +/* { dg-final { scan-tree-dump "return 42" "dom2" } } */ > > Jakub > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

[PATCH] Add BIT_FIELD_REF canonicalization patterns

2018-07-24 Thread Richard Biener
The following adds some simple BIT_FIELD_REF canonicalization patterns that fire during SCCVN expression simplification. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2018-07-24 Richard Biener * match.pd: Add BIT_FIELD_REF canonicalizations

Re: [PATCH] -fsave-optimization-record: add contrib/optrecord.py

2018-07-24 Thread Richard Biener
On Mon, Jul 23, 2018 at 9:20 PM David Malcolm wrote: > > On Mon, 2018-07-23 at 11:46 +0200, Richard Biener wrote: > > On Fri, Jul 20, 2018 at 6:27 PM David Malcolm > > wrote: > > > > > > This patch adds a Python 3 module to "contrib" for reading

Re: [PATCH] Fix segfault in -fsave-optimization-record (PR tree-optimization/86636)

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 1:44 AM David Malcolm wrote: > > There are various ways that it's possible for a gimple statement to > have an UNKNOWN_LOCATION, and for that UNKNOWN_LOCATION to be wrapped > in an ad-hoc location to capture inlining information. > > For such a location, LOCATION_FILE (loc)

Re: [PATCH] Limix dump_flag enum values range (PR middle-end/86645).

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 9:27 AM Martin Liška wrote: > > Hi. > > That fixes many UBSAN issues that are caused by: > > {"all", dump_flags_t (~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_GRAPH > | TDF_STMTADDR | TDF_RHS_ONLY | TDF_NOUID > | TDF_ENUMERATE_L

Re: [PATCH] Fix expand_divmod (PR middle-end/86627)

2018-07-24 Thread Richard Biener
t; +0200 > @@ -0,0 +1,28 @@ > +/* PR middle-end/86627 */ > +/* { dg-do compile { target int128 } } */ > +/* { dg-options "-O2" } */ > +/* { dg-final { scan-assembler-not "call\[^\n\r]*__divti3" } } */ > + > +__int128_t > +f1 (__int128_t a) > +{ > + return a / 2; > +} > + > +__int128_t > +f2 (__int128_t a) > +{ > + return a / -2; > +} > + > +__int128_t > +f3 (__int128_t a) > +{ > + return a / 0x4000LL; > +} > + > +__int128_t > +f4 (__int128_t a) > +{ > + return a / -0x4000LL; > +} > > Jakub > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:39 PM Jakub Jelinek wrote: > > On Tue, Jul 24, 2018 at 12:29:37PM +0200, Tom de Vries wrote: > > > I wonder if it makes sense to disambiguate things from the gcc side > > > by generating an empty location description for known optimized out > > > values (the standard see

Re: [PATCH] Make strlen range computations more conservative

2018-07-24 Thread Richard Biener
h different? It looks like the component-ref stripping plus type-check part could be factored out into sth like get_base_address? I don't have a good name or suggested semantics for it though. Richard. > > Thanks > Bernd. -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

[PATCH] Fix PR86654

2018-07-24 Thread Richard Biener
ng on x86_64-unknown-linux-gnu. If that succeeds I'm going to apply it as a stop-gap measure to make Firefox build again with LTO but I'm open to revising it. Richard. 2018-07-24 Richard Biener PR debug/86654 * dwarf2out.c (dwarf2out_decl): Do not handle nested functi

Re: GCC 8.2 Status Report (2018-07-19), branch frozen for release

2018-07-24 Thread Richard Biener
On July 24, 2018 5:50:33 PM GMT+02:00, Ramana Radhakrishnan wrote: >On Thu, Jul 19, 2018 at 10:11 AM, Richard Biener >wrote: >> >> Status >> == >> >> The GCC 8 branch is frozen for preparation of the GCC 8.2 release. >> All changes to the b

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 4:41 PM Jakub Jelinek wrote: > > On Tue, Jul 24, 2018 at 04:33:30PM +0200, Richard Biener wrote: > > DW_OP_GNU_variable_value you mean. That's true. But I was talking about > > Sure. > > > omitting DW_AT_upper_bound which would cor

Re: [PATCH 1/7] Add __builtin_speculation_safe_value

2018-07-24 Thread Richard Biener
On Mon, Jul 9, 2018 at 6:40 PM Richard Earnshaw wrote: > > > This patch defines a new intrinsic function > __builtin_speculation_safe_value. A generic default implementation is > defined which will attempt to use the backend pattern > "speculation_safe_barrier". If this pattern is not defined, o

Re: [PATCH] Make strlen range computations more conservative

2018-07-25 Thread Richard Biener
ed to drive the discussion. I think with respect to patches to fix issues in previous patches at this point a better option might be to revert the patches causing the issues and start from scratch in a more defined manner. Giving recent (temporary) regressions in the testsuite it feels like Martin is going too fast. Richard. -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

Re: [PATCH] Make strlen range computations more conservative

2018-07-25 Thread Richard Biener
ere for each class of change. > > > > Okay. > > > I think you, Martin, Richi and myself should hash through the technical > > issues raised by the patch. Obviously others can chime in, but I think > > the 4 of us probably need to drive the discussion. > >

Re: [PATCH] combine: Allow combining two insns to two insns

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 7:18 PM Segher Boessenkool wrote: > > This patch allows combine to combine two insns into two. This helps > in many cases, by reducing instruction path length, and also allowing > further combinations to happen. PR85160 is a typical example of code > that it can improve.

Re: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 4:07 AM Martin Sebor wrote: > > The very large option argument enhancement committed last week > inadvertently introduced an assumption about the LP64 data model > that makes the -Wxxx-larger-than options have a different effect > at their default documented setting of PTRD

Re: [01/46] Move special cases out of get_initial_def_for_reduction

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:53 AM Richard Sandiford wrote: > > This minor clean-up avoids repeating the test for double reductions > and also moves the vect_get_vec_def_for_operand call to the same > function as the corresponding vect_get_vec_def_for_stmt_copy. OK. > > 2018-07-24 Richard Sandifo

Re: [02/46] Remove dead vectorizable_reduction code

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:53 AM Richard Sandiford wrote: > > vectorizable_reduction has old code to cope with cases in which the > given statement belongs to a reduction group but isn't the first statement. > That can no longer happen, since all statements in the group go into the > same SLP node

Re: [03/46] Remove unnecessary update of NUM_SLP_USES

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:53 AM Richard Sandiford wrote: > > vect_free_slp_tree had: > > gimple *stmt; > FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt) > /* After transform some stmts are removed and thus their vinfo is gone. > */ > if (vinfo_for_stmt (stmt)) > { >

Re: [04/46] Factor out the test for a valid reduction input

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:54 AM Richard Sandiford wrote: > > vect_is_slp_reduction and vect_is_simple_reduction had two instances > each of: > > && (is_gimple_assign (def_stmt) > || is_gimple_call (def_stmt) > || STMT_VINFO_DEF_TYPE (vinfo_for_stm

Re: [05/46] Fix make_ssa_name call in vectorizable_reduction

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:54 AM Richard Sandiford wrote: > > The usual vectoriser dance to create new assignments is: > > new_stmt = gimple_build_assign (vec_dest, ...); > new_temp = make_ssa_name (vec_dest, new_stmt); > gimple_assign_set_lhs (new_stmt, new_temp); > > but one site in

Re: Fold pointer range checks with equal spans

2018-07-25 Thread Richard Biener
On Mon, Jul 23, 2018 at 5:05 PM Richard Sandiford wrote: > > Marc Glisse writes: > > On Fri, 20 Jul 2018, Richard Sandiford wrote: > > > >> --- gcc/match.pd 2018-07-18 18:44:22.565914281 +0100 > >> +++ gcc/match.pd 2018-07-20 11:24:33.692045585 +0100 > >> @@ -4924,3 +4924,37 @@ DEFINE_INT

Re: [06/46] Add vec_info::add_stmt

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:55 AM Richard Sandiford wrote: > > This patch adds a vec_info function for allocating and setting > stmt_vec_infos. It's the start of a long process of removing > the global stmt_vec_info array. > > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.

Re: [07/46] Add vec_info::lookup_stmt

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:55 AM Richard Sandiford wrote: > > This patch adds a vec_info replacement for vinfo_for_stmt. The main > difference is that the new routine can cope with arbitrary statements, > so there's no need to call vect_stmt_in_region_p first. > > The patch only converts calls th

Re: [08/46] Add vec_info::lookup_def

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:55 AM Richard Sandiford wrote: > > This patch adds a vec_info helper for checking whether an operand is an > SSA_NAME that is defined in the vectorisable region. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (vec_info::lookup_def): Decl

Re: [09/46] Add vec_info::lookup_single_use

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:56 AM Richard Sandiford wrote: > > This patch adds a helper function for seeing whether there is a single > user of an SSA name, and whether that user has a stmt_vec_info. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (vec_info::lookup_

Re: [10/46] Temporarily make stmt_vec_info a class

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:57 AM Richard Sandiford wrote: > > This patch turns stmt_vec_info into an unspeakably bad wrapper class > and adds an implicit conversion to the associated gimple stmt. > Having this conversion makes the rest of the series easier to write, > but since the class goes away

Re: [11/46] Pass back a stmt_vec_info from vect_is_simple_use

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:57 AM Richard Sandiford wrote: > > This patch makes vect_is_simple_use pass back a stmt_vec_info to > those callers that want it. Most users only need the stmt_vec_info > but some need the gimple stmt too. Hmm. Unfortunately it's not redundant for dt_extern ... > It'

Re: [12/46] Make vect_finish_stmt_generation return a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:58 AM Richard Sandiford wrote: > > This patch makes vect_finish_replace_stmt and vect_finish_stmt_generation > return the stmt_vec_info for the vectorised statement, so that the caller > doesn't need a separate vinfo_for_stmt to get at it. > > This involved changing the

Re: [13/46] Make STMT_VINFO_RELATED_STMT a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:58 AM Richard Sandiford wrote: > > This patch changes STMT_VINFO_RELATED_STMT from a gimple stmt to a > stmt_vec_info. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from > a gimple stmt to

Re: [14/46] Make STMT_VINFO_VEC_STMT a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:58 AM Richard Sandiford wrote: > > This patch changes STMT_VINFO_VEC_STMT from a gimple stmt to a > stmt_vec_info and makes the vectorizable_* routines pass back > a stmt_vec_info to vect_transform_stmt. OK, but - I don't think we ever "use" that stmt_info on vectorized

Re: [16/46] Make STMT_VINFO_REDUC_DEF a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:59 AM Richard Sandiford wrote: > > This patch changes STMT_VINFO_REDUC_DEF from a gimple stmt to a > stmt_vec_info. OK > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from > a gimple stmt to a stmt_

Re: [15/46] Make SLP_TREE_VEC_STMTS a vec

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:59 AM Richard Sandiford wrote: > > This patch changes SLP_TREE_VEC_STMTS from a vec to a > vec. This involved making the same change to the > phis vector in vectorizable_reduction, since SLP_TREE_VEC_STMTS is > spliced into it here: > > phis.splice (SLP_TREE_VEC_STMTS

Re: [17/46] Make LOOP_VINFO_REDUCTIONS an auto_vec

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 11:59 AM Richard Sandiford wrote: > > This patch changes LOOP_VINFO_REDUCTIONS from an auto_vec > to an auto_vec. It also changes the associated > vect_force_simple_reduction so that it takes and returns stmt_vec_infos > instead of gimple stmts. OK. Highlights that reduc

Re: [18/46] Make SLP_TREE_SCALAR_STMTS a vec

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:01 PM Richard Sandiford wrote: > > This patch changes SLP_TREE_SCALAR_STMTS from a vec to > a vec. It's longer than the previous conversions > but mostly mechanical. OK. I don't remember exactly but vect_external_def SLP nodes have empty stmts vector then? I realize

Re: [19/46] Make vect_dr_stmt return a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:01 PM Richard Sandiford wrote: > > This patch makes vect_dr_stmt return a stmt_vec_info instead of a > gimple stmt. Rather than retain a separate gimple stmt variable > in cases where both existed, the patch replaces uses of the gimple > variable with the uses of the st

Re: [20/46] Make *FIRST_ELEMENT and *NEXT_ELEMENT stmt_vec_infos

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:01 PM Richard Sandiford wrote: > > This patch changes {REDUC,DR}_GROUP_{FIRST,NEXT} element from a > gimple stmt to stmt_vec_info. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (_stmt_vec_info::first_element): Change from > a gi

Re: [22/46] Make DR_GROUP_SAME_DR_STMT a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:02 PM Richard Sandiford wrote: > > This patch changes STMT_VINFO_SAME_DR_STMT from a gimple stmt to a > stmt_vec_info. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from > a gimple stmt to

Re: [21/46] Make grouped_stores and reduction_chains use stmt_vec_infos

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:01 PM Richard Sandiford wrote: > > This patch changes the SLP lists grouped_stores and reduction_chains > from auto_vec to auto_vec. It was easier > to do them together due to the way vect_analyze_slp is structured. OK. > > 2018-07-24 Richard Sandiford > > gcc/ >

<    1   2   3   4   5   6   7   8   9   10   >