[libstdc++/67015, patch] Fix regex POSIX bracket parsing

2015-07-26 Thread Tim Shen
Kinda important, since [a-z0-9-] may be a common case. Bootstrapped and tested. Guess it can also be backported to 5, or even 4.9? Thanks! -- Regards, Tim Shen

Re: [libstdc++/67015, patch] Fix regex POSIX bracket parsing

2015-07-26 Thread Tim Shen
On Sun, Jul 26, 2015 at 5:19 AM, Tim Shen tims...@google.com wrote: Kinda important, since [a-z0-9-] may be a common case. Bootstrapped and tested. Actual patch... -- Regards, Tim Shen commit e0e6c2e3b722e1453d29ad3a56d0de80046453b0 Author: Tim Shen tims...@google.com Date: Sun Jul 26

OMP. More constification

2015-07-26 Thread Nathan Sidwell
Jakub, Ilya, I found some more missing consts. The size, kind, var and function arrays emitted by omp-low are read only, but are not so marked. This patch a) adds const qualifier and marks them read only. They now end up in .rodata and .data.ro.rel appropriately. b) adds const qualifier

[C++ Patch, preapproved] Prefer DECL_SOURCE_LOCATION to +D and +#D (1/n)

2015-07-26 Thread Paolo Carlini
Hi, a first rather straightforward set of changes. Tested x86_64-linux. Thanks, Paolo. / 2015-07-26 Paolo Carlini paolo.carl...@oracle.com * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and %qD in warning_at instead of %q+D in warning.

[PATCH, alpha]: Use SUBREG_P predicate

2015-07-26 Thread Uros Bizjak
2015-07-26 Uros Bizjak ubiz...@gmail.com * config/alpha/alpha.c: Use SUBREG_P predicate. * config/alpha/predicates.md: Ditto. Bootstrapped and regression tested on alpha-linux-gnu. Committed to mainline SVN. Uros. Index: config/alpha/alpha.c

[PATCH, testsuite, alpha]: Use unsigned immediates to avoid shift-overflow warning

2015-07-26 Thread Uros Bizjak
2015-07-26 Uros Bizjak ubiz...@gmail.com * gcc.target/alpha/pr66140.c (lpfc_bg_setup_bpl): Use unsigned immediates to avoid shift-overflow warnings. Tested on alpha-linux-gnu and committed to mainline SVN. Uros. Index: ChangeLog

Re: [PATCH 1/2] Allow REG_EQUAL for ZERO_EXTRACT

2015-07-26 Thread Andreas Schwab
Kugan kugan.vivekanandara...@linaro.org writes: * cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor clean up. This breaks gcc.target/m68k/tls-ie-xgot.c scan-assembler jsr __m68k_read_tp gcc.target/m68k/tls-ie.c scan-assembler jsr __m68k_read_tp

[PATCH] Use lowpart_subreg instead of simplify_gen_subreg

2015-07-26 Thread Anatoliy Sokolov
Hello. This patch change function call simplify_gen_subreg (omode, x, imode, subreg_lowpart_offset (omode, imode)) with lowpart_subreg (omode, x, imode) and move lowpart_subreg function from loop-iv.c to simplify-rtx.c. Bootstrapped and reg-tested on x86_64-unknown-linux-gnu. OK for trunk?

Re: [RFC, PR66873] Use graphite for parloops

2015-07-26 Thread Tom de Vries
On 16/07/15 12:28, Richard Biener wrote: On Thu, Jul 16, 2015 at 12:23 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Jul 16, 2015 at 12:19 PM, Thomas Schwinge tho...@codesourcery.com wrote: Hi Tom! On Thu, 16 Jul 2015 10:46:00 +0200, Richard Biener richard.guent...@gmail.com

[gomp4] fiuxup openacc default handling

2015-07-26 Thread Nathan Sidwell
I've committed this update to my earlier breakout of default handling. After complaining about something because of 'none', we should fall through to the default handling, to prevent ICEing later (on patch seriesI'm working on). This matches the OMP default handling. Also tweaked the setting

Re: [PATCH] Fix PR c++/18969 (invalid return statement diagnosed too late)

2015-07-26 Thread Patrick Palka
Committed with this additional change to fix a latent testcase bug: diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload.C b/gcc/testsuite/g++.old-deja/g++.jason/overload.C index 6a747ff..28b029f 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload.C +++

[V850] Hookize LIBCALL_VALUE

