Re: [SVE] PR91532

2019-09-29 Thread Richard Biener
On Sun, 29 Sep 2019, Jeff Law wrote: > On 9/26/19 12:44 AM, Richard Biener wrote: > > On Wed, 25 Sep 2019, Prathamesh Kulkarni wrote: > > > >> On Fri, 20 Sep 2019 at 15:20, Jeff Law wrote: > >>> > >>> On 9/19/19 10:19 AM, Prathamesh Kulkarni wrote: > Hi, > For PR91532, the dead store i

Re: [RFC] Come up with ipa passes introduction in gccint documentation

2019-09-29 Thread luoxhu
Hi Segher, On 2019/9/30 00:17, Segher Boessenkool wrote: > Hi! > > Just some editorial comments... The idea of the patch is fine IMHO. > (I am not maintainer of this, take all my comments for what they are). > > On Sun, Sep 29, 2019 at 02:56:37AM -0500, Xiong Hu Luo wrote: >> To simplify deve

Re: [10/32] Remove global call sets: combine.c

2019-09-29 Thread Segher Boessenkool
On Sun, Sep 29, 2019 at 04:32:13PM -0600, Jeff Law wrote: > On 9/25/19 9:52 AM, Richard Sandiford wrote: > > gcc/ > > * combine.c: Include function-abi.h. > > (record_dead_and_set_regs): Use insn_callee_abi to get the ABI > > of the target of call insns. Invalidate partially-clobbered

Re: [SVE] PR91532

2019-09-29 Thread Jeff Law
On 9/26/19 12:44 AM, Richard Biener wrote: > On Wed, 25 Sep 2019, Prathamesh Kulkarni wrote: > >> On Fri, 20 Sep 2019 at 15:20, Jeff Law wrote: >>> >>> On 9/19/19 10:19 AM, Prathamesh Kulkarni wrote: Hi, For PR91532, the dead store is trivially deleted if we place dse pass between

Re: [10/32] Remove global call sets: combine.c

2019-09-29 Thread Jeff Law
On 9/25/19 9:52 AM, Richard Sandiford wrote: > Segher Boessenkool writes: >> Hi Richard, >> >> Sorry this too me so long to get back to. >> >> On Thu, Sep 12, 2019 at 08:51:59AM +0100, Richard Sandiford wrote: >>> Segher Boessenkool writes: On Wed, Sep 11, 2019 at 08:08:38PM +0100, Richard S

Re: [PATCH v2 1/2] libada: Remove racy duplicate gnatlib installation

2019-09-29 Thread Maciej W. Rozycki
On Sat, 28 Sep 2019, Maciej W. Rozycki wrote: > Index: gcc/gcc/ada/gcc-interface/Make-lang.in > === > --- gcc.orig/gcc/ada/gcc-interface/Make-lang.in > +++ gcc/gcc/ada/gcc-interface/Make-lang.in > @@ -843,6 +845,7 @@ doc/gnat-style.pd

Re: [27/32] Remove global call sets: reload.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:16 PM, Richard Sandiford wrote: > The inheritance code in find_equiv_reg can use clobbers_reg_p > to test whether a call clobbers either of the equivalent registers. > > reload and find_reg use crtl->abi to test whether a register needs > to be saved in the prologue before use. > > r

Re: [26/32] Remove global call sets: regrename.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:16 PM, Richard Sandiford wrote: > This patch makes regrename use a similar mask-and-clobber-set > pair to IRA when tracking whether registers are clobbered by > calls in a region. Testing for a nonzero ABI mask is equivalent > to testing for a register that crosses a call. > > Since

Re: [23/32] Remove global call sets: postreload-gcse.c

2019-09-29 Thread Jeff Law
On 9/25/19 10:08 AM, Richard Sandiford wrote: > Richard Sandiford writes: >> This is another case in which we should conservatively treat >> partial kills as full kills. > > Similary to the combine patch, I've updated this to avoid the > short "abi" name and use a temporary HARD_REG_SET instead.

Re: [32/32] Hide regs_invalidated_by_call etc.

2019-09-29 Thread Jeff Law
On 9/11/19 1:19 PM, Richard Sandiford wrote: > The previous patches removed all target-independent uses of > regs_invalidated_by_call, call_used_or_fixed_regs and > call_used_or_fixed_reg_p. This patch therefore restricts > them to target-specific code (and reginfo.c, which sets them up). > > >

