Go patch committed: Don't allow dup names in a tuple assignment

2014-10-17 Thread Ian Lance Taylor
The Go frontend was incorrectly accepting duplicate variable names in a tuple assignment, as in "a, a := 0, 0". This is http://golang.org/issue/8436. This patch from Chris Manghane corrects this error. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian d

Re: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

2014-10-17 Thread Joseph S. Myers
On Sat, 18 Oct 2014, Manuel López-Ibáñez wrote: > Can we make "possibly in some other cases" more concrete? Otherwise, Cases where something about the code is not defined by the base standard, but a diagnostic is not required. -pedantic may give a warning for such cases. -pedantic-errors may

Re: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

2014-10-17 Thread Manuel López-Ibáñez
On 18 October 2014 01:43, Joseph S. Myers wrote: > On Sat, 18 Oct 2014, Manuel López-Ibáñez wrote: > >> The previous version also does not match your description. You are saying >> that >> >> -Wpedantic = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic) >> and -pedantic-errors = pedwarn(OPT_Wpedan

Re: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

2014-10-17 Thread Joseph S. Myers
On Sat, 18 Oct 2014, Manuel López-Ibáñez wrote: > The previous version also does not match your description. You are saying that > > -Wpedantic = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic) > and -pedantic-errors = pedwarn(OPT_Wpedantic).+ pedwarn(0) > > The current version says that > > -W

Re: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

2014-10-17 Thread Manuel López-Ibáñez
On 17 October 2014 22:46, Joseph S. Myers wrote: >> @@ -3318,8 +3327,8 @@ >> >> @item -pedantic-errors >> @opindex pedantic-errors >> -Like @option{-Wpedantic}, except that errors are produced rather than >> -warnings. >> +This is equivalent to @option{-Werror=pedantic} plus making into errors >

Re: [PATCH PR63581] Fix undefined references in debug_info

2014-10-17 Thread Rong Xu
Here is the diff for ChangeLog Index: ChangeLog === --- ChangeLog (revision 216415) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2014-10-17 + + * cfgrtl.c (emit_barrier_after_bb): Append the barrier to the + footer, instead of un

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-17 Thread Joseph S. Myers
On Wed, 15 Oct 2014, Richard Biener wrote: >Caveat2: the GENERIC code-path of match-and-simplify does >not handle everything fold-const.c does - for example >it does nothing on operands with side-effects - foo () * 0 >is not simplified to (foo(), 0). It also does not >get the

[PATCH PR63581] Fix undefined references in debug_info

2014-10-17 Thread Rong Xu
Hi, The attached patch fixes PR63581. The diagnosis is in the bug report. Google ref b/17759776. Tested with bootstrap and regression. Thanks, -Rong 63581_patch Description: Binary data

Re: [PATCH 06/10] Heart of the JIT implementation (was: Re: [PATCH 0/5] Merger of jit branch (v2))

2014-10-17 Thread Joseph S. Myers
Does libgccjit.so end up getting linked with -static-libstdc++ -static-libgcc? If so, that could be problematic (are static libstdc++ and libgcc necessarily built as PIC so it's even possible to embed them into a shared library?). It's certainly not clear that the -static-libstdc++ -static-li

Re: [PATCH 05/10] JIT-related changes outside of jit subdir

2014-10-17 Thread Joseph S. Myers
Although Sphinx isn't a build dependency, as a dependency for regenerating checked-in files I think it should be documented in install.texi (like autoconf, gettext, etc.). -- Joseph S. Myers jos...@codesourcery.com

[Patch, testsuite] clear wrap_compile_flags before setting it

2014-10-17 Thread Christophe Lyon
Hi, In testsuite/lib/wrapper.exp's ${tool}_maybe_build_wrapper, we call set_currtarget_info wrap_compile_flags to override wrap_compile_flags with additional flags when compiling testglue.c. However, dejagnu's set_currtarget_info {entry value} will write into value only if it's not already define

Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567)

2014-10-17 Thread Joseph S. Myers
On Fri, 17 Oct 2014, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2014-10-17 Marek Polacek > > PR c/63567 > * c-typeck.c (digest_init): Allow initializing objects with static > storage duration with compound literals even in C99 and add pe

Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567)

2014-10-17 Thread Marek Polacek
On Fri, Oct 17, 2014 at 03:53:46PM +, Joseph S. Myers wrote: > On Fri, 17 Oct 2014, Marek Polacek wrote: > > > Building Linux kernel failed with 'error: initializer element is not > > constant', because they're initializing objects with static storage > > duration with (T){ ...} - and that isn

Re: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

2014-10-17 Thread Joseph S. Myers
On Fri, 17 Oct 2014, Manuel López-Ibáñez wrote: > +Some options, such as @option{-Wall} and @option{-Wextra}, turn on other > +options, such as @option{-Wunused}, which may turn on further options, > +such as @option{-Wunused-value}. The combined effect of positive and > +negative forms is that mo