2015-07-26 Thread Anatoliy Sokolov
Hi. This patch removes obsolete LIBCALL_VALUE macros from the V850 back end in the GCC and introduces equivalent TARGET_LIBCALL_VALUE target hook. Regression tested on v850-unknown-eabi. OK for trunk? 2015-07-26 Anatoly Sokolov ae...@post.ru * config/v850/v850.h (LIBCALL_VALUE):

[MOXIE] Hookize PRINT_OPERAND and PRINT_OPERAND_ADDRESS

2015-07-26 Thread Anatoliy Sokolov
Hi. This patch removes obsolete PRINT_OPERAND and PRINT_OPERAND_ADDRESS macros from the MOXIE back end in the GCC and introduces equivalent TARGET_PRINT_OPERAND and TARGET_PRINT_OPERAND_ADDRESS target hooks. Regression tested on moxie-unknown-elf. OK for trunk? Anatoly. 2015-07-26 Anatoly

Re: [PATCH] Allow non-overflow ops in vect_is_simple_reduction_1

2015-07-26 Thread Tom de Vries
On 24/07/15 16:39, Tom de Vries wrote: Hi, this patch allows parallelization and vectorization of reduction operators that are guaranteed to not overflow (such as min and max operators), independent of the overflow behaviour of the type. Bootstrapped and reg-tested on x86_64. OK for trunk?

[PATCH] Enable fixed-point reductions in graphite

2015-07-26 Thread Tom de Vries
Hi, In patch Don't allow unsafe reductions in graphite ( submitted https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01861.html , committed r226193) we've disabled fixed-point reductions. In this patch we enable it again, for the case that it's safe, in other words, for the case that the fixed

Re: [PATCH] Fix PR c++/18969 (invalid return statement diagnosed too late)

2015-07-26 Thread Patrick Palka
On Sun, Jul 26, 2015 at 1:09 PM, Patrick Palka patr...@parcs.ath.cx wrote: Committed with this additional change to fix a latent testcase bug: diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload.C b/gcc/testsuite/g++.old-deja/g++.jason/overload.C index 6a747ff..28b029f 100644 ---

Re: [PATCH] Use single shared memory block pool for all pool allocators

2015-07-26 Thread Andi Kleen
Mikhail Maltsev malts...@gmail.com writes: Hi, all! Recently I did some profiling of GCC to find hotspots and areas of possible performance improvement among them. glibc malloc(3) is one of (perhaps known) I've been compiling gcc with tcmalloc to do a similar speedup. It would be interesting

Re: [wwwdocs] Mention -Wshift-overflow

2015-07-26 Thread Gerald Pfeifer
Hi Marek, On Tue, 21 Jul 2015, Marek Polacek wrote: +liA new command-line option code-Wshift-overflow/code has been + added for the C and C++ compilers, which warns about left shift + overflows. code-Wshift-overflow=2/code also warns about + left-shifting 1 into the sign

Re: [PATCH 1/2] Allow REG_EQUAL for ZERO_EXTRACT

2015-07-26 Thread Kugan
On 27/07/15 05:38, Andreas Schwab wrote: Kugan kugan.vivekanandara...@linaro.org writes: * cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor clean up. This breaks gcc.target/m68k/tls-ie-xgot.c scan-assembler jsr __m68k_read_tp gcc.target/m68k/tls-ie.c

[PATCH 3/9] target.h: change to use targetm.pointer_size instead of POINTER_SIZE

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * target.h (pointer_size_units): Call targetm.pointer_size (). --- gcc/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/target.h

[PATCH 1/9] remove POINTER_SIZE_UNITS macro

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/lto/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * lto-object.c (lto_obj_begin_section): Call pointer_size_units (). gcc/c-family/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org *

[PATCH 5/9] ubsan.c: switch from POINTER_SIZE to targetm.pointer_size ()

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * ubsan.c (ubsan_encode_value): Call targetm.pointer_size (). --- gcc/ubsan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ubsan.c

[PATCH 2/9] add pointer_size target hook

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * doc/tm.texi: Regenerate. * doc/tm.texi.in: Adjust. * target.def (pointer_size): New hook. * targhooks.c (default_pointer_size): New function.

Re: [RFC, PR66873] Use graphite for parloops

