Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Marcel Böhme
Hi Ian, Stack overflows are a security concern and must be addressed. The Libiberty demangler is part of several tools, including binutils, gdb, valgrind, and many other libbfd-based tools that are used by the security community for the analysis of program binaries. Without a patch, the reverse

[SH][committed] Improve utilization of zero-displacement conditional branches

2016-05-06 Thread Oleg Endo
Hi, On SH a conditional branch with a (physical) zero displacement jumps over the next instruction. On some SH hardware implementations these branches are handled in a special way which allows using it for conditional execution. A while ago I've added some hardcoded asm patterns to utilize this.

Re: [PATCH] Make basic asm implicitly clobber memory

2016-05-06 Thread David Wohlferd
A few questions: 1) I'm not clear precisely what problem this patch fixes. It's true that some people have incorrectly assumed that basic asm clobbers memory and this change would fix their code. But some people also incorrectly assume it clobbers registers. I assume that's why Jeff Law prop

Re: tuple move constructor

2016-05-06 Thread Ville Voutilainen
On 7 May 2016 at 00:39, Marc Glisse wrote: > Assuming we want the copy constructor to be defaulted, I think we still > could with concepts: > > tuple(tuple const&) > requires(__and_...>::value) > = default; > > While there is precedent for enabling C++11 features in C++03 mode inside > system head

Re: tuple move constructor

2016-05-06 Thread Marc Glisse
On Fri, 6 May 2016, Ville Voutilainen wrote: On 6 May 2016 at 20:51, Marc Glisse wrote: Hi Ville, since you wrote the latest patches on tuple constructors, do you have an opinion on this patch, or alternate strategies to achieve the same goal? https://gcc.gnu.org/ml/libstdc++/2016-04/msg0004

Go patch committed: Add escape graph nodes

2016-05-06 Thread Ian Lance Taylor
This patch by Chris Manghane adds nodes to the escape analysis graph in the Go frontend. They still aren't used for anything. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ==

[RFA] Remove useless test in bitmap_find_bit.

2016-05-06 Thread Jeff Law
I was looking at a performance regression with some threading changes I'm working on and spotted this trivial cleanup. in bitmap_find_bit: /* `element' is the nearest to the one we want. If it's not the one we want, the one we want doesn't exist. */ head->current = element; head->indx

[PATCH, i386]: Cleanup LEA splitters

2016-05-06 Thread Uros Bizjak
2016-05-06 Uros Bizjak * config/i386/i386.md (LEAMODE): New mode attribute. (plus to LEA splitter): Rewrite splitter using LEAMODE mode attribute. (ashift to LEA splitter): Rewrte splitter using SWI mode iterator and LEAMODE mode attribute. Use VOIDmode const_0_to_3_operand as

Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread Jason Merrill
On Fri, May 6, 2016 at 1:56 PM, Pedro Alves wrote: > On 05/06/2016 05:40 PM, David Malcolm wrote: >> +#if __cplusplus >= 201103 >> +/* C++11 claims to be available: use it: */ >> +#define OVERRIDE override >> +#define FINAL final >> +#else >> +/* No C++11 support; leave the macros empty: */ >> +#d

Re: [PATCH 1/4] Make argv const char ** in read_md_files etc

2016-05-06 Thread Jakub Jelinek
On Wed, May 04, 2016 at 04:49:27PM -0400, David Malcolm wrote: > This patch makes the argv param to read_md_files const, needed > so that the RTL frontend can call it on a const char *. > > While we're at it, it similarly makes const the argv for all > of the "main" functions of the various gen*.

[gomp4.5] Parsing of most of OpenMP 4.5 clauses

2016-05-06 Thread Jakub Jelinek
Hi! This patch adds parsing of most of the OpenMP 4.5 clause changes, though doesn't do anything during resolve or later with them yet. Missing is still depend clause parsing changes (sink and source) and link and to clause for declare target construct. 2016-05-06 Jakub Jelinek * gfor

Re: tuple move constructor

