Re: [PATCH] Make strlen range computations more conservative

2018-07-25 Thread Richard Biener
On Tue, 24 Jul 2018, Jeff Law wrote: > On 07/24/2018 01:59 AM, Bernd Edlinger wrote: > > Hi! > > > > This patch makes strlen range computations more conservative. > > > > Firstly if there is a visible type cast from type A to B before passing > > then value to strlen, don't expect the type layou

Re: [PATCH] Make strlen range computations more conservative

2018-07-25 Thread Richard Biener
On Tue, 24 Jul 2018, Bernd Edlinger wrote: > On 07/24/18 23:46, Jeff Law wrote: > > On 07/24/2018 01:59 AM, Bernd Edlinger wrote: > >> Hi! > >> > >> This patch makes strlen range computations more conservative. > >> > >> Firstly if there is a visible type cast from type A to B before passing > >>

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/ >

Re: [23/46] Make LOOP_VINFO_MAY_MISALIGN_STMTS use stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:02 PM Richard Sandiford wrote: > > This patch changes LOOP_VINFO_MAY_MISALIGN_STMTS from an > auto_vec to an auto_vec. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change > from an auto_vec

Re: [24/46] Make stmt_info_for_cost use a stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:02 PM Richard Sandiford wrote: > > This patch makes stmt_info_for_cost carry a stmt_vec_info instead > of a gimple stmt. The structure is internal to the vectoriser, > so targets aren't affected. OK > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectori

Re: [25/46] Make get_earlier/later_stmt take and return stmt_vec_infos

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:03 PM Richard Sandiford wrote: > > ...and also make vect_find_last_scalar_stmt_in_slp return a stmt_vec_info. OK > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and > return stmt_vec_infos rath

Re: [26/46] Make more use of dyn_cast in tree-vect*

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:03 PM Richard Sandiford wrote: > > If we use stmt_vec_infos to represent statements in the vectoriser, > it's then more natural to use dyn_cast when processing the statement > as an assignment, call, etc. This patch does that in a few more places. OK. > > 2018-07-24

Re: [27/46] Remove duplicated stmt_vec_info lookups

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:03 PM Richard Sandiford wrote: > > Various places called vect_dr_stmt or vinfo_for_stmt multiple times > on the same input. This patch makes them reuse the earlier result. > It also splits a couple of single vinfo_for_stmt calls out into > separate statements so that th

Re: [28/46] Use stmt_vec_info instead of gimple stmts internally (part 1)

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:04 PM Richard Sandiford wrote: > > This first part makes functions use stmt_vec_infos instead of > gimple stmts in cases where the stmt_vec_info was already available > and where the change is mechanical. Most of it is just replacing > "stmt" with "stmt_info". OK > >

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

2018-07-25 Thread Richard Earnshaw (lists)
On 24/07/18 17:30, Richard Biener wrote: > 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 th

Re: [PATCH 1/7] Add __builtin_speculation_safe_value

2018-07-25 Thread Richard Earnshaw (lists)
On 24/07/18 18:26, Richard Biener wrote: > 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 >> "speculatio

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

2018-07-25 Thread Segher Boessenkool
On Wed, Jul 25, 2018 at 10:28:30AM +0200, Richard Biener wrote: > 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 combinati

Re: [PATCH][GCC][Arm] Fix subreg crash in different way by enabling the FP16 pattern unconditionally.

2018-07-25 Thread Thomas Preudhomme
Hi Tamar, On Mon, 23 Jul 2018 at 17:56, Tamar Christina wrote: > > Hi All, > > My previous patch changed arm_can_change_mode_class to allow subregs of > 64bit registers on arm big-endian. However it seems that we can't do this > because a the data in 64 bit VFP registers are stored in little-end

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

2018-07-25 Thread Richard Biener
On Wed, 25 Jul 2018, Richard Earnshaw (lists) wrote: > On 24/07/18 17:30, Richard Biener wrote: > > 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 bran

Re: [29/46] Use stmt_vec_info instead of gimple stmts internally (part 2)

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:04 PM Richard Sandiford wrote: > > This second part handles the less mechnical cases, i.e. those that don't > just involve swapping a gimple stmt for an existing stmt_vec_info. OK. > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vect-loop.c (vect_analyze_