Re: [31/32] Remove global call sets: shrink-wrap.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:18 PM, Richard Sandiford wrote: > This is a straight replacement of "calls we can clobber without saving > them first". > > > 2019-09-11 Richard Sandiford > > gcc/ > * shrink-wrap.c: Include function-abi.h. > (requires_stack_frame_p): Use crtl->abi to test whether the

Re: [00/32] Remove global call sets: rtlanal.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:17 PM, Richard Sandiford wrote: > The reg_set_p part is simple, since the caller is asking about > a specific REG rtx, with a known register number and mode. > > The find_all_hard_reg_sets part emphasises that the "implicit" > behaviour was always a bit suspect, since it includes full

Re: [29/32] Remove global call sets: sched-deps.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:17 PM, Richard Sandiford wrote: > This is a straight replacement of an existing "full or partial" > call-clobber check. > > > 2019-09-11 Richard Sandiford > > gcc/ > * sched-deps.c (deps_analyze_insn): Use the ABI of the target > function to test whether a register is

Re: [patch, fortran] PR 84487

2019-09-29 Thread Thomas Koenig
Hi, Jakub, do you have any comments? After Seve's OK I plan to commit in a couple of days unless I read anything to the contrary. Regards Thomas this patch makes sure that the __def_init variables, which have been generated for normal allocatable arrays for quite some time, do not fi

Re: [25/32] Remove global call sets: regcprop.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:15 PM, Richard Sandiford wrote: > This is a direct replacement of an existing test for fully and > partially clobbered registers. > > > 2019-09-11 Richard Sandiford > > gcc/ > * regcprop.c (copyprop_hardreg_forward_1): Use the recorded > mode of the register when deci

Re: [24/32] Remove global call sets: recog.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:15 PM, Richard Sandiford wrote: > 2019-09-11 Richard Sandiford > > gcc/ > * recog.c: Include function-abi.h. > (peep2_find_free_register): Use crtl->abi when deciding whether > a register is free for use after RA. OK jeff

Re: [22/32] Remove global call sets: postreload.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:14 PM, Richard Sandiford wrote: > The "|= fixed_regs" in reload_combine isn't necessary, since the > set is only used to determine which values have changed (rather than, > for example, which registers are available for use). > > In reload_cse_move2add we can be accurate about which r

Re: [20/32] Remove global call sets: loop-iv.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:13 PM, Richard Sandiford wrote: > Similar idea to the combine.c and gcse.c patches. > > > 2019-09-11 Richard Sandiford > > gcc/ > * loop-iv.c: Include regs.h and function-abi.h. > (simplify_using_initial_values): Use call_insn_abi to get the > ABI of the call in

Re: [18/32] Remove global call sets: haifa-sched.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:12 PM, Richard Sandiford wrote: > The code patched here is counting how many registers the current > function would need to save in the prologue before it uses them. > The code is called per function, so using crtl is OK. > > > 2019-09-11 Richard Sandiford > > gcc/ > * haif

Re: [17/32] Remove global call sets: gcse.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:11 PM, Richard Sandiford wrote: > This is another case in which we can conservatively treat partial > kills as full kills. Again this is in principle a bug fix for > TARGET_HARD_REGNO_CALL_PART_CLOBBERED targets, but in practice > it probably doesn't make a difference. > > > 2019-09

Re: [16/32] Remove global call sets: function.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:11 PM, Richard Sandiford wrote: > Whatever the rights and wrongs of the way aggregate_value_p > handles call-preserved registers, it's a de facto part of the ABI, > so we shouldn't change it. The patch simply extends the current > approach to whatever call-preserved set the function h

Re: [15/32] Remove global call sets: early-remat.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:10 PM, Richard Sandiford wrote: > This pass previously excluded rematerialisation candidates if they > clobbered a call-preserved register, on the basis that it then > wouldn't be safe to add new instances of the candidate instruction > after a call. This patch instead makes the decis

Re: [14/32] Remove global call sets: DF (entry/exit defs)

2019-09-29 Thread Jeff Law
On 9/11/19 1:10 PM, Richard Sandiford wrote: > The code patched here is seeing whether the current function > needs to save at least part of a register before using it. > > > 2019-09-11 Richard Sandiford > > gcc/ > * df-scan.c (df_get_entry_block_def_set): Use crtl->abi to test >

