Re: [AArch64] Implement movmem for the benefit of inline memcpy

2014-08-05 Thread Andrew Pinski
On Fri, Aug 1, 2014 at 2:21 AM, wrote: > > >> On Jun 6, 2014, at 1:50 AM, James Greenhalgh >> wrote: >> >> >> Hi, >> >> The move_by_pieces infrastructure performs a copy by repeatedly trying >> the largest safe copy it can make. So for a 15-byte copy we might see: >> >> offset amount bytes c

Re: [PATCH] Fix bootstrap failure because of -Wreturn-local-addr

2014-08-05 Thread Richard Biener
On Mon, 4 Aug 2014, Jakub Jelinek wrote: > Hi! > > I've tried to bootstrap with r213515 because later revisions broke because > of the hash_map and Ada changes, but unfortunately even that revision > failus to bootstrap, the new -Wreturn-local-addr warning rightfully > warns about get_ivts_expr p

[PATCH] Fix PR61672

2014-08-05 Thread Richard Biener
When removing the MEM_ATTR unification hash I didn't grep for MEM_ATTR equality comares which now causes PR61672, missed optimizations at least in PRE. The following fixes that by exporting and using mem_attrs_eq_p. Bootstrapped and tested on x86_64-unknown-linux-gnu - as this is a regression on

Re: [RFC: Patch, PR 60102] [4.9/4.10 Regression] powerpc fp-bit ices@dwf_regno

2014-08-05 Thread Jakub Jelinek
On Mon, Aug 04, 2014 at 11:51:34AM -0500, Edmar wrote: > Committed on trunk, revision 213596 > Committed on 4.9 branch, revision 213597 Note the ChangeLog entry was grossly misformated. I've fixed it up in gcc/ChangeLog on the trunk, but not on the branch nor in libgcc. There should be no space b

Re: [PATCH] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-05 Thread Richard Biener
On Mon, Aug 4, 2014 at 3:04 PM, wrote: > From: Trevor Saunders > > Hi, > > It used to be that edge_var_maps held pointers to embedded vectors, but > now it holds vectors. This means that now instead of copying the > address of the embedded vector from the table we keep a pointer into the > tabl

Re: Invalid gimple for nested functions

2014-08-05 Thread Richard Biener
On Mon, Aug 4, 2014 at 10:37 PM, Bernd Schmidt wrote: > Some code I added for the ptx backend triggered tree-checking failures for > gimple created in tree-nested: we can end up taking the address of an > SSA_NAME, which seems invalid. The problem is that code in tree-nested wants > to change the

Re: [PATCH][convert.c] PR 61876: Guard transformation to lrint by -fno-math-errno

2014-08-05 Thread Richard Biener
On Mon, Aug 4, 2014 at 2:27 PM, Kyrill Tkachov wrote: > Hi all, > > Following up on Josephs' comments on PR 61876 this patch guards the rint + > cast -> lrint transformation on -fno-math-errno. > > Bootstrapped and tested on aarch64-linux and x86. > > Ok for trunk? Ok. Thanks, Richard. > Thanks

Re: [AArch64] Some aarch64-builtins.c cleanup.

2014-08-05 Thread Richard Earnshaw
On 04/08/14 11:13, James Greenhalgh wrote: > > This patch removes the aarch64_simd_builtin_type enum. This is only really > used for indexing in to an array of strings and an array of machine_mode. > > We don't need that. Given all the macro pasting we presently do in this > file, just add anothe

[PATCH, ARM] Keep constants in register when expanding

2014-08-05 Thread Zhenqiang Chen
Hi, For some large constants, ARM will split them during expanding, which makes impossible to hoist them out the loop or shared by different references (refer the test case in the patch). The patch keeps some constants in registers. If the constant can not be optimized, the cprop and combine pass

Re: [GSoC][match-and-simplify] add pointerplus patterns