Re: [30/46] Use stmt_vec_infos rather than gimple stmts for worklists

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:05 PM Richard Sandiford wrote: > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type > of the worklist from a vector of gimple stmts to a vector of > stmt_vec_infos. > * tree-vect

Re: [Patch] [Aarch64] PR 86538 - Define __ARM_FEATURE_LSE if LSE is available

2018-07-25 Thread Richard Earnshaw (lists)
On 24/07/18 22:55, Steve Ellcey wrote: > On Tue, 2018-07-24 at 22:04 +0100, James Greenhalgh wrote: >>   >> >> I'd say this patch isn't desirable for trunk. I'd be interested in use cases >> that need a static decision on presence of LSE that are not better expressed >> using higher level language

Re: [31/46] Use stmt_vec_info in function interfaces (part 1)

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:05 PM Richard Sandiford wrote: > > This first (less mechanical) part handles cases that involve changes in > the callers or non-trivial changes in the functions themselves. OK > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vect-data-refs.c (vect_describe

Re: [33/46] Use stmt_vec_infos instead of vec_info/gimple stmt pairs

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:06 PM Richard Sandiford wrote: > > This patch makes vect_record_max_nunits and vect_record_base_alignment > take a stmt_vec_info instead of a vec_info/gimple pair. OK > > 2018-07-24 Richard Sandiford > > gcc/ > * tree-vect-data-refs.c (vect_record_base_align

Re: [32/46] Use stmt_vec_info in function interfaces (part 2)

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:06 PM Richard Sandiford wrote: > > This second part handles the mechanical change from a gimple stmt > argument to a stmt_vec_info argument. It updates the function > comments if they referred to the argument by name, but it doesn't > try to retrofit mentions to other f

Re: [34/46] Alter interface to vect_get_vec_def_for_stmt_copy

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:06 PM Richard Sandiford wrote: > > This patch makes vect_get_vec_def_for_stmt_copy take a vec_info > rather than a vect_def_type. If the vector operand passed in is > defined in the vectorised region, we should look for copies in > the normal way. If it's defined in an

Re: [35/46] Alter interfaces within vect_pattern_recog

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:06 PM Richard Sandiford wrote: > > vect_pattern_recog_1 took a gimple_stmt_iterator as argument, but was > only interested in the gsi_stmt, not anything else. This patch makes > the associated routines operate directly on stmt_vec_infos. OK > > 2018-07-24 Richard San

Re: [36/46] Add a pattern_stmt_p field to stmt_vec_info

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:07 PM Richard Sandiford wrote: > > This patch adds a pattern_stmt_p field to stmt_vec_info, so that it's > possible to tell whether the statement is a pattern statement without > referring to other statements. The new field goes in what was > previously a hole in the st

Re: [37/46] Associate alignment information with stmt_vec_infos

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:08 PM Richard Sandiford wrote: > > Alignment information is really a property of a stmt_vec_info > (and the way we want to vectorise it) rather than the original scalar dr. > I think that was true even before the recent dr sharing. But that is only so as long as we hand

Re: [38/46] Pass stmt_vec_infos instead of data_references where relevant

2018-07-25 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:08 PM Richard Sandiford wrote: > > This patch makes various routines (mostly in tree-vect-data-refs.c) > take stmt_vec_infos rather than data_references. The affected routines > are really dealing with the way that an access is going to vectorised > for a particular stm

Re: [PATCH 1/7] Add __builtin_speculation_safe_value

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 11:49 AM Richard Earnshaw (lists) wrote: > > On 24/07/18 18:26, Richard Biener wrote: > > 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 impleme

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

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 11:50 AM Segher Boessenkool wrote: > > On Wed, Jul 25, 2018 at 10:28:30AM +0200, Richard Biener wrote: > > 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

[PATCH] Move std::unique_lock definition to a separate header

2018-07-25 Thread Jonathan Wakely
This will allow std::mutex and std::lock_guard to be used elsewhere in the library without pulling in the whole of . Previously the whole of was conditional on the _GLIBCXX_USE_C99_STDINT_TR1 macro, but only the std::unique_lock members that use facilities should depend on that. std::mutex only

Re: [Patch] [Aarch64] PR 86538 - Define __ARM_FEATURE_LSE if LSE is available

2018-07-25 Thread Ramana Radhakrishnan
On Tue, Jul 24, 2018 at 10:55 PM, Steve Ellcey wrote: > On Tue, 2018-07-24 at 22:04 +0100, James Greenhalgh wrote: >> >> >> I'd say this patch isn't desirable for trunk. I'd be interested in use cases >> that need a static decision on presence of LSE that are not better expressed >> using higher l

Re: [PATCH] Add initial version of C++17 header

2018-07-25 Thread Jonathan Wakely
On 24/07/18 22:12 +0100, Jonathan Wakely wrote: This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in , but memory_resource and polymorphic_allocator ended up looking almo

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-25 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 04:11:11PM -0300, Alexandre Oliva wrote: > On Jul 24, 2018, Tom de Vries wrote: > > > This patch adds fake uses of user variables at the point where they go out > > of > > scope, to keep user variables inspectable throughout the application. > > I suggest also adding suc

Re: [14/46] Make STMT_VINFO_VEC_STMT a stmt_vec_info

2018-07-25 Thread Richard Sandiford
Richard Biener writes: > 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

Re: [PATCH, debug] Add fkeep-vars-live

2018-07-25 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 05:04:06PM +0200, Tom de Vries wrote: > > > +Add artificial use for each local variable at the end of the > > declaration scope > > Is this a better option description? Yes (with a period at the end). Or perhaps "its" instead of "the". Looks ok to me, just would like to

RE: [PATCH][GCC][AArch64] Updated stack-clash implementation supporting 64k probes. [patch (1/6)]

2018-07-25 Thread Tamar Christina
Hi All, Attached is an updated patch that clarifies some of the comments in the patch and adds comments to the individual testcases as requested. Ok for trunk? Thanks, Tamar gcc/ 2018-07-25 Jeff Law Richard Sandiford Tamar Christina PR target/86486

RE: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-25 Thread Tamar Christina
HI Alexandre, Thanks for the review. Attached is the updated patch and new changelog below: Thanks, Tamar gcc/ 2018-07-25 Tamar Christina PR target/86486 * configure.ac: Add stack-clash-protection-guard-size. * doc/install.texi: Document it. * config.in (DEFAU

RE: [PATCH][GCC][AArch64] Ensure that outgoing argument size is at least 8 bytes when alloca and stack-clash. [Patch (3/6)]

2018-07-25 Thread Tamar Christina
Hi All, Attached an updated patch which documents what the test cases are expecting as requested. Ok for trunk? Thanks, Tamar gcc/ 2018-07-25 Tamar Christina PR target/86486 * config/aarch64/aarch64.h (STACK_CLASH_OUTGOING_ARGS, STACK_DYNAMIC_OFFSET): New. *

Re: [36/46] Add a pattern_stmt_p field to stmt_vec_info

2018-07-25 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jul 24, 2018 at 12:07 PM Richard Sandiford > wrote: >> >> This patch adds a pattern_stmt_p field to stmt_vec_info, so that it's >> possible to tell whether the statement is a pattern statement without >> referring to other statements. The new field goes in what w

Re: [38/46] Pass stmt_vec_infos instead of data_references where relevant

2018-07-25 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jul 24, 2018 at 12:08 PM Richard Sandiford > wrote: >> >> This patch makes various routines (mostly in tree-vect-data-refs.c) >> take stmt_vec_infos rather than data_references. The affected routines >> are really dealing with the way that an access is going to v

Re: [PATCH, debug] Add fkeep-vars-live

2018-07-25 Thread Richard Biener
On Tue, 24 Jul 2018, Tom de Vries wrote: > On Tue, Jul 24, 2018 at 02:34:26PM +0200, Tom de Vries wrote: > > On 07/24/2018 01:46 PM, Jakub Jelinek wrote: > > > On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: > > >> Another drawback is that the fake uses confuse the unitialized warnin

Re: [PATCH, debug] Add fkeep-vars-live

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 1:41 PM Richard Biener wrote: > > On Tue, 24 Jul 2018, Tom de Vries wrote: > > > On Tue, Jul 24, 2018 at 02:34:26PM +0200, Tom de Vries wrote: > > > On 07/24/2018 01:46 PM, Jakub Jelinek wrote: > > > > On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: > > > >> A

Re: [36/46] Add a pattern_stmt_p field to stmt_vec_info

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 1:09 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Jul 24, 2018 at 12:07 PM Richard Sandiford > > wrote: > >> > >> This patch adds a pattern_stmt_p field to stmt_vec_info, so that it's > >> possible to tell whether the statement is a pattern statement

[PATCH][OBVIOUS] Fix wrong declaration.

2018-07-25 Thread Martin Liška
Hi. It's obvious fix of return type. It's the same what's in gcc/config/rs6000/rs6000.h. Martin gcc/ChangeLog: 2018-07-25 Martin Liska * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix return type. --- gcc/config/powerpcspe/powerpcspe-protos.h | 2 +- 1 file

Re: [PATCH] Fix PR86654

2018-07-25 Thread Richard Biener
On Tue, 24 Jul 2018, Richard Biener wrote: > > I am testing the following patch to avoid forcing DIEs for a type context > for method clones late via limbo processing. Instead hang them off > comp_unit_die if there is no early DIE for the function. > > One question is whether the comment "If we

optimize std::vector move assignment

2018-07-25 Thread Marc Glisse
Hello, I talked about this last year (https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01063.html and thread), this tweaks std::vector move assignment to help gcc generate better code for it. For this code #include #include typedef std::vector V; void f(V&a,V&b){a=std::move(b);} with -O2 -f

Re: [PATCH 1/7] Add __builtin_speculation_safe_value

2018-07-25 Thread Richard Earnshaw (lists)
On 25/07/18 11:36, Richard Biener wrote: > On Wed, Jul 25, 2018 at 11:49 AM Richard Earnshaw (lists) > wrote: >> >> On 24/07/18 18:26, Richard Biener wrote: >>> On Mon, Jul 9, 2018 at 6:40 PM Richard Earnshaw >>> wrote: This patch defines a new intrinsic function __builtin_spe

Re: [PATCH] Make strlen range computations more conservative

2018-07-25 Thread Bernd Edlinger
On 07/24/18 16:50, Richard Biener wrote: > On Tue, 24 Jul 2018, Bernd Edlinger wrote: > >> Hi! >> >> This patch makes strlen range computations more conservative. >> >> Firstly if there is a visible type cast from type A to B before passing >> then value to strlen, don't expect the type layout of

Re: [GCC][PATCH][Aarch64] Stop redundant zero-extension after UMOV when in DI mode

2018-07-25 Thread Sam Tebbs
On 07/23/2018 05:01 PM, Sudakshina Das wrote: Hi Sam On Monday 23 July 2018 11:39 AM, Sam Tebbs wrote: Hi all, This patch extends the aarch64_get_lane_zero_extendsi instruction definition to also cover DI mode. This prevents a redundant AND instruction from being generated due to the patter

Re: optimize std::vector move assignment

2018-07-25 Thread Jonathan Wakely
On 25/07/18 14:38 +0200, Marc Glisse wrote: Hello, I talked about this last year (https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01063.html and thread), this tweaks std::vector move assignment to help gcc generate better code for it. Ah yes, thank for revisiting it. For this code #include

Re: [2/5] C-SKY port: Backend implementation

2018-07-25 Thread Paul Koning
> On Jul 25, 2018, at 12:50 AM, Jeff Law wrote: > ... >>> It did. See TARGET_CUSTOM_FUNCTION_DESCRIPTORS and the (relatively few) >>> ports that define it. >> >> Hmmm, I completely failed to make that connection from the docs -- the >> whole description of that hook is pretty gibberishy

Re: optimize std::vector move assignment

2018-07-25 Thread Marc Glisse
On Wed, 25 Jul 2018, Jonathan Wakely wrote: _M_copy_data is not really needed, we could add a defaulted assignment operator, or remove the move constructor (and call a new _M_clear() from the 2 users), etc. However, it seemed the least intrusive, the least likely to have weird consequences.

Re: [PATCH, ARM] PR85434: Prevent spilling of stack protector guard's address on ARM

2018-07-25 Thread Thomas Preudhomme
Hi Kyrill, Using memory_operand worked, the issues I encountered when using it in earlier versions of the patch must have been due to the missing test on address_operand in the preparation statements which I added later. Please find an updated patch in attachment. ChangeLog entry is as follows: *

[PATCH] Fix target clones (PR gcov-profile/85370).

2018-07-25 Thread Martin Liška
Hi. Target clones have DECL_ARTIFICIAL set to 1, but we want to provide --coverage for that. With patched GCC on can see: -:0:Source:pr85370.c -:0:Graph:pr85370.gcno -:0:Data:pr85370.gcda -:0:Runs:1 -:0:Programs:1 -:1:__attri

[PATCH] Fix GCOV CFG related issues.

2018-07-25 Thread Martin Liška
Hi. It fixes couple of very similar issues. Currently we handle GOTO expression, but it's not easy to find these in GIMPLE middle-end. The patch fixes that. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Will install in couple of days if no objection. Martin gcc/Chan

[PATCH] GCOV: add cache for streamed locations.

2018-07-25 Thread Martin Liška
Hi. Last patch from GCOV series is about not streaming of redundant lines for a basic-block. It helps to fix few issues. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Will install in couple of days if no objection. Martin gcc/ChangeLog: 2018-07-25 Martin Liska

Re: [PATCH 1/7] Add __builtin_speculation_safe_value

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 2:41 PM Richard Earnshaw (lists) wrote: > > On 25/07/18 11:36, Richard Biener wrote: > > On Wed, Jul 25, 2018 at 11:49 AM Richard Earnshaw (lists) > > wrote: > >> > >> On 24/07/18 18:26, Richard Biener wrote: > >>> On Mon, Jul 9, 2018 at 6:40 PM Richard Earnshaw > >>> wro

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

2018-07-25 Thread David Malcolm
On Tue, 2018-07-24 at 17:18 +, 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 1/4] [ARC] Add more additional register names

2018-07-25 Thread Andrew Burgess
All the patches in this series look fine. Thanks, Andrew * Claudiu Zissulescu [2018-07-16 15:29:42 +0300]: > From: claziss > > gcc/ > 2017-06-14 Claudiu Zissulescu > > * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional > register names. > --- > gcc/config/arc/arc

Re: [PATCH] Fix target clones (PR gcov-profile/85370).

2018-07-25 Thread Richard Biener
On Wed, Jul 25, 2018 at 3:38 PM Martin Liška wrote: > > Hi. > > Target clones have DECL_ARTIFICIAL set to 1, but we want to > provide --coverage for that. With patched GCC on can see: > > -:0:Source:pr85370.c > -:0:Graph:pr85370.gcno > -:0:Data:pr85370.gcda >

[PATCH] Alias -Warray-bounds to -Warray-bounds=1

2018-07-25 Thread Franz Sirl
Hi, as discussed with Martin, this patch consolidates -Warray-bounds into an alias of -Warray-bounds=1. Bootstrapped on x86_64-linux, no regressions. Please apply if it's OK. Franz. gcc/ChangeLog: 2018-07-25 Franz Sirl * common.opt: Alias -Warray-bounds to -Warray-bounds=1.

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

2018-07-25 Thread Segher Boessenkool
On Wed, Jul 25, 2018 at 09:47:31AM -0400, David Malcolm wrote: > > +/* Return whether X is just a single set, with the source > > + a general_operand. */ > > +static bool > > +is_just_move (rtx x) > > +{ > > + if (INSN_P (x)) > > +x = PATTERN (x); > > + > > + return (GET_CODE (x) == SET &&

[committed] optinfo-emit-json.cc: fix trivial memory leak

2018-07-25 Thread David Malcolm
There's a small leak in class optrecord_json_writer, which shows up as a new leak in "make selftest-valgrind" as: ==50133== 40 bytes in 1 blocks are definitely lost in loss record 27 of 672 ==50133==at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==50133==b

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

2018-07-25 Thread Martin Sebor
On 07/25/2018 02:34 AM, Richard Biener wrote: 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

Re: [2/5] C-SKY port: Backend implementation

2018-07-25 Thread Sandra Loosemore
On 07/25/2018 07:16 AM, Paul Koning wrote: Non-executable stacks are a very good thing. That said, I also looked at the target hook documentation and was left without any clue whatsoever. It sure isn't clear what powers of two have to do with descriptors, or what descriptors have to do with su

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

2018-07-25 Thread Jakub Jelinek
On Wed, Jul 25, 2018 at 08:54:13AM -0600, Martin Sebor wrote: > I don't mean for the special value to be used except internally > for the defaults. Otherwise, users wanting to override the default > will choose a value other than it. I'm happy to document it in > the .opt file for internal users

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

2018-07-25 Thread David Malcolm
On Tue, 2018-07-24 at 16:11 +0200, Richard Biener wrote: > 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 > > m> > > > wrote: > > > > > > > > This patch adds a Python 3 m

RE: [PATCH 1/4] [ARC] Add more additional register names

2018-07-25 Thread Claudiu Zissulescu
Pushed. Thank you for your review, Claudiu From: Andrew Burgess [andrew.burg...@embecosm.com] Sent: Wednesday, July 25, 2018 3:49 PM To: Claudiu Zissulescu Cc: gcc-patches@gcc.gnu.org; francois.bed...@synopsys.com; claziss Subject: Re: [PATCH 1/4] [ARC] Add

RE: [PATCH][GCC][Arm] Fix subreg crash in different way by enabling the FP16 pattern unconditionally.

2018-07-25 Thread Tamar Christina
Hi Thomas, Thanks for the review! > > > > I don't believe the TARGET_FP16 guard to be needed, because the > > pattern doesn't actually generate code and requires another pattern > > for that, and a reg to reg move should always be possible anyway. So > > allowing the force to register here is saf

[PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
The fortran FE incorrectly records the line locations of combined acc loop directives when it lowers the construct to gimple. Usually this isn't a problem because the fortran FE is able to report problems with acc loops itself. However, there will be inaccuracies if the ME tries to use those locati

[PATCH 0/3] Add OpenACC diagnostics to -fopt-info-note-omp

2018-07-25 Thread Cesar Philippidis
This patch series extends -fopt-info-note-omp to include OpenACC loop diagnostics when it is used in conjunction with -fopenacc. At present, the diagnostics are limited to reporting how OpenACC loops are partitioned, e.g., seq, gang, worker or vector. The major advantage of this diagnostics is that

[PATCH 2/3] Correct the reported line number in c++ combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
Like the fortran FE, the C++ FE doesn't set the expr_location of the split acc loop in combined acc parallel/kernels loop directives. This only happens for with combined directives, otherwise cp_parser_omp_construct would be responsible for setting the location. After fixing this bug, I was able to

[PATCH 3/3] Add user-friendly OpenACC diagnostics regarding detected parallelism.

2018-07-25 Thread Cesar Philippidis
This patch teaches GCC to inform the user how it assigned parallelism to each OpenACC loop at compile time using the -fopt-info-note-omp flag. For instance, given the acc parallel loop nest: #pragma acc parallel loop for (...) #pragma acc loop vector for (...) GCC will report somthing

Re: [PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Marek Polacek
On Wed, Jul 25, 2018 at 08:29:17AM -0700, Cesar Philippidis wrote: > The fortran FE incorrectly records the line locations of combined acc > loop directives when it lowers the construct to gimple. Usually this > isn't a problem because the fortran FE is able to report problems with > acc loops itse

Re: [PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
On 07/25/2018 08:32 AM, Marek Polacek wrote: > On Wed, Jul 25, 2018 at 08:29:17AM -0700, Cesar Philippidis wrote: >> The fortran FE incorrectly records the line locations of combined acc >> loop directives when it lowers the construct to gimple. Usually this >> isn't a problem because the fortran F

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

2018-07-25 Thread Martin Sebor
On 07/25/2018 08:57 AM, Jakub Jelinek wrote: On Wed, Jul 25, 2018 at 08:54:13AM -0600, Martin Sebor wrote: I don't mean for the special value to be used except internally for the defaults. Otherwise, users wanting to override the default will choose a value other than it. I'm happy to document

[gomp5] Add host teams construct support

2018-07-25 Thread Jakub Jelinek
Hi! OpenMP 5.0 allows the teams construct, previously required to be strictly nested (i.e. without any OpenMP construct in between) and even with no user code in between inside of target construct, also as a host construct that is not nested in any OpenMP construct at all. The primary goal is for

Re: [C++ PATCH] Further get_identifier ("string literal") C++ FE caching

2018-07-25 Thread Nathan Sidwell
On 07/18/2018 06:43 PM, Jakub Jelinek wrote: On Wed, Jul 18, 2018 at 06:00:20PM -0400, Nathan Sidwell wrote: So cool! Thanks. Ok for both patches or just this one? both are ok, sorry for delay (vacation), thanks for doing that! nathan -- Nathan Sidwell

  1   2   >