[Bug libstdc++/61107] stl_algo.h: std::__inplace_stable_partition() doesn't process the whole data range

2014-10-17 Thread François Dumont
Hi As proposed in the bug report I just removed the __inplace_stable_partition as __stable_partition_adaptive is able to handle a 0 buffer size. To test this bug I introduced overloads of new/delete operators in the testsuite utils. The existing set_memory_limits has no impact on new

Re: update address taken: don't drop clobbers

2014-10-17 Thread Marc Glisse
On Thu, 16 Oct 2014, Jeff Law wrote: BTW, I dislike having multiple DCE implementations... Similarly. The proposal above was just to determine if we should schedule DCE or not. Thinking about it some more, I don't think we should need any kind of DCE here. The rewriting in update_ssa alread

Re: [x86] Replace builtins with vector extensions

2014-10-17 Thread Marc Glisse
On Fri, 17 Oct 2014, Uros Bizjak wrote: While looking correct, I am a bit nervous about avx512fintrin.h changes, mainly because I have not much experience with these patterns. I have adder Kirill to CC for possible comments. He asked for this part of the patch, and tested it: https://gcc.gnu.o

Re: [patch] Fix ICE during LTRANS on big Ada application

2014-10-17 Thread Eric Botcazou
> Yes, this looks OK. Inliner coul also take care to turn the master clone > into unanalyzed node as remove_unreachable_nodes would, but I do not think > it is worth the effort. Please put the loop later in the function so it > does not slow things down unnecesarily (there are often many inline clo

Re: -fuse-caller-save - Collect register usage information

2014-10-17 Thread Eric Botcazou
> Let's look at the effect of the option (after the recent fix for PR61605) on > gcc.target/i386/fuse-calller-save.c: > ... > foo: > .LFB1: > .cfi_startproc > - pushq %rbx > - .cfi_def_cfa_offset 16 > - .cfi_offset 3, -16 > - movl%edi, %ebx > callbar > -

Re: C/C++ diagnostics guidelines (was: Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567))

2014-10-17 Thread Manuel López-Ibáñez
On 17 October 2014 20:04, Manuel López-Ibáñez wrote: > On 17 October 2014 19:33, Joseph S. Myers wrote: >> On Fri, 17 Oct 2014, Manuel López-Ibáñez wrote: >> >>> Thus, I drafted some guidelines >>> at:https://gcc.gnu.org/wiki/Better_Diagnostics#guidelines >>> >>> Please, could you take a look and

[PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

2014-10-17 Thread Manuel López-Ibáñez
While writing the guidelines https://gcc.gnu.org/wiki/Better_Diagnostics#guidelines , I noticed that we never explain the precedence rules between conflicting options. Also, the description of -pedantic-errors could be more precise. OK? Index: invoke.texi

Re: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap

2014-10-17 Thread Mike Stump
On Oct 17, 2014, at 7:08 AM, Evgeny Stupachenko wrote: > The patch fixes 1st fail in darwin bootstarp. > When PIC register is pseudo we don't need to init it after setjmp or > non local goto. > > Is it ok? So, I don’t see commentary in the PR that all fallout and all bugs introduced are fixed b

Re: [PATCH][0/n] Merge from match-and-simplify

2014-10-17 Thread Sebastian Pop
Sebastian Pop wrote: > Richard Biener wrote: > > looks like > > RTL issues and/or IVOPTs issues? > > I should have posted the first diff between the compilers with > -fdump-tree-all: > that would expose the problem at its root. Looks like this is caused by the fwprop pass: diff -u -r ./foo.i.08

[patch] libstdc++/57250 shared_ptr atomic operations

2014-10-17 Thread Jonathan Wakely
I'm not very proud of this solution, but unless anyone has a better ideas this is how I plan to add the atomic operations for shared_ptr. I used __gnu_cxx::__mutex instead of std::mutex because it has fewer dependencies, so the atomic operations should always be available for shared_ptr even when

Re: [ARM] Fix DWARF unwinding breakage

2014-10-17 Thread Eric Botcazou
> [ thinking out loud ] So, I can’t help but wonder if c6x, mips, nios2 and sh > now have the exact same problem (or could if they switched code-gen > some)... ARM is very peculiar here since it goes through a stack slot to copy a value into a register; other architectures, e.g. SPARC, do a bare

Re: C/C++ diagnostics guidelines (was: Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567))

2014-10-17 Thread Manuel López-Ibáñez
On 17 October 2014 19:33, Joseph S. Myers wrote: > On Fri, 17 Oct 2014, Manuel López-Ibáñez wrote: > >> Thus, I drafted some guidelines >> at:https://gcc.gnu.org/wiki/Better_Diagnostics#guidelines >> >> Please, could you take a look and comment whether I got it right/wrong? > > Yes, that looks rig

[PATCH PR63530] Fix the pointer alignment in vectorization