2014-08-05 Thread Richard Biener
On Mon, Aug 4, 2014 at 4:13 PM, Prathamesh Kulkarni wrote: > Added patterns in associate_pointerplus and associate_pointerplus_diff. > > * genmatch.c (capture_max): Change value to 6. > (match-plusminus.pd): Add new patterns. > > [gcc/testsuite/gcc.dg/tree-ssa] > * match-plusminus.c (plusm

Re: [PATCH][ARM] Adjust clz, rbit and rev patterns for -mrestrict-it

2014-08-05 Thread Richard Earnshaw
On 04/08/14 13:22, Kyrill Tkachov wrote: > Hi all, > > While working on another patch and looking at the rbit and clz patterns, > I noticed that in aarch32 the relevant patterns are not adjusted for > -mrestrict-it. > A program like: > int > foo (int a, int b) > { >if (a + 5 == b) > ret

[PATCH] FAIL: gcc.dg/torture/ftrapv-1.c -O0 (test for excess errors) on bare-metal targets

2014-08-05 Thread Kyrill Tkachov
Hi all, The recently added -ftrapv test FAILS on bare metal targets because it requires the usage of fork. It does have a dg-require-fork guard but apparently that function takes an unused argument and if you don't give it that, DejaGNU will happily ignore the directive and not bother checking

Re: [PATCH] FAIL: gcc.dg/torture/ftrapv-1.c -O0 (test for excess errors) on bare-metal targets

2014-08-05 Thread Richard Biener
On Tue, Aug 5, 2014 at 11:47 AM, Kyrill Tkachov wrote: > Hi all, > > The recently added -ftrapv test FAILS on bare metal targets because it > requires the usage of fork. > It does have a dg-require-fork guard but apparently that function takes an > unused argument and if you don't give it that, De

[PATCH][match-and-simplify] Initial drop of match-and-simplify.texi

2014-08-05 Thread Richard Biener
Converted from my plain-text notes I did for writing the Cauldron presntation slides. Built and installed. Richard. 2014-08-05 Richard Biener * doc/match-and-simplify.texi: New file. * doc/gccint.texi: Include match-and-simplify.texi. * Makefile.in (TEXI_GCCINT_FILES

Re: [PATCH AArch64] Prefer dup to zip for vec_perm_const; enable dup for bigendian; add testcase.

2014-08-05 Thread Richard Earnshaw
On 04/08/14 14:32, Alan Lawrence wrote: > At the moment, for two-element vectors, __builtin_shuffle (vector, (mask) {C, > C}) for identical constants C outputs a zip (with both argument vectors the > same) rather than a dup. Dup is more obvious and easier to read, so prefer it. > > For big-endia

Re: [PATCH][ARM/AArch64] Add CRC32 scheduling information to Cortex-A53 and Cortex-A57

2014-08-05 Thread Richard Earnshaw
On 04/08/14 15:01, Kyrill Tkachov wrote: > Hi all, > > Now that both backends have a way of generating CRC32 instructions this > patch adds the crc type to the scheduling information for the Cortex-A53 > and Cortex-A57 cores. > For both Cortex-A53 and Cortex-A57 they behave similarly to shifted

Re: [PATCH][AArch64] Implement some vmul*_lane*_f* intrinsics in arm_neon.h

2014-08-05 Thread Richard Earnshaw
On 04/08/14 17:31, Kyrill Tkachov wrote: > Hi all, > > As part of other intrinsics-related messing around due to the > float64x1_t changes I noticed these can be (re)implemented relatively > easily. > > Tested on aarch64-none-elf and aarch64_be-none-elf to make sure the > lane-wise intrinsics

[PATCH][match-and-simplify] s/match_and_simplify/simplify/

2014-08-05 Thread Richard Biener
This replaces match_and_simplify with just 'simplify' everywhere, in patterns and API. It's shorter and as descriptive. This also pushes two minor changes to not use APIs I consider internal from SCCVN or forwprop. Committed. Richard. 2014-08-05 Richard Biener * doc/match-and-simp

Re: [PATCH][AArch64] Implement some saturating math NEON intrinsics

2014-08-05 Thread Richard Earnshaw
On 04/08/14 17:45, Kyrill Tkachov wrote: > Hi all, > > This patch implements some saturating math *laneq_s* intrinsics. > The implementation is fairly straightforward, just use more general mode > iterators, add appropriate builtins etc. > > Some execution tests are added with some scan-assembly

Re: [PATCH][AArch64] Fix types for vqdmlals_lane_s32 and vqdmlsls_lane_s32 intrinsics

2014-08-05 Thread Richard Earnshaw
On 04/08/14 17:49, Kyrill Tkachov wrote: > Hi all, > > Now that uint64x1_t and uint64_t are not interchangeable these > intrinsics have an incorrect type. The reason is that these intrinsics > should have had the scalar type for some of their arguments and results > according to the NEON intrin

RE: [RFC: Patch, PR 60102] [4.9/4.10 Regression] powerpc fp-bit ices@dwf_regno

2014-08-05 Thread rohitarul...@freescale.com
Jakub, > On Mon, Aug 04, 2014 at 11:51:34AM -0500, Edmar wrote: > > Committed on trunk, revision 213596 > > Committed on 4.9 branch, revision 213597 > > Note the ChangeLog entry was grossly misformated. > I've fixed it up in gcc/ChangeLog on the trunk, but not on the branch > nor in libgcc. The

[PATCH][AArch64] Use REG_P and CONST_INT_P instead of GET_CODE + comparison

2014-08-05 Thread Kyrill Tkachov
Hi all, This is a cleanup to replace usages of GET_CODE (x) == CONST_INT with CONST_INT_P (x) and GET_CODE (x) == REG with REG_P (x). No functional changes. Tested on aarch64-none-elf and bootstrapped on aarch64-linux. Ok for trunk? Thanks, Kyrill 2014-08-05 Kyrylo Tkachov * config

Re: [PATCH] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-05 Thread Trevor Saunders
On Tue, Aug 05, 2014 at 10:45:38AM +0200, Richard Biener wrote: > On Mon, Aug 4, 2014 at 3:04 PM, wrote: > > From: Trevor Saunders > > > > Hi, > > > > It used to be that edge_var_maps held pointers to embedded vectors, but > > now it holds vectors. This means that now instead of copying the > >

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-05 Thread Alexander Ivchenko
Hi Andrew, Joseph, thanks for looking at the patch. See my comments and updated patch below. 2014-08-05 0:54 GMT+04:00 Andrew Pinski : > On Mon, Aug 4, 2014 at 8:29 AM, Alexander Ivchenko wrote: >> Hi, >> >> The following patch disables "stdio_va_list" fix: stdio.h is already >> good in Android a

Re: Go 1.3 update broke Solaris bootstrap

2014-08-05 Thread Rainer Orth
Hi Ian, > On Tue, Jul 22, 2014 at 1:14 AM, Rainer Orth > wrote: >> The recent Go 1.3 update (which I couldn't find posted to gcc-patches) >> broke Solaris bootstrap: >> >> /vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:50:20: error: pointer >> targets in passing argument 1 of 'mincore' differ i

Re: [C++ Patch/RFC] PR 43906

2014-08-05 Thread Paolo Carlini
Hi, On 08/05/2014 03:58 AM, Jason Merrill wrote: On 08/04/2014 07:01 PM, Paolo Carlini wrote: In fact I wondered about that a few minutes after sending my message... And this is what I figured out: normally we have hard errors from composite_pointer_type (eg, try scalar types, class types), eve

Re: [PATCH][testsuite] Don't run cproj-fails-with-broken-glibc.c for broken glibc

2014-08-05 Thread Rainer Orth
Hi Mike, >> Or do we go with the removal suggestion of Mike? > > I’ll let others weigh in. I’m fine either way. Original author likely > prefers the xfail, so I’m fine with the above. the test now XPASSes on Solaris, adding testsuite noise in the other direction on completely innocent systems.

Re: [PATCH] Add D demangling support to libiberty

2014-08-05 Thread Iain Buclaw
Attached revision #2 of the patch. --- Add D demangling support for version 2 of the ABI. include/ChangeLog 2014-08-05 Iain Buclaw * demangle.h (DMGL_DLANG): New macro. (DMGL_STYLE_MASK): Add DMGL_DLANG. (demangling_styles): Add dlang_demangling. (DLANG_DEMANGLING_STYLE_STRING

Re: [C++ Patch/RFC] PR 43906

2014-08-05 Thread Paolo Carlini
.. a clarification. As I tried to briefly explain yesterday, this kind of change means that: extern void z(); void il() { if (z != (void*)0) z(); } doesn't trigger anymore the pedwarn at beginning of composite_pointer_type about the comparison itself, for the simple reason that we don't call

Re: [C++ Patch/RFC] PR 43906

2014-08-05 Thread Jason Merrill
On 08/05/2014 08:10 AM, Paolo Carlini wrote: .. a clarification. As I tried to briefly explain yesterday, this kind of change means that: extern void z(); void il() { if (z != (void*)0) z(); } doesn't trigger anymore the pedwarn at beginning of composite_pointer_type about the comparison itself

[PATCH v2] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-05 Thread tsaunders
From: Trevor Saunders hi, The change to get the entry for the old edge before inserting the new one was incorrect because if inserting the new one resized the table then the pointer to the entry for the old one would become invalid. gcc/ * tree-ssa.c (redirect_edge_var_map_dup): insert

Re: [PATCH] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-05 Thread Richard Biener
On Tue, Aug 5, 2014 at 1:17 PM, Trevor Saunders wrote: > On Tue, Aug 05, 2014 at 10:45:38AM +0200, Richard Biener wrote: >> On Mon, Aug 4, 2014 at 3:04 PM, wrote: >> > From: Trevor Saunders >> > >> > Hi, >> > >> > It used to be that edge_var_maps held pointers to embedded vectors, but >> > now

Re: [PATCH v2] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-05 Thread Richard Biener
On Tue, Aug 5, 2014 at 2:32 PM, wrote: > From: Trevor Saunders > > hi, > > The change to get the entry for the old edge before inserting the new > one was incorrect because if inserting the new one resized the table > then the pointer to the entry for the old one would become invalid. > > gcc/ >

Fix vec_extract_lo constraint.

2014-08-05 Thread Ilya Tocar
Hi, I've noticed that vec_extract_lo_ pattern has vm/vm alternative when mask is not applied. This can lead to insn with 2 memory operands. Patch bellow fixes it. Ok for trunk? 2014-08-05 Ilya Tocar * common/config/i386/sse.md (vec_extract_lo_): Fix constraint. --- gcc/config

Re: [PATCH, Pointer Bounds Checker 27/x] Strlen

2014-08-05 Thread Ilya Enkovich
eOn 31 Jul 14:07, Ilya Enkovich wrote: > 2014-06-11 12:22 GMT+04:00 Jakub Jelinek : > > On Wed, Jun 11, 2014 at 12:14:14PM +0400, Ilya Enkovich wrote: > >> This patch adds instrumented code support for strlen optimization. > >> > >> Bootstrapped and tested on linux-x86_64. > >> > >> Does it look OK

Re: Fix vec_extract_lo constraint.

2014-08-05 Thread Uros Bizjak
On Tue, Aug 5, 2014 at 2:43 PM, Ilya Tocar wrote: > Hi, > I've noticed that vec_extract_lo_ pattern has > vm/vm alternative when mask is not applied. This can lead to insn > with 2 memory operands. Patch bellow fixes it. > Ok for trunk? > > 2014-08-05 Ilya Tocar > > * common/config/i386

Re: [PATCH, ivopt] Try aligned offset when get_address_cost

2014-08-05 Thread Richard Biener
On Mon, Aug 4, 2014 at 11:09 AM, Zhenqiang Chen wrote: > > >> -Original Message- >> From: Bin.Cheng [mailto:amker.ch...@gmail.com] >> Sent: Monday, August 04, 2014 4:41 PM >> To: Zhenqiang Chen >> Cc: gcc-patches List >> Subject: Re: [PATCH, ivopt] Try aligned offset when get_address_cost

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-05 Thread Bruce Korb
Hi, On Tue, Aug 5, 2014 at 4:35 AM, Alexander Ivchenko wrote: >> Testing for *android* is less than ideal, because of the possibility of >> configuring a *-linux* toolchain to have multilibs using various different >> C libraries (with -mandroid being used to select the Android multilib). >> So,

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-08-05 Thread Richard Biener
On Fri, Aug 1, 2014 at 6:03 PM, Kugan wrote: if (rhs_uns) return wi::ge_p (min, 0); // if min >= 0 then range contains positive values else return wi::le_p (max, wi::max_value (TYPE_PRECISION (TREE_TYPE (ssa)), SIGNED); // if max <= signed-max-of-type then

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-08-05 Thread Jakub Jelinek
On Tue, Aug 05, 2014 at 04:17:41PM +0200, Richard Biener wrote: > what's the semantic of setting SRP_SIGNED_AND_UNSIGNED > on the subreg? That is, for the created (subreg:lhs_mode > (reg: N))? SRP_SIGNED_AND_UNSIGNED on a subreg should mean that the subreg is both zero and sign extended, which me

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-05 Thread Marek Polacek
On Mon, Aug 04, 2014 at 02:04:36PM +0200, Richard Biener wrote: > > Looks like .fre can optimize "q - (q - 1)" into 1: > >: > >q.0_3 = (long int) &MEM[(void *)&i + 4B]; > >_5 = (long int) &i; > > - _6 = q.0_3 - _5; > > - t.1_7 = _6 /[ex] 4; > > - t ={v} t.1_7; > > + t ={v} 1; > >

Re: Fix vec_extract_lo constraint.

2014-08-05 Thread Ilya Tocar
> I'd suggest op0: "=,v" and op1: "v,m". This > would result in op0:"=vm,v" op1:"v,m" and op0:"=v,v" op1:"v,m". > > Uros. Done. 2014-08-05 Ilya Tocar * common/config/i386/sse.md (vec_extract_lo_): Fix constraint. --- gcc/config/i386/sse.md | 4 ++-- 1 file changed, 2 insert

Re: Fix vec_extract_lo constraint.

2014-08-05 Thread Uros Bizjak
On Tue, Aug 5, 2014 at 4:36 PM, Ilya Tocar wrote: >> I'd suggest op0: "=,v" and op1: "v,m". This >> would result in op0:"=vm,v" op1:"v,m" and op0:"=v,v" op1:"v,m". >> >> Uros. > > Done. > > 2014-08-05 Ilya Tocar > > * common/config/i386/sse.md (vec_extract_lo_): Fix > constraint

Re: [RFC: Patch, PR 60102] [4.9/4.10 Regression] powerpc fp-bit ices@dwf_regno

2014-08-05 Thread Edmar
Jackub, Thanks for point this up. I apologize for the sloppiness. I fixed and committed the ChangeLogs on the branch, revision 213639 Also fixed the libgcc ChangeLog on trunk. Revision 213640 Edmar On 08/05/2014 03:11 AM, Jakub Jelinek wrote: On Mon, Aug 04, 2014 at 11:51:34AM -0500, Edmar w

Re: [C++ Patch/RFC] PR 43906

2014-08-05 Thread Paolo Carlini
Hi, On 08/05/2014 02:32 PM, Jason Merrill wrote: On 08/05/2014 08:10 AM, Paolo Carlini wrote: .. a clarification. As I tried to briefly explain yesterday, this kind of change means that: extern void z(); void il() { if (z != (void*)0) z(); } doesn't trigger anymore the pedwarn at beginning of

[PATCH] Add recursion check to gcc-ar/ranlib/nm

2014-08-05 Thread Andi Kleen
From: Andi Kleen This patch adds a recursion check to gcc-ar/ranlib/nm. The program avoids to call itself, so it can be directly put into the $PATH as a wrapper for the normal ar etc. The recursion check will only work on Linux (or systems with Linux like /proc) for now. It should fall back grac

Re: [PATCH] [gomp4] Initial support of OpenACC loop directive in C front-end.

2014-08-05 Thread Cesar Philippidis
On 07/29/2014 02:07 AM, Thomas Schwinge wrote: > On Thu, 20 Mar 2014 15:42:48 +0100, I wrote: >> On Tue, 18 Mar 2014 14:50:44 +0100, I wrote: >>> On Tue, 18 Mar 2014 16:37:24 +0400, Ilmir Usmanov >>> wrote: This patch introduces support of OpenACC loop directive (and combined directiv

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-05 Thread enh
On Tue, Aug 5, 2014 at 7:10 AM, Bruce Korb wrote: > Hi, > > On Tue, Aug 5, 2014 at 4:35 AM, Alexander Ivchenko wrote: >>> Testing for *android* is less than ideal, because of the possibility of >>> configuring a *-linux* toolchain to have multilibs using various different >>> C libraries (with -m

Re: [RFA] Introdue warning_n; fix singulars in the final keyword wanrings

2014-08-05 Thread Joseph S. Myers
On Sun, 3 Aug 2014, Jan Hubicka wrote: > * diagnostic.c (warning_n): New function. > * diagnostic-core.h (warning_n): Declare. > * ipa-devirt.c (ipa_devirt): Handle singulars correctly; > output dynamic counts when available. OK, though note the pre-existing issue that the

Re: Patch for constexpr variable templates

2014-08-05 Thread Jason Merrill
Applied with a few formatting/comment tweaks, thanks! Jason

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-05 Thread Bruce Korb
Hi, On Tue, Aug 5, 2014 at 10:36 AM, enh wrote: > you can see the current version of bionic's stdio.h here: > > https://android.googlesource.com/platform/bionic/+/master/libc/include/stdio.h > > i'm happy to add any string to the header file that makes things > easier. if you want 'x-gcc-no-fixin

Re: [PATCH 5/5] add libcc1

2014-08-05 Thread Tom Tromey
> "Jeff" == Jeff Law writes: Jeff> Obviously if there are no objections and you check in the change, Jeff> please be on the lookout for any fallout. I'm particularly concerned Jeff> about AIX, Solaris and other non-linux platforms. I did a build on the AIX box (gcc111) in the compile farm a

Re: [PATCH v2] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-05 Thread Trevor Saunders
On Tue, Aug 05, 2014 at 02:42:17PM +0200, Richard Biener wrote: > On Tue, Aug 5, 2014 at 2:32 PM, wrote: > > From: Trevor Saunders > > > > hi, > > > > The change to get the entry for the old edge before inserting the new > > one was incorrect because if inserting the new one resized the table >

Re: Patch for constexpr variable templates

2014-08-05 Thread Paolo Carlini
Hi, On 08/05/2014 08:26 PM, Jason Merrill wrote: Applied with a few formatting/comment tweaks, thanks! Great. I will double check but var-templ4.C fails for me with an ICE. Can anybody reproduce? Thanks! Paolo. /.../gcc/testsuite/g++.dg/cpp1y/var-templ4.C:8:17: internal com

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-05 Thread Jeff Law
On 08/05/14 08:36, Marek Polacek wrote: On Mon, Aug 04, 2014 at 02:04:36PM +0200, Richard Biener wrote: Looks like .fre can optimize "q - (q - 1)" into 1: : q.0_3 = (long int) &MEM[(void *)&i + 4B]; _5 = (long int) &i; - _6 = q.0_3 - _5; - t.1_7 = _6 /[ex] 4; - t ={v} t.1_7; + t

Re: Replacement of isl_int by isl_val

2014-08-05 Thread Jeff Law
On 08/03/14 17:44, Mircea Namolaru wrote: 2014-08-03 Mircea Namolaru Replacement of isl-int by isl_val * graphite-clast-to-gimple.c: include isl/val.h, isl/val_gmp.h (compute_bounds_for_param): use isl_val instead of isl_int (compute_bounds_for_loop): likewise

Re: Fix build of *86*-linux-android with "--enable-shared"

2014-08-05 Thread Jeff Law
On 08/04/14 00:08, Alexander Ivchenko wrote: Hi, libcilkrts is compiled with "-nostdlib", that means we have to explicitly specify the pthread library we should link with (e.g. we don't have such problem with libgomp, because it is C). And, indeed, "-lpthread" is hard-coded in the Makefile for c

Re: [PATCH] Add statistical printout of rank_for_schedule decisions

2014-08-05 Thread Jeff Law
On 08/03/14 22:51, Maxim Kuvyrkov wrote: On Jul 17, 2014, at 5:34 AM, Jeff Law wrote: On 07/13/14 22:17, Maxim Kuvyrkov wrote: Hi, This patch adds dump printouts for scheduling heuristics in rank_for_schedule. Rank_for_schedule is one of the cornerstones of haifa scheduler, yet its decision

Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr

2014-08-05 Thread Siva Chandra
Hi Jonathan, Thanks a lot for taking a look. The patch in question, and the GDB support, do not yet work with Python3. If that is a necessary requirement, I can make the changes and send a new version of the patch. Thanks, Siva Chandra On Mon, Aug 4, 2014 at 2:36 AM, Jonathan Wakely wrote: > On

Re: [PATCH 01/50] Add rtl-iter.h

2014-08-05 Thread Jeff Law
On 08/03/14 07:39, Richard Sandiford wrote: This patch adds the new iterators. gcc/ * rtl-iter.h: New file. * rtlanal.c: Include it. (rtx_all_subrtx_bounds, rtx_nonconst_subrtx_bounds): New variables. (generic_subrtx_iterator ::add_single_to_queue) (gener

Re: [PATCH 02/50] alias.c:refs_newer_value_p

2014-08-05 Thread Jeff Law
On 08/03/14 07:40, Richard Sandiford wrote: gcc/ * alias.c: Include rtl-iter.h. (refs_newer_value_cb): Delete. (refs_newer_value_p): Use FOR_EACH_SUBRTX instead of for_each_rtx. OK. Just a few notes. 1. I really like when we can make these callbacks go away :-) 2. When

Re: [PATCH 04/50] caller-save.c:add_used_regs

2014-08-05 Thread Jeff Law
On 08/03/14 07:48, Richard Sandiford wrote: As noted in https://gcc.gnu.org/ml/gcc-patches/2014-02/msg01391.html a bitmap-related cleanup turned add_used_regs_1 into a no-op for pseudo registers, because the result of: regno = reg_renumber[regno]; is never used. This patch does as Steven re

Re: [PATCH 05/50] calls.c:internal_arg_pointer_based_exp

2014-08-05 Thread Jeff Law
On 08/03/14 07:48, Richard Sandiford wrote: gcc/ * calls.c: Include rtl-iter.h. (internal_arg_pointer_based_exp_1): Delete. (internal_arg_pointer_based_exp): Take a const_rtx. Use FOR_EACH_SUBRTX to iterate over subrtxes. OK. jeff

Re: [PATCH 06/50] combine.c:unmentioned_reg_p

2014-08-05 Thread Jeff Law
On 08/03/14 07:50, Richard Sandiford wrote: gcc/ * combine.c: Include rtl-iter.h. (unmentioned_reg_p_1): Delete. (unmentioned_reg_p): Use FOR_EACH_SUBRTX rather than for_each_rtx. Don't handle null rtxes. OK. Jeff

Re: [PATCH 07/50] combine.c:record_truncated_values

2014-08-05 Thread Jeff Law
On 08/03/14 07:50, Richard Sandiford wrote: gcc/ * combine.c (record_truncated_value): Turn from being a for_each_rtx callback to a function that takes an rtx and returns a bool (record_truncated_values): Use FOR_EACH_SUBRTX_VAR instead of for_each_rtx. OK. jeff

Re: [PATCH 09/50] cfgcleanup.c:mentions_nonequal_regs

2014-08-05 Thread Jeff Law
On 08/03/14 07:53, Richard Sandiford wrote: gcc/ * cfgcleanup.c: Include rtl-iter.h. (mentions_nonequal_regs): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (thread_jump): Update accordingly. OK. jeff

Re: [PATCH 10/50] cse.c:approx_reg_cost

2014-08-05 Thread Jeff Law
On 08/03/14 07:54, Richard Sandiford wrote: gcc/ * cse.c: Include rtl-iter.h. (approx_reg_cost_1): Delete. (approx_reg_cost): Use FOR_EACH_SUBRTX instead of for_each_rtx. Don't handle null rtxes. OK. jeff

Re: [PATCH 13/50] cse.c:is_dead_debug_insn

2014-08-05 Thread Jeff Law
On 08/03/14 07:57, Richard Sandiford wrote: gcc/ * cse.c (is_dead_reg): Change argument to const_rtx. (dead_debug_insn_data): Delete. (is_dead_debug_insn): Expand commentary. Turn from being a for_each_rtx callback to being a function that examines each su

Re: [PATCH 14/50] cse.c:cse_change_cc_mode

2014-08-05 Thread Jeff Law
On 08/03/14 07:58, Richard Sandiford wrote: gcc/ * cse.c (change_cc_mode_args): Delete. (cse_change_cc_mode): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. Take the fields of change_cc_mode_args as argument and retu

Re: [PATCH 15/50] ddg.c:mark_mem_use

2014-08-05 Thread Jeff Law
On 08/03/14 07:58, Richard Sandiford wrote: gcc/ * ddg.c: Include rtl-iter.h. (mark_mem_use_1): Rename to... (mark_mem_use): ...deleting old mark_mem_use. Use FOR_EACH_SUBRTX instead of for_each_rtx. (mem_read_insn_p): Update accordingly. OK. jeff

Re: [PATCH 16/50] ddg.c:insns_may_alias_p

2014-08-05 Thread Jeff Law
On 08/03/14 07:59, Richard Sandiford wrote: gcc/ * ddg.c (walk_mems_2, walk_mems_1): Delete. (insns_may_alias_p): Use FOR_EACH_SUBRTX rather than for_each_rtx to iterate over subrtxes. Return a bool rather than an int. OK. Jeff

Re: [PATCH] Making it easier to set breakpoints in gdb on pass->execute methods

2014-08-05 Thread David Malcolm
On Wed, 2014-07-30 at 10:07 +0200, Richard Biener wrote: > On Tue, Jul 29, 2014 at 10:44 PM, David Malcolm wrote: > > A complaint I heard at Cauldron with the C++ification of GCC passes is > > that it's become much more difficult to set breakpoints on the execute > > hooks of a pass, now that the

Re: [PATCH 18/50] dse.c:check_mem_read_use

2014-08-05 Thread Jeff Law
On 08/03/14 08:02, Richard Sandiford wrote: gcc/ * dse.c: Include rtl-iter.h. (check_mem_read_rtx): Change void * parameter to real type. Remove return value. (check_mem_read_use): Fix comment. Use FOR_EACH_SUBRTX_PTR instead of for_each_rtx. Don't handle

Re: [PATCH 21/50] Faster for_each_rtx-like iterators

2014-08-05 Thread Jeff Law
On 08/03/14 08:07, Richard Sandiford wrote: The switch statement in the old code seemed overly cautious. It's well established elsewhere that the first operand of an RTX_AUTOINC is the automodified register. If anyone wanted to add a new code for which that wasn't true they should (a) reconside

Re: [PATCH] Making it easier to set breakpoints in gdb on pass->execute methods

2014-08-05 Thread Trevor Saunders
On Tue, Aug 05, 2014 at 05:02:57PM -0400, David Malcolm wrote: > On Wed, 2014-07-30 at 10:07 +0200, Richard Biener wrote: > > On Tue, Jul 29, 2014 at 10:44 PM, David Malcolm wrote: > > > A complaint I heard at Cauldron with the C++ification of GCC passes is > > > that it's become much more difficu

Re: [PATCH 24/50] fwprop.c:varying_mem_p

2014-08-05 Thread Jeff Law
On 08/03/14 08:10, Richard Sandiford wrote: gcc/ * fwprop.c: Include rtl-iter.h. (varying_mem_p): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (propagate_rtx): Update accordingly. OK. jeff

Re: [PATCH 22/50] final.c:mark_symbol_refs_as_used

2014-08-05 Thread Jeff Law
On 08/03/14 08:08, Richard Sandiford wrote: gcc/ * final.c: Include rtl-iter.h. (mark_symbol_ref_as_used): Delete. (mark_symbol_refs_as_used): Use FOR_EACH_SUBRTX instead of for_each_rtx. OK. jeff

Re: [PATCH 25/50] ira.c:set_paradoxical_subreg

2014-08-05 Thread Jeff Law
On 08/03/14 08:10, Richard Sandiford wrote: gcc/ * ira.c: Include rtl-iter.h. (set_paradoxical_subreg): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. Remove handling of null rtxes. (update_equiv_regs): Update

Re: [PATCH 26/50] jump.c:returnjump_p

2014-08-05 Thread Jeff Law
On 08/03/14 08:11, Richard Sandiford wrote: gcc/ * jump.c: Include rtl-iter.h. (returnjump_p_1): Delete. (returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx. Remove handling of null rtxes. OK. Jeff

Re: [PATCH 27/50] jump.c:eh_returnjump_p

2014-08-05 Thread Jeff Law
On 08/03/14 08:12, Richard Sandiford wrote: gcc/ * jump.c (eh_returnjump_p_1): Delete. (eh_returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx. Remove handling of null rtxes. OK. jeff

Re: [PATCH 31/50] lower-subreg.c:resolve_debug

2014-08-05 Thread Jeff Law
On 08/03/14 08:15, Richard Sandiford wrote: gcc/ * lower-subreg.c (adjust_decomposed_uses): Delete. (resolve_debug): Use FOR_EACH_SUBRTX_PTR rather than for_each_rtx. Remove handling of null rtxes. OK. jeff

Re: [PATCH 29/50] loop-iv.c:altered_reg_used

2014-08-05 Thread Jeff Law
On 08/03/14 08:14, Richard Sandiford wrote: gcc/ * loop-iv.c (altered_reg_used): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (simplify_using_condition, simplify_using_initial_values): Update accordingly. Ok. jeff

Re: [PATCH 33/50] reg-stack.c:subst_all_stack_regs_in_debug_insn

2014-08-05 Thread Jeff Law
On 08/03/14 08:18, Richard Sandiford wrote: gcc/ * reg-stack.c: Include rtl-iter.h. (subst_stack_regs_in_debug_insn): Delete. (subst_all_stack_regs_in_debug_insn): Use FOR_EACH_SUBRTX_PTR instead of for_each_rtx. OK. Jeff

Re: [PATCH 35/50] regcprop.c:cprop_find_used_regs

2014-08-05 Thread Jeff Law
On 08/03/14 08:19, Richard Sandiford wrote: gcc/ * regcprop.c (cprop_find_used_regs_1): Delete. (cprop_find_used_regs): Use FOR_EACH_SUBRTX instead of for_each_rtx. OK. jeff

Re: [PATCH 34/50] regcprop.c:kill_autoinc_value

2014-08-05 Thread Jeff Law
On 08/03/14 08:19, Richard Sandiford wrote: gcc/ * regcprop.c: Include rtl-iter.h. (kill_value): Take a const_rtx. (kill_autoinc_value): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (copyprop_hardreg_forward_

Re: [PATCH 39/50] rtlanal.c:record_hard_reg_uses

2014-08-05 Thread Jeff Law
On 08/03/14 08:27, Richard Sandiford wrote: find_all_hard_regs seems like a useful function so I split it out of the note_uses callback and exposed it in rtl.h. I have (or had) other patches that make use of it. gcc/ * rtl.h (find_all_hard_regs): Declare. * rtlanal.c (find_all_

Re: [PATCH 41/50] rtlanal.c:tls_referenced_p

2014-08-05 Thread Jeff Law
On 08/03/14 08:33, Richard Sandiford wrote: gcc/ * rtl.h (tls_referenced_p): Take a const_rtx rather than an rtx. * rtlanal.c (tls_referenced_p_1): Delete. (tls_referenced_p): Take a const_rtx rather than an rtx. Use FOR_EACH_SUBRTX rather than for_each_rtx. OK. J

Re: [PATCH 43/50] store-motion.c:extract_mentioned_regs

2014-08-05 Thread Jeff Law
On 08/03/14 08:34, Richard Sandiford wrote: gcc/ * store-motion.c: Include rtl-iter.h. (extract_mentioned_regs_1): Delete. (extract_mentioned_regs): Use FOR_EACH_SUBRTX_VAR rather than for_each_rtx to iterate over subrtxes. OK. jeff

Re: [PATCH 44/50] var-tracking.c:rtx_debug_expr_p

2014-08-05 Thread Jeff Law
On 08/03/14 08:35, Richard Sandiford wrote: gcc/ * var-tracking.c: Include rtl-iter.h. (rtx_debug_expr_p): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (use_type): Update accordingly. OK. jeff

Re: [PATCH 45/50] var-tracking.c:non_suitable_const

2014-08-05 Thread Jeff Law
On 08/03/14 08:36, Richard Sandiford wrote: gcc/ * var-tracking.c (non_suitable_const): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. Remove handling of null rtxes. (add_uses): Update accordingly. OK. Jeff

Re: [PATCH 47/50] var-tracking.c:add_uses

2014-08-05 Thread Jeff Law
On 08/03/14 08:38, Richard Sandiford wrote: gcc/ * var-tracking.c (add_uses): Take an rtx rather than an rtx *. Give real type of data parameter. Remove return value. (add_uses_1): Use FOR_EACH_SUBRTX_VAR rather than for_each_rtx to iterate over subrtxes. OK. jef

Re: [PATCH 17/50] df-problems.c:find_memory

2014-08-05 Thread Jeff Law
On 08/03/14 08:02, Richard Sandiford wrote: This also fixes what I think is a bug: find_memory used to stop at the first MEM it found. If that MEM was nonvolatile and nonconstant, we'd return MEMREF_NORMAL even if there was another volatile MEM. gcc/ * df-problems.c: Include rtl-iter.h

Re: [PATCH 20/50] dwarf2out.c:resolve_one_addr

2014-08-05 Thread Jeff Law
On 08/03/14 08:04, Richard Sandiford wrote: gcc/ * dwarf2out.c (resolve_one_addr): Remove unused data parameter. Return a bool, inverting the result so that 0/false means "not ok". Use FOR_EACH_SUBRTX_PTR instead of for_each_rtx to iterate over subrtxes of a CONST.

Re: [PATCH 19/50] dwarf2out.c:const_ok_for_output

2014-08-05 Thread Jeff Law
On 08/03/14 08:03, Richard Sandiford wrote: gcc/ * dwarf2out.c: Include rtl-iter.h. (const_ok_for_output_1): Take the rtx instead of a pointer to it. Remove unused data parameter. Return a bool, inverting the result so that 0/false means "not ok". (const_o

Re: [PATCH 28/50] loop-iv.c:replace_single_def_regs

2014-08-05 Thread Jeff Law
On 08/03/14 08:13, Richard Sandiford wrote: gcc/ * loop-iv.c: Include rtl-iter.h. (find_single_def_src): New function. (replace_single_def_regs): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (replace_in_expr,

Re: [PATCH 36/50] reload1.c:note_reg_elim_costly

2014-08-05 Thread Jeff Law
On 08/03/14 08:20, Richard Sandiford wrote: gcc/ * reload1.c: Include rtl-iter.h. (note_reg_elim_costly): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. (eliminate_regs_1, elimination_costs_in_insn): Update accordingly

Re: [PATCH 37/50] rtlanal.c:rtx_referenced_p

2014-08-05 Thread Jeff Law
On 08/03/14 08:22, Richard Sandiford wrote: The old function handled constant pool SYMBOL_REFs by going straight to the underlying constant, which meant you couldn't test for the SYMBOL_REF itself. gcc/ * rtl.h (get_pool_constant, rtx_referenced_p): Replace rtx parameters with c

Re: [PATCH 38/50] rtlanal.c:replace_label

2014-08-05 Thread Jeff Law
On 08/03/14 08:25, Richard Sandiford wrote: The main change here is to handle ADDR_VEC and ADDR_DIFF_VECs specially, since they can have many elements and are a relatively important case for this function. This is for speed rather than correctness. gcc/ * rtl.h (replace_label_data): De

Re: [PATCH 42/50] sel-sched.c:count_occurrences_equiv

2014-08-05 Thread Jeff Law
On 08/03/14 08:33, Richard Sandiford wrote: gcc/ * sel-sched.c: Include rtl-iter.h (count_occurrences_1): Delete. (count_occurrences_equiv): Turn rtxes into const_rtxes. Use FOR_EACH_SUBRTX rather than for_each_rtx. OK. Jeff

Re: [PATCH 50/50] varasm.c:compute_reloc_for_rtx

2014-08-05 Thread Jeff Law
On 08/03/14 08:45, Richard Sandiford wrote: There's no point calling for_each_rtx/FOR_EACH_SUBRTX on a LABEL_REF or SYMBOL_REF. We can just handle them directly instead. gcc/ * varasm.c (compute_reloc_for_rtx_1): Take a const_rtx. Remove the pointer to the cumulative reloc val

  1   2   >