Re: [13/32] Remove global call sets: DF (EH edges)

2019-09-29 Thread Jeff Law
On 9/11/19 1:10 PM, Richard Sandiford wrote: > The DF dense_invalidated_by_call and sparse_invalidated_by_call > sets are actually only used on EH edges, and so are more the set > of registers that are invalidated by a taken EH edge. Under the > new order, that means that they describe eh_edge_abi

Re: [12/32] Remove global call sets: cselib.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:09 PM, Richard Sandiford wrote: > cselib_invalidate_regno is a no-op if REG_VALUES (i) is null, > so we can check that first. Then, if we know what mode the register > currently has, we can check whether it's clobbered in that mode. > > Using GET_MODE (values->elt->val_rtx) to get th

Re: [11/32] Remove global call sets: cse.c

2019-09-29 Thread Jeff Law
On 9/25/19 9:57 AM, Richard Sandiford wrote: > Richard Sandiford writes: >> Like with the combine.c patch, this one keeps things simple by >> invalidating values in partially-clobbered registers, rather than >> trying to tell whether the value in a partially-clobbered register >> is actually clobb

Re: [09/32] Remove global call sets: cfgloopanal.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:08 PM, Richard Sandiford wrote: > ...or rather, make the use of the default ABI explicit. That seems > OK if not ideal for this heuristic. > > In practical terms, the code patched here is counting GENERAL_REGS, > which are treated in the same way by all concurrent ABI variants > on A

Re: [08/32] Remove global call sets: cfgcleanup.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:07 PM, Richard Sandiford wrote: > old_insns_match_p just tests whether two instructions are > similar enough to merge. With call_insn_abi it makes more > sense to compare the ABIs directly. > > > 2019-09-11 Richard Sandiford > > gcc/ > * cfgcleanup.c (old_insns_match_p): C

Re: [07/32] Remove global call sets: caller-save.c

2019-09-29 Thread Jeff Law
On 9/11/19 1:07 PM, Richard Sandiford wrote: > All caller-save.c uses of "|= fixed_reg_set" added in a previous patch > were redundant, since the sets are later ANDed with ~fixed_reg_set. > > > 2019-09-11 Richard Sandiford > > gcc/ > * caller-save.c (setup_save_areas): Remove redundant

Re: [06/32] Pass an ABI to choose_hard_reg_mode

2019-09-29 Thread Jeff Law
On 9/11/19 1:06 PM, Richard Sandiford wrote: > choose_hard_reg_mode previously took a boolean saying whether the > mode needed to be call-preserved. This patch replaces it with an > optional ABI pointer instead, so that the function can use that > to test whether a value is call-saved. > > defaul

[Darwin, PPC, Mode Iterators 5/n, committed] Update macho_low.

2019-09-29 Thread Iain Sandoe
Replace the define_expand and two define_insns with a single @macho_low_ and update callers. as usual, tested on powerpc-darwin9 and powerpc64-linux-gnu applied to mainline thanks Iain gcc/ChangeLog: 2019-09-29 Iain Sandoe * config/darwin.c (gen_macho_low):Amend to include the mode

Re: [05/32] Pass an ABI identifier to hard_regno_call_part_clobbered

2019-09-29 Thread Jeff Law
On 9/11/19 1:05 PM, Richard Sandiford wrote: > This patch replaces the rtx_insn argument to > targetm.hard_regno_call_part_clobbered with an ABI identifier, since > call insns are now just one possible way of getting an ABI handle. > This in turn allows predefined_function_abi::initialize to do the

Re: [02/32] Add a target hook for getting an ABI from a function type

2019-09-29 Thread Jeff Law
On 9/11/19 1:03 PM, Richard Sandiford wrote: > This patch adds a target hook that allows targets to return > the ABI associated with a particular function type. Generally, > when multiple ABIs are in use, it must be possible to tell from > a function type and its attributes which ABI it is using.

Re: [01/32] Add function_abi.{h,cc}

2019-09-29 Thread Jeff Law
On 9/11/19 1:03 PM, Richard Sandiford wrote: > This patch adds new structures and functions for handling > multiple ABIs in a translation unit. The structures are: > > - predefined_function_abi: describes a static, predefined ABI > - function_abi: describes either a predefined ABI or a local >

Re: [committed, obvious] Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update