2014-10-17 Thread Carrot Wei
Hi In current vectorization pass, when a new vector pointer is created, its alignment is not set correctly. We should use DR_MISALIGNMENT (dr) since only this alignment is adjusted when loop peeling or multi version is occurred. This patch passed following tests: x86_64 bootstrap. x86_64 regressi

Re: [PATCH] Avoid the need to install when running the jit testsuite

2014-10-17 Thread Joseph S. Myers
On Fri, 17 Oct 2014, David Malcolm wrote: > +# This symlink makes the full installation name of the driver be available > +# from within the *build* directory, for use when running the JIT library > +# from there (e.g. when running its testsuite). > +$(FULL_DRIVER_NAME): ./xgcc > + $(LN) -s $<

Re: [ARM] Fix DWARF unwinding breakage

2014-10-17 Thread Mike Stump
On Oct 17, 2014, at 1:21 AM, Eric Botcazou wrote: > This nevertheless used to work because the blockage insn emitted by the RTL > epilogue was acting as a "wild load" but this got broken by Richard's patch > which removed the "wild load" trick. > The attached patch fixes the breakage by marking

Re: [PATCH][0/n] Merge from match-and-simplify

2014-10-17 Thread Richard Biener
On October 17, 2014 6:35:58 PM CEST, Sebastian Pop wrote: >Richard Biener wrote: >> On Thu, 16 Oct 2014, Sebastian Pop wrote: >> >> > Richard Biener wrote: >> > > >> > > I have posted 5 patches as part of a larger series to merge >> > > (parts) from the match-and-simplify branch. While I think

Re: C/C++ diagnostics guidelines (was: Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567))

2014-10-17 Thread Joseph S. Myers
On Fri, 17 Oct 2014, Manuel López-Ibáñez wrote: > Thus, I drafted some guidelines > at:https://gcc.gnu.org/wiki/Better_Diagnostics#guidelines > > Please, could you take a look and comment whether I got it right/wrong? Yes, that looks right to me. -- Joseph S. Myers jos...@codesourcery.com

Re: -fuse-caller-save - Collect register usage information

2014-10-17 Thread Mike Stump
On Oct 17, 2014, at 8:50 AM, Jeff Law wrote: >> So - I like -fipa-ra more. > Similarly. Yeah, I was going to say I liked the ipa tag in there some place but didn’t cause I didn’t want to bikeshed, but, since a few others like that, dogpiling seems ok. :-)

Re: [PATCH] Fix race in libstdc++ testsuite

2014-10-17 Thread Mike Stump
On Oct 16, 2014, at 7:12 PM, Maxim Kuvyrkov wrote: > The fix is to use unique name cin_unget-1-[pid].txt for the data file. > OK to apply? Ok.

Re: [x86] Replace builtins with vector extensions

2014-10-17 Thread Uros Bizjak
On Sun, Oct 12, 2014 at 10:36 PM, Marc Glisse wrote: > for the first patch, it is actually easier to repost the old patch with some > new testcases. That doesn't mean it has to go in all at once, but you can > comment on various things. If that's a problem I'll separate them and repost > separate

C/C++ diagnostics guidelines (was: Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567))