2016-05-06 Thread Ville Voutilainen
On 6 May 2016 at 20:51, Marc Glisse wrote: > Hi Ville, > > since you wrote the latest patches on tuple constructors, do you have an > opinion on this patch, or alternate strategies to achieve the same goal? > > https://gcc.gnu.org/ml/libstdc++/2016-04/msg00041.html I have fairly mixed feelings ab

Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread Pedro Alves
On 05/06/2016 07:33 PM, Trevor Saunders wrote: > On Fri, May 06, 2016 at 07:10:33PM +0100, Pedro Alves wrote: >> I like your names without the GCC_ prefix better though, >> for the same reason of standardizing binutils-gdb + gcc >> on the same symbols. > > I agree, though I'm not really sure when

Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread Trevor Saunders
On Fri, May 06, 2016 at 07:10:33PM +0100, Pedro Alves wrote: > On 05/06/2016 06:56 PM, Pedro Alves wrote: > > > If building gcc as a C++11 program is supported, then it > > won't be possible to use these names as symbols for > > anything else anyway? > > Just found out the above is not true. App

Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread Pedro Alves
On 05/06/2016 06:56 PM, Pedro Alves wrote: > If building gcc as a C++11 program is supported, then it > won't be possible to use these names as symbols for > anything else anyway? Just found out the above is not true. Apparently I've been stuck in C++98 for too long... Sorry about the noise. I

Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread Pedro Alves
On 05/06/2016 05:40 PM, David Malcolm wrote: > +#if __cplusplus >= 201103 > +/* C++11 claims to be available: use it: */ > +#define OVERRIDE override > +#define FINAL final > +#else > +/* No C++11 support; leave the macros empty: */ > +#define OVERRIDE > +#define FINAL > +#endif > + Is there a rea

Re: tuple move constructor

2016-05-06 Thread Marc Glisse
Hi Ville, since you wrote the latest patches on tuple constructors, do you have an opinion on this patch, or alternate strategies to achieve the same goal? https://gcc.gnu.org/ml/libstdc++/2016-04/msg00041.html On Thu, 21 Apr 2016, Marc Glisse wrote: On Thu, 21 Apr 2016, Jonathan Wakely wr

Go patch committed: Escape analysis framework

2016-05-06 Thread Ian Lance Taylor
This patch by Chris Manghane implements the basic framework for the new escape analysis. It doesn't really do anything at this point, this is just a skeleton. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2016-05-06 Chris Manghane * Make-lang.in (GO_O

Re: [PATCH v2] add support for placing variables in shared memory

2016-05-06 Thread Alexander Monakov
Allow using __attribute__((shared)) to place static variables in '.shared' memory space. Changes in v2: - reword diagnostic message in nvptx_handle_shared_attribute to follow other backends ("... attribute not allowed with auto storage class"); - reject explicit initialization of ".shared" memor

Re: CONSTEXPR macro (was "Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h")

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 12:32:47PM -0400, David Malcolm wrote: > Perhaps, but CONSTEXPR seems to be more awkward than OVERRIDE and > FINAL. The meanings of "final" and "override" are consistent between > C++11 and C++14, but C++14 allows more things to be marked as > "constexpr" than C++11. Hence

CONSTEXPR macro (was "Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h")

2016-05-06 Thread David Malcolm
On Fri, 2016-05-06 at 18:20 +0200, Jakub Jelinek wrote: > On Fri, May 06, 2016 at 12:40:45PM -0400, David Malcolm wrote: > > C++11 adds the ability to add "override" after an implementation of > > a > > virtual function in a subclass, to: > > (A) document that this is an override of a virtual funct

Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 12:40:45PM -0400, David Malcolm wrote: > C++11 adds the ability to add "override" after an implementation of a > virtual function in a subclass, to: > (A) document that this is an override of a virtual function > (B) allow the compiler to issue a warning if it isn't (e.g. a

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Ian Lance Taylor
On Fri, May 6, 2016 at 2:51 AM, Jakub Jelinek wrote: > > Anyway, perhaps I'm misremembering, if there is a mode that really can't > fail due to allocation failures or not, we need to deal with that. > Ian or Jason, can all the demangle users allocate heap memory or not? > And, if __cxa_demangle ca

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Jakub Jelinek
On Sat, May 07, 2016 at 12:05:11AM +0800, Marcel Böhme wrote: > This patch also removes the following part of the comment for method > cplus_demangle_print_callback: > "It does not use heap memory to build an output string, so cannot encounter > memory allocation failure”. But that exactly is th

[PATCH 2/2] jit: use FINAL and OVERRIDE throughout

2016-05-06 Thread David Malcolm
Mark most virtual functions in gcc/jit as being FINAL OVERRIDE. gcc::jit::recording::lvalue::access_as_rvalue is the sole OVERRIDE that isn't a FINAL. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. I can self-approve this, but as asked in patch 1, does "final" imply "override"? Is "fi

[PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h

2016-05-06 Thread David Malcolm
C++11 adds the ability to add "override" after an implementation of a virtual function in a subclass, to: (A) document that this is an override of a virtual function (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch of the type signature). Similarly, it allows us to add a "fin

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Marcel Böhme
Hi, This patch also removes the following part of the comment for method cplus_demangle_print_callback: "It does not use heap memory to build an output string, so cannot encounter memory allocation failure”. > On 6 May 2016, at 11:11 PM, Marcel Böhme wrote: > > >> If one malloc succeeds and

[gom[4] Improve loop partitioning

2016-05-06 Thread Nathan Sidwell
This patch improves the auto loop partitioning algorithm in 2 ways. 1) rather than try and assign just the outer loop to the outer partition and then all innermost loops to partitioning axis, this changes the algorithm to assign the innermost loop to the innermost partition and then the outerm

Re: [PATCH] Fix PR70941

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 09:37:46AM +0200, Richard Biener wrote: > > The following completes the fix for PR67921 now that we have a testcase > for the non-pointer case. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. The testcase (for obvious reasons) fails on -funsigned-char de

RE: [PATCH 2/4] [MIPS] Add pipeline description for MSA

2016-05-06 Thread Matthew Fortune
Robert Suchanek writes: > > gcc/ChangeLog: > > * config/mips/i6400.md (i6400_fpu_intadd, i6400_fpu_logic) > (i6400_fpu_div, i6400_fpu_cmp, i6400_fpu_float, i6400_fpu_store) > (i6400_fpu_long_pipe, i6400_fpu_logic_l, i6400_fpu_float_l) > (i6400_fpu_mult): New cpu units. >

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 11:11:29PM +0800, Marcel Böhme wrote: > + dpi.copy_templates > += (struct d_print_template *) malloc (((size_t) dpi.num_copy_templates) > + * sizeof (*dpi.copy_templates)); > + if (! dpi.copy_templates) > +{ > + d_print_e

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Marcel Böhme
> If one malloc succeeds and the other fails, you leak memory. > > Jakub Nice catch. Thanks! Bootstrapped and regression tested on x86_64-pc-linux-gnu. Best - Marcel Index: libiberty/ChangeLog === --- libiberty/ChangeLog (re

RE: [PATCH 1/4] [MIPS] Add support for MIPS SIMD Architecture (MSA)

2016-05-06 Thread Matthew Fortune
Hi Robert, Robert Suchanek writes: > Revised patch attached. > > Tested with mips-img-linux-gnu and bootstrapped x86_64-unknown-linux- > gnu. One small tweak, ChangeLog should wrap at 74 columns. Please consider the full list of authors for this patch as it has had many major contributors now.

[AArch64][3/4] Don't generate redundant checks when there is no composite arg

2016-05-06 Thread Jiong Wang
AArch64 va_arg gimplify hook is generating redundant instructions. The current va_arg fetch logic is: 1 if (va_arg offset shows the arg is saved at reg_save_area) 2 if ((va_arg_offset + va_arg_type_size) <= 0) 3fetch va_arg from reg_save_area. 4 else 5fetch va_arg from i

[AArch64][4/4] Simplify cfg during vaarg gimplification

2016-05-06 Thread Jiong Wang
Based on patch [3/4], we can further optimize the vaarg gimplification logic, this time not for redundant checks, but for redundant basic blocks. Thus we can simplify the control graph and eventually generate less branch instructions. The current gimplification logic requires three basic blocks:

[AArch64][2/4] PR63596, honor tree-stdarg analysis result to improve VAARG codegen

2016-05-06 Thread Jiong Wang
This patch fixes PR63596. There is no need to push/pop all arguments registers. We only need to push and pop those registers used. These use info is calculated by a dedicated vaarg optimization tree pass "tree-stdarg", the backend should honor it's analysis result. For a simple testcase where va

[AArch64][1/4] Enable tree-stdarg pass for AArch64 by defining counter fields

2016-05-06 Thread Jiong Wang
This patch initialize va_list_gpr_counter_field and va_list_fpr_counter_field properly for AArch64 backend that tree-stdarg pass will be enabled. The "required register" analysis is largely target independent, but the user might operate on the inner offset field in vaarg structure directly, for e

[AArch64][0/4] Improve variable argument (vaarg) support

2016-05-06 Thread Jiong Wang
Currently, there are three major issues in AArch64 variable argument (vaarg) support. * tree-stdarg pass is not enabled, thus we are doing uncessary register pushes/popes. This is PR63596. * va_arg gimplification hook is generating sub-optimal code due to the runtime boundary check

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 10:46:12PM +0800, Marcel Böhme wrote: >d_print_init (&dpi, callback, opaque, dc); > > - { > -#ifdef CP_DYNAMIC_ARRAYS > -__extension__ struct d_saved_scope scopes[dpi.num_saved_scopes]; > -__extension__ struct d_print_template temps[dpi.num_copy_templates]; >

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 04:41:41PM +0200, Martin Liška wrote: > On 05/06/2016 03:25 PM, Jakub Jelinek wrote: > > Well, we already have the gimple poisoning/unpoisoning code on RTL (emitted > > after the prologue and before the epilogue), so it shouldn't be that hard. > > I'd only do the most common

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Marcel Böhme
Hi Jakub, > On 6 May 2016, at 5:51 PM, Jakub Jelinek wrote: >> > > If you just want an array, restricting the size including the sizeof > to fit into int makes no sense, you want to guard it against overflows > during the multiplication. Okay, done. (Someone might want to substitute size_t with

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Martin Liška
On 05/06/2016 03:25 PM, Jakub Jelinek wrote: > Well, we already have the gimple poisoning/unpoisoning code on RTL (emitted > after the prologue and before the epilogue), so it shouldn't be that hard. > I'd only do the most common/easy cases inline though, like 1/2/4/8/16/32 > bytes long variables.

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 05:22:46PM +0300, Yury Gribov wrote: > On 05/06/2016 03:38 PM, Jakub Jelinek wrote: > >On Fri, May 06, 2016 at 02:48:30PM +0300, Yury Gribov wrote: > >>>6) As the use-after-scope stuff is already included in libsanitizer, no > >>>change is needed for the library > >> > >>No

[PATCH, i386]: Consolidate and remove unused register_and_not_{,any_}fp_reg_operand predicates

2016-05-06 Thread Uros Bizjak
Hello! 2016-05-06 Uros Bizjak * config/i386/i386.md (int cmove peephole2s): Use general_reg_operand instead of register_and_not_any_fp_reg_operand as operand 0 predicate. * config/i386/predicates.md (register_and_not_any_fp_reg_operand): Remove unused predicate. (register_a

[PATCH, rs6000] Add support for int versions of vec_addec

2016-05-06 Thread Bill Seurer
This patch adds support for the signed and unsigned int versions of the vec_addec altivec builtins from the Power Architecture 64-Bit ELF V2 ABI OpenPOWER ABI for Linux Supplement (16 July 2015 Version 1.1). There are many of the builtins that are missing and this is part of a series of patches to

Re: [PATCH, ARM] use vmov.i64 to load 0 into FP reg if neon enabled

2016-05-06 Thread Kyrill Tkachov
Hi Jim, On 05/05/16 22:37, Jim Wilson wrote: For this simple testcase double sub (void) { return 0.0; } Without the attached patch, an ARM compiler with neon support enabled, gives vldr.64 d0, .L2 With the attached patch, an ARM compiler with neon enabled, gives vmov.i64 d0, #0@

Re: [PING][PATCH] New plugin event when evaluating a constexpr call

2016-05-06 Thread Andres Tiraboschi
Hi I made the corrections to the patch. Changelog 2016-5-6 Andres Tiraboschi *gcc/plugin.c (PLUGIN_EVAL_CALL_CONSTEXPR): New event. *gcc/plugin.def (PLUGIN_EVAL_CALL_CONSTEXPR): New event. *gcc/cp/constexpr.c (constexpr_fundef): Moved to gcc/cp/constexpr.h. *gcc/cp/constexpr.c (

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Yury Gribov
On 05/06/2016 03:38 PM, Jakub Jelinek wrote: On Fri, May 06, 2016 at 02:48:30PM +0300, Yury Gribov wrote: 6) As the use-after-scope stuff is already included in libsanitizer, no change is needed for the library Note that upstream seems to use a different cmdline interface. They don't have a d

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 03:17:23PM +0200, Martin Liška wrote: > On 05/06/2016 01:48 PM, Yury Gribov wrote: > > On 05/06/2016 02:04 PM, Martin Liška wrote: > >> I've started working on the patch couple of month go, basically after > >> a brief discussion with Jakub on IRC. > >> > >> I'm sending the

Re: [PATCH v2] gcov: Runtime configurable destination output

2016-05-06 Thread Nathan Sidwell
On 02/24/16 16:52, Aaron Conole wrote: The previous gcov behavior was to always output errors on the stderr channel. This is fine for most uses, but some programs will require stderr to be untouched by libgcov for certain tests. This change allows configuring the gcov output via an environment va

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Martin Liška
On 05/06/2016 01:48 PM, Yury Gribov wrote: > On 05/06/2016 02:04 PM, Martin Liška wrote: >> Hello. >> >> I've started working on the patch couple of month go, basically after >> a brief discussion with Jakub on IRC. >> >> I'm sending the initial version which can successfully run instrumented >> tr

Re: [PATCH] Make basic asm implicitly clobber memory

2016-05-06 Thread Bernd Edlinger
On 05/06/16 08:35, David Wohlferd wrote: > On 5/5/2016 10:29 AM, Bernd Edlinger wrote: >> Hi! >> >> this patch is inspired by recent discussion about basic asm: >> >> Currently a basic asm is an instruction scheduling barrier, >> but not a memory barrier, and most surprising, basic asm >> does _not

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Martin Liška
On 05/06/2016 02:38 PM, Jakub Jelinek wrote: > On Fri, May 06, 2016 at 02:48:30PM +0300, Yury Gribov wrote: >>> 6) As the use-after-scope stuff is already included in libsanitizer, no >>> change is needed for the library >> >> Note that upstream seems to use a different cmdline interface. They don

Re: [PATCH] Fix memory leak in tree-if-conv.c

2016-05-06 Thread Richard Biener
On Fri, May 6, 2016 at 2:40 PM, Martin Liška wrote: > On 05/03/2016 11:07 AM, Bin.Cheng wrote: >> Patch applied as suggested at r235808. >> >> Thanks, >> bin > > Hi. > > Following patch introduces memory leak: > /home/marxin/Programming/gcc2/objdir/gcc/xgcc > -B/home/marxin/Programming/gcc2/objdi

[PATCH] Fix memory leak in tree-if-conv.c

2016-05-06 Thread Martin Liška
On 05/03/2016 11:07 AM, Bin.Cheng wrote: > Patch applied as suggested at r235808. > > Thanks, > bin Hi. Following patch introduces memory leak: /home/marxin/Programming/gcc2/objdir/gcc/xgcc -B/home/marxin/Programming/gcc2/objdir/gcc/-fno-diagnostics-show-caret -fdiagnostics-color=never

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 02:48:30PM +0300, Yury Gribov wrote: > >6) As the use-after-scope stuff is already included in libsanitizer, no > >change is needed for the library > > Note that upstream seems to use a different cmdline interface. They don't > have a dedicated -fsanitize=use-after-scope a

Re: [PATCH] Fix memory leak in tree-inliner

2016-05-06 Thread Martin Liška
On 05/06/2016 12:56 PM, Richard Biener wrote: > Hmmm. But this means debug stmt remapping calls > remap_dependence_clique which may end up bumping > cfun->last_clique and thus may change code generation. > > So what debug stmts contain MEM_REFs? If you put an assert > processing_debug_stmt == 0

[PATCH] Fix PR70948

2016-05-06 Thread Richard Biener
The following fixes PR70948, a failure of PTA considering all fields of va_list being clobbered (assigned from NONLOCAL) for __builtin_va_start. With the new pointer-vs.-decl comparison optimization this bug manifests as a miscompile of gcc.c-torture/execute/va-arg-pack-1.c on AARCH64. Bootstrap

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 01:04:30PM +0200, Martin Liška wrote: > I've started working on the patch couple of month go, basically after > a brief discussion with Jakub on IRC. > > I'm sending the initial version which can successfully run instrumented > tramp3d, postgresql server and Inkscape. It ca

Re: [PATCH] Improve min/max

2016-05-06 Thread Kirill Yukhin
On 04 May 21:53, Jakub Jelinek wrote: > Hi! > > AVX512BW has EVEX insns for these. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK for trunk. -- Thanks, K > > 2016-05-04 Jakub Jelinek > > * config/i386/sse.md (*v8hi3, *v16qi3): Add > avx512bw alternat

Re: [PATCH] Improve whole vector right shift

2016-05-06 Thread Kirill Yukhin
On 04 May 21:51, Jakub Jelinek wrote: > Hi! > > In this case the situation is more complicated, because for > V*HI we need avx512bw and avx512vl, while for V*SI only avx512vl > is needed and both are in the same pattern. But we already have > a pattern that does the right thing right after the "a

Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-06 Thread Marc Glisse
On Tue, 3 May 2016, Richard Biener wrote: On Tue, May 3, 2016 at 3:26 PM, Marc Glisse wrote: On Tue, 3 May 2016, Richard Biener wrote: On Tue, May 3, 2016 at 8:36 AM, Marc Glisse wrote: This removes the duplication. I also removed the case (A&B)&(A&C) which is handled by reassoc. And I ne

Re: [PATCH] Improve vec extraction

2016-05-06 Thread Kirill Yukhin
On 04 May 21:47, Jakub Jelinek wrote: > Hi! > > While EVEX doesn't have vextracti128, we can use vextracti32x4; > unfortunately without avx512dq we need to use full zmm input operand, > but that shouldn't be a big deal when we hardcode 1 as immediate. > > Bootstrapped/regtested on x86_64-linux an

Re: [PATCH] Improve *pmaddwd

2016-05-06 Thread Kirill Yukhin
On 04 May 21:48, Jakub Jelinek wrote: > Hi! > > As the testcase shows, we unnecessarily disallow xmm16+, even when > we can use them for -mavx512bw. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK for trunk. -- Thanks, K > > 2016-05-04 Jakub Jelinek > > * c

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Yury Gribov
On 05/06/2016 02:04 PM, Martin Liška wrote: Hello. I've started working on the patch couple of month go, basically after a brief discussion with Jakub on IRC. I'm sending the initial version which can successfully run instrumented tramp3d, postgresql server and Inkscape. It catches the basic se

Re: [PATCH] Improve vec_concatv?sf*

2016-05-06 Thread Kirill Yukhin
On 04 May 21:44, Jakub Jelinek wrote: > Hi! > > Another pair of define_insns. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK for trunk. -- Thanks, K > > 2016-05-04 Jakub Jelinek > > * config/i386/sse.md (*vec_concatv2sf_sse4_1, *vec_concatv4sf): Use >

Re: [PATCH] Improve vec_interleave*

2016-05-06 Thread Kirill Yukhin
On 04 May 21:41, Jakub Jelinek wrote: > Hi! > > Another 3 define_insns that can handle xmm16+ operands. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK for trunk. -- Thanks, K > > 2016-05-04 Jakub Jelinek > > * config/i386/sse.md (vec_interleave_lowv4sf, >

Re: [PATCH] Improve other 13 define_insns

2016-05-06 Thread Kirill Yukhin
On 04 May 21:43, Jakub Jelinek wrote: > Hi! > > This patch tweaks more define_insns at once, again all the insns > should be already in AVX512F or AVX512VL. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK for trunk. -- Thanks, K > > 2016-05-04 Jakub Jelinek > >

Re: [PATCh] Improve sse_mov{hl,lh}ps

2016-05-06 Thread Kirill Yukhin
On 04 May 21:37, Jakub Jelinek wrote: > Hi! > > Another pair of define_insns where all the VEX insns have EVEX variant > in AVX512VL. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK for trunk. -- Thanks, K > > 2016-05-04 Jakub Jelinek > > * config/i386/sse.

Re: [PATCH] Improve *avx_cvtp?2??256_2

2016-05-06 Thread Kirill Yukhin
On 04 May 21:35, Jakub Jelinek wrote: > Hi! > > Not sure how to easily construct a testcase for this (these insns are > usually used for vectorization, and then it really depends on register > pressure). > But in any case, looking at documentation it seems all the used insns are > available (gener

Re: [PATCH] Fix PR70937

2016-05-06 Thread Richard Biener
On Fri, 6 May 2016, Richard Biener wrote: > > The following patch fixes another case of missing DECL_EXPR in the FE. > > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. > > Ok for trunk? Dominique noticed a FAIL early which is fixed by adjusting the patch to only handle TYPE_DEC

RE: [PATCH 3/4] Add support to run auto-vectorization tests for multiple effective targets

2016-05-06 Thread Matthew Fortune
Robert Suchanek writes: > I'm resending this patch as it has been rebased and updated. I reverted > a change to check_effective_target_vect_call_lrint procedure because it > does not use cached result. Conceptually I think this is a good idea and to the extent that I can follow TCL code it looks

[PATCH] Fix PR70937

2016-05-06 Thread Richard Biener
The following patch fixes another case of missing DECL_EXPR in the FE. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Ok for trunk? Thanks, Richard. 2016-05-06 Richard Biener PR fortran/70937 * trans-decl.c (gfc_trans_vla_type_sizes): Add a DECL_EXPR for

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Martin Liška
Hello. One more issue I forgot to mention in the previous email: e) As one can come up with a source code which jumps to a label within a block scope (use-after-scope-goto-1.c): // { dg-do run } // { dg-additional-options "-fsanitize=use-after-scope -fstack-reuse=none" } int main(int argc, char

[PATCH] Introduce tests for -fsanitize=use-after-scope

2016-05-06 Thread Martin Liška
Hi. This is a new test coverage for the new sanitizer option. Martin >From 753bfb3edb12c9f3fd13f320e308556f63330c97 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 4 May 2016 12:57:05 +0200 Subject: [PATCH 2/2] Introduce tests for -fsanitize=use-after-scope gcc/testsuite/ChangeLog: 2016-05-04

[SH][committed] Remove deprecated options

2016-05-06 Thread Oleg Endo
Hi, The attached patch removes some deprecated SH options. Tested on sh-elf with 'make all-gcc' and with 'make info dvi pdf'. Committed as r235960. Cheers, Oleg gcc/ChangeLog: * config/sh/sh.opt (madjust-unroll, minvalid-symbols, msoft-atomic, mspace): Remove deprecated options.

[PATCH, RFC] Introduce -fsanitize=use-after-scope

2016-05-06 Thread Martin Liška
Hello. I've started working on the patch couple of month go, basically after a brief discussion with Jakub on IRC. I'm sending the initial version which can successfully run instrumented tramp3d, postgresql server and Inkscape. It catches the basic set of examples which are added in following pat

Re: [PATCH] Fix memory leak in tree-inliner

2016-05-06 Thread Richard Biener
On Fri, May 6, 2016 at 12:10 PM, Martin Liška wrote: > Hi. > > I've spotted couple of occurrences of following memory leak seen by valgrind: > > malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) > operator new(unsigned long) (new_op.cc:50) > remap_dependence_clique(copy_body_

Re: [PATCH] Fix coding style in tree-ssa-uninit.c

2016-05-06 Thread Richard Biener
On Fri, May 6, 2016 at 12:06 PM, Martin Liška wrote: > On 11/26/2015 10:04 PM, Bernd Schmidt wrote: >> As I said previously, the one to just replace whitespace is ok for now. >> Please ping the other one when stage1 opens (I expect it'll need changes by >> then). >> >> >> Bernd > > Hello. > > Th

Re: [PATCH PR70935, Regression 6,7]

2016-05-06 Thread Richard Biener
On Thu, May 5, 2016 at 5:19 PM, Yuri Rumyantsev wrote: > Hi All, > > Here is a simple patch which cures the problem with nonlegal > transformation of endless loop. THe fix is simply check that guard > edge destination is not loop latch block. > > Bootstrapping and regression testing did not show a

Re: [patch] Coalesce in more cases

2016-05-06 Thread Richard Biener
On Thu, May 5, 2016 at 5:08 PM, Eric Botcazou wrote: > Hi, > > gimple_can_coalesce_p is rather picky about the conditions under which SSA > names can be coalesced. In particular, when it comes to the type, it's: > > /* Now check the types. If the types are the same, then we should > try t

Re: Missing pointer dereference in tree-affine.c

2016-05-06 Thread Richard Biener
On Thu, May 5, 2016 at 4:19 PM, Richard Sandiford wrote: > wide_int_constant_multiple_p used: > > if (*mult_set && mult != 0) > return false; > > to check whether we had previously seen a nonzero multiple, but "mult" is > a pointer to the previous value rather than the previous value

[SH][committed] Fix length of ic_invalidate_line_sh4a pattern

2016-05-06 Thread Oleg Endo
Hi, The attached patch fixes the length of the ic_invalidate_line_sh4a pattern. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r235957. Cheers, Oleg gcc/ChangeLog: * config/sh/sh.md (i

Re: [PATCH 3/4] Extract deferred-location handling from jit

2016-05-06 Thread Richard Biener
On Wed, May 4, 2016 at 10:49 PM, David Malcolm wrote: > In order to faithfully load RTL dumps that contain references to > source locations, the RTL frontend needs to be able to parse file > and line information and turn then into location_t values. > > Unfortunately, the libcpp API makes it rathe

Re: [PATCH 1/4] Make argv const char ** in read_md_files etc

2016-05-06 Thread Richard Biener
On Wed, May 4, 2016 at 10:49 PM, David Malcolm wrote: > This patch makes the argv param to read_md_files const, needed > so that the RTL frontend can call it on a const char *. > > While we're at it, it similarly makes const the argv for all > of the "main" functions of the various gen*. > > OK fo

Re: [PATCH 2/4] Move name_to_pass_map into class pass_manager

2016-05-06 Thread Richard Biener
On Wed, May 4, 2016 at 10:49 PM, David Malcolm wrote: > The RTL frontend needs to be able to lookup passes by name. > > passes.c has global state name_to_pass_map (albeit static, scoped > to passes.c), for use by enable_disable_pass. > > Move it to be a field of class pass_manager, and add > a get

Re: [PATCH] tail merge ICE

2016-05-06 Thread Richard Biener
On Wed, May 4, 2016 at 7:25 PM, Nathan Sidwell wrote: > This patch fixes an ICE Thomas observed in tree-ssa-tail-merge.c: > > On 05/03/16 06:34, Thomas Schwinge wrote: > >> I'm also seeing the following regression for C and C++, >> libgomp.oacc-c-c++-common/loop-auto-1.c with -O2: >> >> source

[SH][committed] Remove some workaround combine patterns

2016-05-06 Thread Oleg Endo
Hi, The attached patch removes some workaround combine patterns. As far as I remember this issue has been addressed by some match.pd patterns. In any case, CSiBE code size shows no difference and the SH specific testcases mentioned in the code pass without the patterns. Tested on sh-elf with m

[SH][committed] Fix PR 58219

2016-05-06 Thread Oleg Endo
Hi, The attached patch fixes PR 58219. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r235954. gcc/ChangeLog: PR target/58219 * config/sh/predicates.md (long_displacement_mem_op

[PATCH] Fix PR70960

2016-05-06 Thread Richard Biener
The following fixes $subject. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-05-06 Richard Biener PR tree-optimization/70960 * tree-if-conv.c (ifcvt_walk_pattern_tree): Handle non-SSA ops. * gfortran.fortran-torture/compile/pr70960.f90:

[PATCH] Fix memory leak in tree-inliner

2016-05-06 Thread Martin Liška
Hi. I've spotted couple of occurrences of following memory leak seen by valgrind: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) operator new(unsigned long) (new_op.cc:50) remap_dependence_clique(copy_body_data*, unsigned short) (tree-inline.c:845) remap_gimple_op_r(tre

[PATCH] Fix coding style in tree-ssa-uninit.c

2016-05-06 Thread Martin Liška
On 11/26/2015 10:04 PM, Bernd Schmidt wrote: > As I said previously, the one to just replace whitespace is ok for now. > Please ping the other one when stage1 opens (I expect it'll need changes by > then). > > > Bernd Hello. This part of the part remains to be installed from the previous stag

[gomp4.5] Allow more than 64 clauses in gfc_match_omp_clauses

2016-05-06 Thread Jakub Jelinek
Hi! With 32 OpenMP clauses and 27 further OpenACC ones, I can't add 10 further clauses I need for OpenMP. So, this patch implements using C++ classes a framework where the code can use mostly what it used, yet it is now up to 128 bits, while being not really more expensive at -O2 than passing two

[SH][committed] Add some more missing div0s cases

2016-05-06 Thread Oleg Endo
Hi, The attached patch addresses some of the remaining things as mentioned in the PR. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r235952. Cheers, Oleg gcc/ChangeLog: PR target/5293

Re: Fix for PR68159 in Libiberty Demangler (6)

2016-05-06 Thread Jakub Jelinek
On Fri, May 06, 2016 at 05:01:14PM +0800, Marcel Böhme wrote: > The patch that is attached now is bootstrapped and regression tested on > x86_64-pc-linux-gnu. > > > > > This file is used not just in the various tools like binutils or gdb, but > > also in libstdc++, where it used e.g. in the std:

[SH][committed] Add another rotcr variant

2016-05-06 Thread Oleg Endo
Hi, The attached patch adds another combine pattern variant for the SH rotcr instruction. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r235950. Cheers, Oleg gcc/ChangeLog: PR target/

Re: [PATCH v2] Allocate constant size dynamic stack space in the prologue

2016-05-06 Thread Dominik Vogt
> diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c > index 21f21c9..4d48afd 100644 > --- a/gcc/cfgexpand.c > +++ b/gcc/cfgexpand.c ... > @@ -1099,8 +1101,10 @@ expand_stack_vars (bool (*pred) (size_t), struct > stack_vars_data *data) > >/* If there were any, allocate space. */ >if

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-06 Thread Bin.Cheng
On Fri, May 6, 2016 at 10:40 AM, Bin.Cheng wrote: > On Tue, May 3, 2016 at 11:08 AM, Richard Biener > wrote: >> On Tue, May 3, 2016 at 12:01 PM, Bin.Cheng wrote: >>> On Mon, May 2, 2016 at 10:00 AM, Richard Biener >>> wrote: On Fri, Apr 29, 2016 at 5:05 PM, Bin.Cheng wrote: > On Fri,

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-06 Thread Bin.Cheng
On Tue, May 3, 2016 at 11:08 AM, Richard Biener wrote: > On Tue, May 3, 2016 at 12:01 PM, Bin.Cheng wrote: >> On Mon, May 2, 2016 at 10:00 AM, Richard Biener >> wrote: >>> On Fri, Apr 29, 2016 at 5:05 PM, Bin.Cheng wrote: On Fri, Apr 29, 2016 at 12:16 PM, Richard Biener wrote: >

Re: [PATCH v2] Allocate constant size dynamic stack space in the prologue

2016-05-06 Thread Dominik Vogt
Updated version of the patch described below. Apart from fixing a bug and adding a test, the new logic is now used always, for all targets. The discussion of the original patch starts here: https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03052.html The new patch has been bootstrapped and regressi

  1   2   >