2019-09-29 Thread Christophe Lyon
On Fri, 27 Sep 2019 at 23:25, Maciej W. Rozycki wrote: > > A change made with r275564 ("[ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle > arm*-*-uclinuxfdpiceabi in configure scripts") to libtool.m4 has not > regenerated all the `configure' scripts affected. Fix it. > Oops sorry! I knew I forgot someth

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

2019-09-29 Thread Martin Sebor
-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 hardwired into GCC. Although it's possible for users to create wrappers for their own functions to detect si

[Committed] PR fortran/91641 -- is_contiguous(null())

2019-09-29 Thread Steve Kargl
The attach patch has been committed as obvious. The ChangeLog entry should provide sufficient detail. 2019-09-29 Steven G. Kargl PR fortran/91641 * check.c (gfc_check_is_contiguous): null() cannot be an actual argument to is_contiguous(). 2019-09-29 Steven G. Kargl

Re: [PATCH] declare bcmp, bcopy, and bzero nonnull (PR 80936)

2019-09-29 Thread Jeff Law
On 9/27/19 1:06 PM, Martin Sebor wrote: > GCC declares bcmp, bcopy, and bzero without the nonnull attribute. > This was a deliberate decision as is reflected in the comment in > builtins.def: > > /* bcmp, bcopy and bzero have traditionally accepted NULL pointers >    when the length parameter is z

Re: [RFC] Come up with ipa passes introduction in gccint documentation

2019-09-29 Thread Segher Boessenkool
Hi! Just some editorial comments... The idea of the patch is fine IMHO. (I am not maintainer of this, take all my comments for what they are). On Sun, Sep 29, 2019 at 02:56:37AM -0500, Xiong Hu Luo wrote: > To simplify development, the GCC pass manager differentiates > -between normal inter-pro

[PATCH] Fix -Waddress-of-packed-member ICE in unevaluated contexts (PR c++/91925)

2019-09-29 Thread Jakub Jelinek
Hi! On the following testcase we ICE, because check_alignment_of_packed_member is called on the decltype expressions and the aggregate has not been laid out. The following patch fixes it by not emitting warnings on fields that weren't laid out yet. Bootstrapped/regtested on x86_64-linux and i686

Re: [PATCH] Assorted optc-save-gen.awk fixes (PR bootstrap/90543)

2019-09-29 Thread Jakub Jelinek
On Sun, Sep 29, 2019 at 06:34:04PM +1000, Michael Chamberlain wrote: > The last line modified above will print ptr1->..., but I think it should be > using ptr2 both in the condition and the true alternative. You're right, fixed thusly, committed as obvious to trunk so far, will backport to 9.3 too

Re: [RFH][libgcc] fp-bit bit ordering (PR 78804)

2019-09-29 Thread Bernd Edlinger
Hi Oleg, I think both variants should fix the issues for us. But I cannot tell if the bitfield access generates more efficient code or identical code than the original variant when no ms bitfields are used. That needs closer inspection of the generated assembler code, a simple bootstrap / regtest

Re: [PATCH, rs6000] Lower vec_perm vectorization cost for P8/P9

2019-09-29 Thread Kewen.Lin
Hi Segher, on 2019/9/29 下午3:28, Segher Boessenkool wrote: > Hi! > > On Sun, Sep 29, 2019 at 01:38:31PM +0800, Kewen.Lin wrote: >> Recently we are revisiting vectorization cost setting in >> rs6000_builtin_vectorization_cost, and found the current cost of >> vec_perm on VSX looks overpriced for P

[RFC] Come up with ipa passes introduction in gccint documentation

2019-09-29 Thread Xiong Hu Luo
There is no ipa passes introduction in gccint now, is it nessessary to add this part as both GIMPLE passes and RTL passes breif intruduction already exit in Chapter 9 "Passes and Files of the Compiler" but no section for ipa passes? If it's OK, this is just a framework, lots of words need be filled

Re: [PATCH, rs6000] Lower vec_perm vectorization cost for P8/P9

2019-09-29 Thread Segher Boessenkool
Hi! On Sun, Sep 29, 2019 at 01:38:31PM +0800, Kewen.Lin wrote: > Recently we are revisiting vectorization cost setting in > rs6000_builtin_vectorization_cost, and found the current cost of > vec_perm on VSX looks overpriced for Power8 and Power9. Yeah it does. > The high > cost was set for Powe