2014-10-17 Thread Manuel López-Ibáñez
> The Right Thing is for -pedantic not to cause errors, only warnings > (-pedantic-errors being needed for an error). So rather than having this > conditional for whether to allow the extension at all, make the > conditional code do a pedwarn (if flag_isoc99, otherwise there will > already have be

Re: [PATCH 4/5] State cleanups -- also note for MPX work

2014-10-17 Thread Jeff Law
On 10/16/14 18:41, David Malcolm wrote: Anyway, just thought it was worth explicitly pointing out that these two hunks of work, while they're tackling totally different issues may conflict because of an implementation of the MPX bits. Presumably my state cleanup patch isn't going to break the

Re: [PATCH 5/5] Use preferred_for_speed in i386.md

2014-10-17 Thread Uros Bizjak
On Fri, Oct 17, 2014 at 4:54 PM, Richard Sandiford wrote: > Undo the original fix for 61630 and use preferred_for_speed in the > problematic pattern. > > I've not written many gcc.target/i386 tests so the markup might need > some work. > > Richard > > > gcc/ > * lra.c (lra): Remove call to

[patch] Create cfgrtl.h

2014-10-17 Thread Andrew MacLeod
Rather than trying to flatten basic-block.h and do all the work associated in one big patch, I'll try to do it in smaller steps :-) This patch creates cfgrtl.h to maintain the prototypes for functions exported from cfgrtl.c. For the moment, basic-block.h includes cfgrtl.h, keeping everythin

Re: [PATCH][0/n] Merge from match-and-simplify

2014-10-17 Thread Sebastian Pop
Richard Biener wrote: > On Thu, 16 Oct 2014, Sebastian Pop wrote: > > > Richard Biener wrote: > > > > > > I have posted 5 patches as part of a larger series to merge > > > (parts) from the match-and-simplify branch. While I think > > > there was overall consensus that the idea behind the project

[PATCH] Avoid the need to install when running the jit testsuite

2014-10-17 Thread David Malcolm
On Wed, 2014-10-15 at 17:29 -0400, David Malcolm wrote: > On Wed, 2014-10-15 at 14:51 -0600, Jeff Law wrote: > > On 10/15/14 12:25, David Malcolm wrote: > > > On Wed, 2014-10-15 at 11:36 -0600, Jeff Law wrote: > > >> On 10/13/14 11:45, David Malcolm wrote: > > >>> gcc/ChangeLog: > > >>> * c

Re: [libatomic PATCH] Fix libatomic behavior for big endian toolchain

2014-10-17 Thread Shiva Chen
Hi, Joseph I have been modify the patch as your suggestion use # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ in architecture-independent files Is it ok for trunk ? And I don't have svn write access Could you help me to commit this patch? Shiva 2014-10-17 23:41 GMT+08:00 Joseph S. Myers : > Chang

Re: [C PATCH] Make -Wno-implicit-int work in C99 mode

2014-10-17 Thread Joseph S. Myers
On Fri, 17 Oct 2014, Marek Polacek wrote: > C99 mode warns about defaulting to int by default, but without > the possibility to suppress the warning with -Wno-implicit-int. > This is likely to arouse the ire of the users, especially with > the new default. > > Therefore the following patch tweaks

[PATCH] -fsanitize-recover=list

2014-10-17 Thread Jakub Jelinek
On Mon, Oct 13, 2014 at 02:47:07PM +0400, Yury Gribov wrote: > On 09/30/2014 09:39 PM, Jakub Jelinek wrote: > >LGTM, will hack it up soon in GCC then. > > Do you plan to work on this in near future? Here is only very lightly tested patch, didn't get to updating documentation though, plus there is

[gomp4] Asynchronous data unmapping & wait fixes for OpenACC

2014-10-17 Thread Julian Brown
Hi, This patch introduces a new plugin hook in libgomp to register a callback function to clean up host-side bookkeeping data after an asynchronous operation has completed (replacing the previous ad-hoc method used in the NVPTX backend), and adds code to ensure that same cleanup is done reliably i

[PATCH][AArch64][4.8] Backport Cortex-A53 erratum 835769 workaround

2014-10-17 Thread Kyrill Tkachov
Hi all, This is the 4.8 backport of the Cortex-A53 erratum 835769 workaround. 4.8 doesn't have rtx_insns and the type attributes are different. Other than that there's not much different from the trunk version. Bootstrapped and tested on aarch64-none-linux-gnu with and without the workaround en

[PATCH][AArch64][4.8] Add --enable-fix-cortex-a53-835769 configure option

2014-10-17 Thread Kyrill Tkachov
Hi all, This is the 4.8 backport of the configure option --enable-fix-cortex-a53-835769 to enable the workaround for the Cortex-A53 erratum 835769 by default. The patch is very similar to the trunk version, just some differences in the placement of the relevant sections. Bootstrapped and test

Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567)

2014-10-17 Thread Joseph S. Myers
On Fri, 17 Oct 2014, Marek Polacek wrote: > Building Linux kernel failed with 'error: initializer element is not > constant', because they're initializing objects with static storage > duration with (T){ ...} - and that isn't permitted in gnu99/gnu11. > > I think the Right Thing is to allow some

[gomp4] Fix include path configury for gomp-constants.h

2014-10-17 Thread Julian Brown
Hi, This patch tweaks the include path configury used by libgomp to find the gomp-constants.h header, as suggested by Jakub. OK for the gomp4 branch? Thanks, Julian libgomp/ * Makefile.am (AM_CPPFLAGS): Fix search path for locating gomp-constants.h. * Makefile.in: Regenerate.co

Re: -fuse-caller-save - Collect register usage information

2014-10-17 Thread Jeff Law
On 10/17/14 05:00, Richard Biener wrote: I'm starting to lean towards -foptimize-call-clobbers or similar. Well, it is really some form of IPA driven register allocation. Whether you want to call it -fipa-ra or not is another question - but if we had such option then enabling it with that opt

[gomp4] Use GOMP_PLUGIN_ not gomp_plugin_ for libgomp plugin API

2014-10-17 Thread Julian Brown
Hi, As the title says, this patch makes the libgomp plugin API use the GOMP_PLUGIN_ prefix rather than gomp_plugin_. This is purely a mechanical change. OK for the gomp4 branch? Thanks, Julian ChangeLog libgomp/ * libgomp-plugin.c (gomp_plugin_*): Rename to... (GOMP_PLUGIN_*): Thi

Re: [libatomic PATCH] Fix libatomic behavior for big endian toolchain