2015-07-26 Thread Sebastian Pop
On Sun, Jul 26, 2015 at 4:21 PM, Tom de Vries tom_devr...@mentor.com wrote: I wrote an equivalent test-case in C: ... $ cat src/gcc/testsuite/gcc.dg/autopar/outer-7.c /* { dg-do compile } */ /* { dg-options -O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details -fdump-tree-optimized }

Re: [ARM] Optimize compare against smin/umin

2015-07-26 Thread Michael Collison
Here is an updated patch that addresses the issues you mentioned: 2015-07-24 Michael Collison michael.colli...@linaro.org Ramana Radhakrishnan ramana.radhakrish...@arm.com * gcc/config/arm/arm.md (*arm_smin_cmp): New pattern. (*arm_umin_cmp):

Re: [PATCH] Optimize certain end of loop conditions into min/max operation

2015-07-26 Thread Bin.Cheng
On Mon, Jul 27, 2015 at 11:41 AM, Michael Collison michael.colli...@linaro.org wrote: This patch is designed to optimize end of loop conditions involving of the form i x i y into i min (x, y). Loop condition involving '' are handled similarly using max(x,y). As an example: #define N

[PATCH] Optimize certain end of loop conditions into min/max operation

2015-07-26 Thread Michael Collison
This patch is designed to optimize end of loop conditions involving of the form i x i y into i min (x, y). Loop condition involving '' are handled similarly using max(x,y). As an example: #define N 1024 int a[N], b[N], c[N]; void add (unsignedint m, unsignedint n) { unsignedint i,

Re: [PR66726] Factor conversion out of COND_EXPR

2015-07-26 Thread Kugan
On 24/07/15 05:05, Jeff Law wrote: On 07/15/2015 11:52 PM, Kugan wrote: diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 932c83a..3058eb5 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c return false; bb = gimple_bb (stmt); if

[PATCH 0/9] start converting POINTER_SIZE to a hook

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org Hi, $subject. patches individually bootstrapped + regtested on x86_64-linux-gnu, and run through config-list.mk with more patches removing usage of the macro. Ok? Trev Trevor Saunders (9): remove POINTER_SIZE_UNITS macro add pointer_size

[PATCH 6/9] tree-chkp.c: switch to targetm.pointer_size ()

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * tree-chkp.c (chkp_build_array_ref): Call targetm.pointer_size (). (chkp_find_bounds_for_elem): Likewise. (chkp_find_bound_slots_1): Likewise.

[PATCH 9/9] emit-rtl.c: switch to targetm.pointer_size ()

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * emit-rtl.c (init_derived_machine_modes): Call targetm.pointer_size (). --- gcc/emit-rtl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 8/9] tree.c: switch to targetm.pointer_size ()

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * tree.c (build_common_tree_nodes): Call targetm.pointer_size (). --- gcc/tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/tree.c

[PATCH 7/9] stor-layout.c: switch to targetm.pointer_size ()

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * stor-layout.c (layout_type): Call targetm.pointer_size (). --- gcc/stor-layout.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 4/9] varasm.c: switch from POINTER_SIZE to targetm.pointer_size ()

2015-07-26 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org gcc/ChangeLog: 2015-07-26 Trevor Saunders tbsaunde+...@tbsaunde.org * varasm.c (assemble_addr_to_section): Call targetm.pointer_size (). (dump_tm_clone_pairs): Likewise. --- gcc/varasm.c | 10 +- 1 file changed, 5

Re: [PATCH] Optimize certain end of loop conditions into min/max operation

2015-07-26 Thread Bin.Cheng
On Mon, Jul 27, 2015 at 12:23 PM, Bin.Cheng amker.ch...@gmail.com wrote: On Mon, Jul 27, 2015 at 11:41 AM, Michael Collison michael.colli...@linaro.org wrote: This patch is designed to optimize end of loop conditions involving of the form i x i y into i min (x, y). Loop condition

Re: [PATCH] Allow non-overflow ops in vect_is_simple_reduction_1

2015-07-26 Thread Tom de Vries
On 26/07/15 18:49, Tom de Vries wrote: On 24/07/15 16:39, Tom de Vries wrote: Hi, this patch allows parallelization and vectorization of reduction operators that are guaranteed to not overflow (such as min and max operators), independent of the overflow behaviour of the type. Bootstrapped and

[PATCH] Use single shared memory block pool for all pool allocators

2015-07-26 Thread Mikhail Maltsev
Hi, all! Recently I did some profiling of GCC to find hotspots and areas of possible performance improvement among them. glibc malloc(3) is one of (perhaps known) hotspots. It seemed rather strange to me that pool allocators call malloc(3) and free(3) rather often, and spend considerable time in

Re: [PATCH] Use single shared memory block pool for all pool allocators

2015-07-26 Thread pinskia
On Jul 26, 2015, at 11:50 AM, Andi Kleen a...@firstfloor.org wrote: Mikhail Maltsev malts...@gmail.com writes: Hi, all! Recently I did some profiling of GCC to find hotspots and areas of possible performance improvement among them. glibc malloc(3) is one of (perhaps known) I've