2014-10-17 Thread Joseph S. Myers
Changes to architecture-independent files must use architecture-independent conditionals, so __BYTE_ORDER__ not __ARMEB__. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 07:29:26PM +0400, Ilya Verbin wrote: > On 17 Oct 17:18, Jakub Jelinek wrote: > > On Fri, Oct 17, 2014 at 07:17:31PM +0400, Ilya Verbin wrote: > > > On 17 Oct 17:10, Jakub Jelinek wrote: > > > > Well, there is no need to remove them, just the " || (f && > > > > !omp_is_initi

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Ilya Verbin
On 17 Oct 17:18, Jakub Jelinek wrote: > On Fri, Oct 17, 2014 at 07:17:31PM +0400, Ilya Verbin wrote: > > On 17 Oct 17:10, Jakub Jelinek wrote: > > > Well, there is no need to remove them, just the " || (f && > > > !omp_is_initial_device ())" > > > should be dropped from target regions without devi

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 07:17:31PM +0400, Ilya Verbin wrote: > On 17 Oct 17:10, Jakub Jelinek wrote: > > On Fri, Oct 17, 2014 at 06:58:17PM +0400, Ilya Verbin wrote: > > > Here in the original test you have: > > > > > > #pragma omp target if (v <= 1) > > > if (omp_get_level () != 0 || (f && !o

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Ilya Verbin
On 17 Oct 17:10, Jakub Jelinek wrote: > On Fri, Oct 17, 2014 at 06:58:17PM +0400, Ilya Verbin wrote: > > Here in the original test you have: > > > > #pragma omp target if (v <= 1) > > if (omp_get_level () != 0 || (f && !omp_is_initial_device ())) > > abort (); > > #pragma omp target devi

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 06:58:17PM +0400, Ilya Verbin wrote: > Here in the original test you have: > > #pragma omp target if (v <= 1) > if (omp_get_level () != 0 || (f && !omp_is_initial_device ())) > abort (); > #pragma omp target device (d) if (v <= 1) > if (omp_get_level () != 0 ||

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Ilya Verbin
On 17 Oct 16:14, Jakub Jelinek wrote: > > -volatile int v; > > +volatile int v = 0; > > Why? Ok, I'll revert it back. > > --- a/libgomp/testsuite/libgomp.c/target-7.c > > +++ b/libgomp/testsuite/libgomp.c/target-7.c > > @@ -1,7 +1,9 @@ > > +// { dg-require-effective-target offload_device } > > +

[PATCH 5/5] Use preferred_for_speed in i386.md

2014-10-17 Thread Richard Sandiford
Undo the original fix for 61630 and use preferred_for_speed in the problematic pattern. I've not written many gcc.target/i386 tests so the markup might need some work. Richard gcc/ * lra.c (lra): Remove call to recog_init. * config/i386/i386.md (preferred_for_speed): New attribu

[PATCH 4/5] Remove recog_data.enabled_alternatives

2014-10-17 Thread Richard Sandiford
After the previous patches, this one gets rid of recog_data.enabled_alternatives and its one remaining use. Richard gcc/ * recog.h (recog_data_d): Remove enabled_alternatives. * recog.c (extract_insn): Don't set it. * reload.c (find_reloads): Call get_enabled_alternatives

[PATCH 3/5] Pass an alternative_mask to constrain_operands

2014-10-17 Thread Richard Sandiford
After the previous patch there are cases where we want to constrain operands to any enabled alternative and cases where we want to also take size/speed preferences into account. The former applies when constraining an existing instruction (which might originally have been in a block with a differe

[PATCH 2/5] Add preferred_for_{size,speed} attributes

2014-10-17 Thread Richard Sandiford
This is the main patch, to add new preferred_for_size and preferred_for_speed attributes that can be used to selectively disable alternatives when optimising for size or speed. As explained in the docs, the new attributes are just optimisation hints and it is possible that "size-only" alternatives

[PATCH 1/5] Add recog_constrain_insn

2014-10-17 Thread Richard Sandiford
This patch just adds a new utility function called recog_constrain_insn, to go alongside the existing recog_constrain_insn_cached. Note that the extract_insn in lra.c wasn't used when checking is disabled. The function just moved on to the next instruction straight away. Richard gcc/ *

[PATCH 0/5] Add preferred_for_{size,speed} attributes

2014-10-17 Thread Richard Sandiford
This patch implements the approach I suggested in: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00371.html for fixing PR61360. To recap, the problem is with the use of "enabled" in the i386.md pattern: (define_insn "*float2_sse" [(set (match_operand:MODEF 0 "register_operand" "=f,x,x")

Re: [PARCH 2/2, x86, PR63534] Fix darwin bootstrap

2014-10-17 Thread Evgeny Stupachenko
Yes, unconditionally. If pic_reg is unused, RA will allocate a hard register for it and treat it as free, DCE after reload will delete SET_GOT. On Fri, Oct 17, 2014 at 6:20 PM, Jakub Jelinek wrote: > On Fri, Oct 17, 2014 at 06:16:41PM +0400, Evgeny Stupachenko wrote: >> Hi, >> >> Some instruction

Re: [PATCH, x86, 63534] Fix '-p' profile for 32 bit PIC mode

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 06:30:42PM +0400, Evgeny Stupachenko wrote: > Hi, > > The patch fixes profile in 32bits PIC mode (only -p option affected). > > x86 bootstrap, make check passed > > spec2000 o2 -p train data on Corei7: > CINT -5% > CFP +1,5 > compared to a compiler before "enabling ebx".

Re: [PATCH 0/17] KASan 4.9 backport

2014-10-17 Thread Yury Gribov
On 10/17/2014 06:18 PM, Jakub Jelinek wrote: On Fri, Oct 17, 2014 at 06:15:11PM +0400, Yury Gribov wrote: On 10/17/2014 05:49 PM, Jakub Jelinek wrote: Plus if you add misalign tests... Sure, can do this on Monday. Ok, thanks. - bool use_calls = ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD <

[PATCH, x86, 63534] Fix '-p' profile for 32 bit PIC mode

2014-10-17 Thread Evgeny Stupachenko
Hi, The patch fixes profile in 32bits PIC mode (only -p option affected). x86 bootstrap, make check passed spec2000 o2 -p train data on Corei7: CINT -5% CFP +1,5 compared to a compiler before "enabling ebx". There is a potential performance improve after the patch applied suggested by Jakub: h

Re: [PARCH 2/2, x86, PR63534] Fix darwin bootstrap

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 06:16:41PM +0400, Evgeny Stupachenko wrote: > Hi, > > Some instructions (like one in PR63534) could have hidden use of PIC register. > Therefore we need to leave SET_GOT not deleted till reload completed. > The patch prevents SET_GOT from deleting while PIC register is pseu

Re: [PATCH i386 AVX512 Boostrap] [80/n] Extend expand_sse2_mulvxdi3.

2014-10-17 Thread Uros Bizjak
On Fri, Oct 17, 2014 at 4:25 PM, Kirill Yukhin wrote: > Hello, > This is fix for bootstrap failure. > > Is it OK? > > gcc/ > * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Refactor > conditions to fix bootstrap. Well, OK. Uros.

Re: [PATCH i386 AVX512 Boostrap] [80/n] Extend expand_sse2_mulvxdi3.

2014-10-17 Thread Kirill Yukhin
Hello, This is fix for bootstrap failure. Is it OK? gcc/ * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Refactor conditions to fix bootstrap. -- Thanks, K diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7040200..3ddaf3d 100644 --- a/gcc/config/i386/i386.c +

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 06:02:11PM +0400, Ilya Verbin wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c++/examples-4/e.53.2.C > @@ -0,0 +1,43 @@ > +// { dg-do run } > +// { dg-require-effective-target offload_device } Well, this test actually relies not only offload_device, but also on no

Re: [PATCH 0/17] KASan 4.9 backport

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 06:15:11PM +0400, Yury Gribov wrote: > On 10/17/2014 05:49 PM, Jakub Jelinek wrote: > > Plus if you add misalign tests... > > Sure, can do this on Monday. Ok, thanks. > > - bool use_calls = ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD < INT_MAX > >-&& asan_num_accesses >

[PARCH 2/2, x86, PR63534] Fix darwin bootstrap

2014-10-17 Thread Evgeny Stupachenko
Hi, Some instructions (like one in PR63534) could have hidden use of PIC register. Therefore we need to leave SET_GOT not deleted till reload completed. The patch prevents SET_GOT from deleting while PIC register is pseudo. Is it ok? ChangeLog: 2014-10-17 Evgeny Stupachenko PR targe

Re: [PATCH 0/17] KASan 4.9 backport

2014-10-17 Thread Yury Gribov
On 10/17/2014 05:49 PM, Jakub Jelinek wrote: > Plus if you add misalign tests... Sure, can do this on Monday. > - bool use_calls = ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD < INT_MAX -&& asan_num_accesses >= ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD; + bool use_calls += ASAN_INSTRUMENTA

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-17 Thread Yuri Rumyantsev
Richard, I reworked the patch as you proposed, but I didn't understand what did you mean by: >So please rework the patch so critical edges are always handled >correctly. In current patch flag_force_vectorize is used (1) to reject phi nodes with more than 2 arguments; (2) to reject basic blocks w

[PARCH 1/2, x86, PR63534] Fix darwin bootstrap

2014-10-17 Thread Evgeny Stupachenko
Hi, The patch fixes 1st fail in darwin bootstarp. When PIC register is pseudo we don't need to init it after setjmp or non local goto. Is it ok? ChangeLog: 2014-10-17 Evgeny Stupachenko PR target/63534 * config/i386/i386.c (builtin_setjmp_receiver): Delete. (nonlocal

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

2014-10-17 Thread Ilya Verbin
On 15 Oct 17:35, Jakub Jelinek wrote: > But we do want to test them with host fallback, which those lines preclude. > Just a single dg-require-effective-target offload_device guarded test (which > there necessarily is, e.g. the 57.* ones) should be sufficient for your > purposes (if you want to dif

Re: [PATCH 0/17] KASan 4.9 backport

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 05:45:17PM +0400, Yury Gribov wrote: > On 10/17/2014 04:12 PM, Jakub Jelinek wrote: > >I had a brief look at what ended up on the branch in the end, and > >from what I understand, the 4.9 libasan.so has > >__asan_report_store_n and __asan_report_load_n entry points, but does

Re: [PATCH 0/17] KASan 4.9 backport

2014-10-17 Thread Yury Gribov
On 10/17/2014 04:12 PM, Jakub Jelinek wrote: I had a brief look at what ended up on the branch in the end, and from what I understand, the 4.9 libasan.so has __asan_report_store_n and __asan_report_load_n entry points, but does not have any __asan_loadN/__asan_reportN entrypoints (neither 1/2/4/8

[PATCH] Fix for PR63569

2014-10-17 Thread Martin Liška
Hello. Following patch fixes PR63569. Bootstrap executed on ppc64-linux and no regression seen on x86_64-pc-linux. Ready for trunk? Thank you, Martin gcc/testsuite/ChangeLog: 2014-10-17 Martin Liska * gcc.dg/ipa/ipa-icf-31.c: New test. gcc/ChangeLog: 2014-10-17 Martin Liska

Re: [PATCH] support ggc hash_map and hash_set

2014-10-17 Thread Alan Lawrence
Sorry, somehow I missed this email. Yes, that appears to have fixed it! Thank you very much, Alan Trevor Saunders wrote: On Tue, Sep 09, 2014 at 03:37:26PM +0100, Alan Lawrence wrote: Following this, we're seeing ICEs in tests in gcc.dg/pch.exp and g++.dg/pch.exp, with cross-builds (hosted on

Re: [PATCH] Simple improvement for predicate computation in if-convert phase.

2014-10-17 Thread Yuri Rumyantsev
Jeff, I prepared another patch that includes test-case as you requested. Below are answers on your questions. > First, for the benefit of anyone trying to understand what you're doing, > defining what "cd equivalent" means would be >helpful. I added the following comment to function: fwe

Re: [PATCH] Don't expand string/memory builtins if ASan is enabled.

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 05:01:33PM +0400, Yury Gribov wrote: > On 10/17/2014 04:24 PM, Jakub Jelinek wrote: > >>+/* Returns TRUE if given FCODE corresponds to string or memory builtin > >>function. > >>+ */ > >>+ > >>+static inline bool > >>+is_memory_builtin (enum built_in_function fcode) > >>+{

Re: [PATCH] Don't expand string/memory builtins if ASan is enabled.

2014-10-17 Thread Yury Gribov
On 10/17/2014 04:24 PM, Jakub Jelinek wrote: +/* Returns TRUE if given FCODE corresponds to string or memory builtin function. + */ + +static inline bool +is_memory_builtin (enum built_in_function fcode) +{ + return fcode <= BUILT_IN_STRSTR && fcode >= BUILT_IN_BCMP; This is too fragile and u

Re: [PATCH i386 AVX512] [75/n] Update vec_init.

2014-10-17 Thread Uros Bizjak
On Fri, Oct 17, 2014 at 2:57 PM, Jakub Jelinek wrote: > On Fri, Oct 17, 2014 at 04:28:12PM +0400, Kirill Yukhin wrote: >> > I wonder whether for these modes it can ever be beneficial to build them >> > through interleaves/concatenations etc., if it wouldn't be better to build >> > them by storing

Re: [PATCH i386 AVX512] [75/n] Update vec_init.

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 04:28:12PM +0400, Kirill Yukhin wrote: > > I wonder whether for these modes it can ever be beneficial to build them > > through interleaves/concatenations etc., if it wouldn't be better to build > > them by storing all values into memory and just reading it back. > I've trie

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-17 Thread Jakub Jelinek
On Wed, Oct 15, 2014 at 01:40:49PM +0200, Richard Biener wrote: > > This adds a bunch of simplifications with constant operands > or ones that simplify to constants, such as a + 0, x * 1. > > It's a patch mainly to get a few questions answered for further > pattern merges: > > - The branch uses

Re: [PATCH][1/n] Merge from match-and-simplify, infrastructure

2014-10-17 Thread Jakub Jelinek
On Wed, Oct 15, 2014 at 01:39:33PM +0200, Richard Biener wrote: > 2014-10-15 Richard Biener Shouldn't Prathamesh be listed as co-author of the patch? > + fprintf (f, "case SSA_NAME:\n"); > + fprintf (f, "{\n"); > + fprintf (f, "gimple def_stmt = SSA_NAME_DEF_STMT (%s);\n", >

Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.

2014-10-17 Thread Uros Bizjak
On Fri, Oct 17, 2014 at 2:32 PM, Kirill Yukhin wrote: > Hello Uroš, > On 16 Oct 14:29, Uros Bizjak wrote: >> > + if (mode == V4DImode) >> > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2)); >> > + else if (mode == V2DImode) >> > + emit_insn (gen_avx512dq_mulv

[wwwdocs] Add recent C++ changes to gcc-5/changes.html

2014-10-17 Thread Jonathan Wakely
Committed to CVS. ? htdocs/gcc-5/.changes.html.swp Index: htdocs/gcc-5/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v retrieving revision 1.18 diff -u -r1.18 changes.html --- htdocs/gcc-5/changes.html 15 Oct 2

Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.

2014-10-17 Thread Kirill Yukhin
Hello Uroš, On 16 Oct 14:29, Uros Bizjak wrote: > > + if (mode == V4DImode) > > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2)); > > + else if (mode == V2DImode) > > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2)); > > Should this be v2di ? Right, copy-a

Re: [PATCHv4][Kasan] Allow to override Asan shadow offset from command line

2014-10-17 Thread Ian Lance Taylor
Jakub Jelinek writes: > Not sure if there aren't extra steps to make strtoull prototype available > in system.h, libiberty.h etc. for systems that don't have strtoull in their > headers. See the #if defined(HAVE_DECL_XXX) && !HAVE_DECL_XXX lines in include/libiberty.h. Although strtol is miss

[committed] Fix ChangeLog entry

2014-10-17 Thread Kyrill Tkachov
Hi all, I've committed the attached as obvious to fix up a whitespace issue in a patch I committed recently. This is r216399. Cheers, Kyrilldiff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e35d69b..5a09e3e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -136,8 +136,8 @@ * doc/install.texi

Re: [PATCH][1/n] Merge from match-and-simplify, public API

2014-10-17 Thread Jakub Jelinek
On Wed, Oct 15, 2014 at 01:40:07PM +0200, Richard Biener wrote: > 2014-10-15 Richard Biener > > * gimple-fold.h (gimple_build): Declare various overloads. > (gimple_simplify): Likewise. > (gimple_convert): Re-implement in terms of gimple_build. > * gimple-fold.c (gimple_

Re: [PATCH i386 AVX512] [75/n] Update vec_init.

2014-10-17 Thread Kirill Yukhin
Hello Jakub, On 15 Oct 18:23, Jakub Jelinek wrote: > On Thu, Oct 09, 2014 at 04:13:25PM +0400, Kirill Yukhin wrote: > > --- a/gcc/config/i386/i386.c > > +++ b/gcc/config/i386/i386.c > > @@ -39821,6 +39823,9 @@ ix86_expand_vector_init_duplicate (bool mmx_ok, > > enum machine_mode mode, > >g

Re: [PATCH] Don't expand string/memory builtins if ASan is enabled.

2014-10-17 Thread Jakub Jelinek
On Fri, Oct 17, 2014 at 03:45:52PM +0400, Maxim Ostapenko wrote: > Patch also changes logic in asan_mem_ref_hash updating. I eliminated memory > ref access size from hash computing, so all accesses for same memory > reference have the same hash. Updating of asan_mem_ref_hash occurs only if > new ac

Re: [libstdc++ PATCH] Implement the Library Fundamentals v1 variable templates for type traits

2014-10-17 Thread Jonathan Wakely
On 16/10/14 23:04 +0300, Ville Voutilainen wrote: Argh, needed to do uglification, and formatting fixes. Also renamed the Dummy types in tests to something a bit more descriptive. I'm not using the tr2 test types because the test types in these tests are amalgamations of multiple properties to ke

[v3 patch] partially fix testsuite/27_io/headers/cstdio/types_std.cc

2014-10-17 Thread Jonathan Wakely
testsuite/27_io/headers/cstdio/types_std.cc FAILs on dragonflybsd: /mnt/gcc-src/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc:25:13: error: aggregate 'FILE gnu::f' has incomplete type and cannot be defined /mnt/gcc-src/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc:26:13: err

Re: [PATCH 0/17] KASan 4.9 backport

2014-10-17 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:34:35PM +0400, Yury Gribov wrote: > Hi all, > > As discussed in https://gcc.gnu.org/ml/gcc/2014-09/msg00234.html , this > patchset backports mainline patches necessary for Kernel ASan in GCC 4.9 > (gcc-4_9-branch). The patcheset consists of > * Asan headers installation

[PATCH] PR63442 ICE with ubsan/overflow-int128.c test on AArch64

2014-10-17 Thread Jiong Wang
the cause should be one minor bug in prepare_cmp_insn. the last mode parameter "pmode" of "prepare_cmp_insn" should match the mode of the first parameter "x", while during the recursive call of "prepare_cmp_insn", x is with mode of targetm.libgcc_cmp_return_mode () while pmode is assign to word

  1   2   >