How can I tune gcc to move up simple common subexpression?

2013-11-08 Thread Konstantin Vladimirov
Hi, Consider simple code: typedef struct { unsigned prev; unsigned next; } foo_t; void foo( unsigned x, unsigned y) { foo_t *ptr = (foo_t *)((void *)x); if (y != 0) { ptr->prev = y; ptr->next = x; } else { ptr->prev = 0; /* or ex

Re: powerpc64 bootstrap broken due to libsanitizer merge from upstream

2013-11-08 Thread Richard Biener
On Fri, Nov 8, 2013 at 5:49 AM, Peter Bergner wrote: > On Fri, 2013-11-08 at 00:03 +0100, Steven Bosscher wrote: >> powerpc64-linux bootstrap is broken by the libsanitizer merge: > > I already reported the failures here: > > http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00312.html > > It seems

Re: How can I tune gcc to move up simple common subexpression?

2013-11-08 Thread Richard Biener
On Fri, Nov 8, 2013 at 10:28 AM, Konstantin Vladimirov wrote: > Hi, > > Consider simple code: > > typedef struct > { > unsigned prev; > unsigned next; > } foo_t; > > void > foo( unsigned x, unsigned y) > { > foo_t *ptr = (foo_t *)((void *)x); > > if (y != 0) > { > ptr-

Re: Architecture maintainers: please define TARGET_ATOMIC_ASSIGN_EXPAND_FENV

2013-11-08 Thread Andreas Schwab
"Joseph S. Myers" writes: > The test gcc.dg/atomic/c11-atomic-exec-5.c will indicate if this is > working correctly for your architecture, as long as your system supports > pthreads (required to run that test). If any of the other > c11-atomic-exec-* tests are failing, you should fix that fir

m68k optimisations?

2013-11-08 Thread Fredrik Olsson
I have this simple functions: int sum_vec(int c, ...) { va_list argptr; va_start(argptr, c); int sum = 0; while (c--) { int x = va_arg(argptr, int); sum += x; } va_end(argptr); return sum; } When compiling with "-fomit-frame-pointer -Os -march=68000 -c

Re: Architecture maintainers: please define TARGET_ATOMIC_ASSIGN_EXPAND_FENV

2013-11-08 Thread Joseph S. Myers
On Fri, 8 Nov 2013, Andreas Schwab wrote: > "Joseph S. Myers" writes: > > > The test gcc.dg/atomic/c11-atomic-exec-5.c will indicate if this is > > working correctly for your architecture, as long as your system supports > > pthreads (required to run that test). If any of the other > > c11-a

DWARF and atomic types

2013-11-08 Thread Joseph S. Myers
I realised that the C11 atomics changes didn't do anything to record atomic types as such in DWARF debug info - then found that DWARF4 didn't provide a way to specify the C11 _Atomic qualifier at all. Could someone working with the DWARF committee get an appropriate tag into the next version o

Re: Architecture maintainers: please define TARGET_ATOMIC_ASSIGN_EXPAND_FENV

2013-11-08 Thread Andreas Schwab
"Joseph S. Myers" writes: > On Fri, 8 Nov 2013, Andreas Schwab wrote: > >> "Joseph S. Myers" writes: >> >> > The test gcc.dg/atomic/c11-atomic-exec-5.c will indicate if this is >> > working correctly for your architecture, as long as your system supports >> > pthreads (required to run that te

Re: Architecture maintainers: please define TARGET_ATOMIC_ASSIGN_EXPAND_FENV

2013-11-08 Thread Joseph S. Myers
On Fri, 8 Nov 2013, Andreas Schwab wrote: > > The tests do not require sync_long_long_runtime. > > True, but they require __atomic_store_16, which is generally not > available. See my comments at - my inclination is that the code resolv

LRA: check_rtl modifies RTL instruction stream

2013-11-08 Thread Robert Suchanek
Hi Vladimir, I have been looking into regression testing for mips16 with LRA enabled and tried to understand and solve some ICEs. It was found that in a narrowed testcase (attached below) that there are two issues: 1. In the back end - pattern not recognized and hence ICE. 2. In the LRA - a bug

Re: [RFC] Target compilation for offloading

2013-11-08 Thread Jakub Jelinek
On Fri, Nov 08, 2013 at 06:26:53PM +0400, Andrey Turetskiy wrote: > Thanks. > And a few questions about compiler options: > 1) You've mentioned two options for offloading: > -foffload-target= - to specify targets for offloading > -foffload-target-= - to specify > compiler options for differ

Re: [RFC] Target compilation for offloading

2013-11-08 Thread Andrey Turetskiy
Thanks. And a few questions about compiler options: 1) You've mentioned two options for offloading: -foffload-target= - to specify targets for offloading -foffload-target-= - to specify compiler options for different targets Do we really need two options to set up offloading? What do you th

[gomp4] libgomp.c/target-1.c failing in fn2's GOMP_target_update

2013-11-08 Thread Thomas Schwinge
Hi! On the gomp-4_0-branch, when using the ID 257 device (host fallback but with non-shared memory), I see the libgomp.c/target-1.c test fail in fn2's GOMP_target_update call: libgomp: Trying to update [0x601a80..0x601a84) object that is not mapped Is this a known issue? (I have not yet sta

Re: [gomp4] libgomp.c/target-1.c failing in fn2's GOMP_target_update

2013-11-08 Thread Jakub Jelinek
On Fri, Nov 08, 2013 at 04:29:03PM +0100, Thomas Schwinge wrote: > > On the gomp-4_0-branch, when using the ID 257 device (host fallback but > with non-shared memory), I see the libgomp.c/target-1.c test fail in > fn2's GOMP_target_update call: > > libgomp: Trying to update [0x601a80..0x601a8

Vectorizer/alignment

2013-11-08 Thread Hendrik Greving
The code for a simple loop like for (i = 0; i < LENGTH-1; i++) { g_c[i] = g_a[i] + g_b[i]; } looks good for g++ (4.9.0 20131028 (experimental)) (-O3 core-avx2) .L2: vmovdqa g_a(%rax), %ymm0 # 26 *movv8si_internal/2 [length = 8] vpaddd g_b(%rax), %ymm0, %ymm0 # 27 *addv8si3/2 [length = 8]

The Linux binutils 2.24.51.0.1 is released

2013-11-08 Thread H.J. Lu
It is also available as linux/release/2.24.51.0.1 tag at https://sourceware.org/git/?p=binutils-gdb.git;a=summary H.J. --- This is the beta release of binutils 2.24.51.0.1 for Linux, which is based on binutils 2013 1106 master branch on sourceware.org plus various changes. It is purely for Linux

Re: The Linux binutils 2.24.51.0.1 is released

2013-11-08 Thread H.J. Lu
I renamed the release tag to hjl/linux/release/2.24.51.0.1 H.J. On Fri, Nov 8, 2013 at 9:25 AM, H.J. Lu wrote: > It is also available as linux/release/2.24.51.0.1 tag at > > https://sourceware.org/git/?p=binutils-gdb.git;a=summary > > > H.J. > --- > This is the beta release of binutils 2.24.51.0

Re: Vectorizer/alignment

2013-11-08 Thread Richard Biener
Hendrik Greving wrote: >The code for a simple loop like > >for (i = 0; i < LENGTH-1; i++) { >g_c[i] = g_a[i] + g_b[i]; >} > >looks good for g++ (4.9.0 20131028 (experimental)) (-O3 core-avx2) > >.L2: >vmovdqa g_a(%rax), %ymm0 # 26 *movv8si_internal/2 [length = 8] >vpaddd g_b(%rax), %ymm0,

Re: How can I tune gcc to move up simple common subexpression?

2013-11-08 Thread Jeff Law
On 11/08/13 02:28, Konstantin Vladimirov wrote: typedef struct { unsigned prev; unsigned next; } foo_t; void foo( unsigned x, unsigned y) { foo_t *ptr = (foo_t *)((void *)x); if (y != 0) { ptr->prev = y; ptr->next = x; } else {

Re: LRA: check_rtl modifies RTL instruction stream

2013-11-08 Thread Vladimir Makarov
On 11/8/2013, 9:13 AM, Robert Suchanek wrote: Hi Vladimir, I have been looking into regression testing for mips16 with LRA enabled and tried to understand and solve some ICEs. It was found that in a narrowed testcase (attached below) that there are two issues: 1. In the back end - pattern not r

[RFC] Replace Java with Go in default languages

2013-11-08 Thread Jeff Law
GCJ has, IMHO, moved from active development into a deep maintenance mode.I suspect this is largely due to the change of focus of key developers to OpenJDK and other projects. GCJ played a role in bootstrapping OpenJDK, both technically and politically and had OpenJDK not happened, I su

Re: [RFC] Replace Java with Go in default languages

2013-11-08 Thread Diego Novillo
On Fri, Nov 8, 2013 at 5:21 PM, Jeff Law wrote: > Thoughts or comments? I fully support this. I've been wanting to remove Java from the default bootstrap for a long time now. Bringing in Go seems like a good idea as well. Diego.

Re: [RFC] Replace Java with Go in default languages

2013-11-08 Thread Ian Lance Taylor
On Fri, Nov 8, 2013 at 2:21 PM, Jeff Law wrote: > > So instead of proposing that we just remove Java from the default languags, > I propose that we replace Java with Go. I'm certainly in favor of removing Java from the set of default languages. I'm less sure about adding Go. Right now Go does n

Re: [RFC] Detect most integer overflows.

2013-11-08 Thread Geert Bosch
On Oct 29, 2013, at 05:41, Richard Biener wrote: > For reference those > (http://clang.llvm.org/docs/LanguageExtensions.html) look like > > if (__builtin_umul_overflow(x, y, &result)) >return kErrorCodeHackers; > > which should be reasonably easy to support in GCC (if you factor out > gen

Re: [RFC] Detect most integer overflows.

2013-11-08 Thread Ondřej Bílka
On Fri, Nov 08, 2013 at 08:31:38PM -0500, Geert Bosch wrote: > > On Oct 29, 2013, at 05:41, Richard Biener wrote: > > > For reference those > > (http://clang.llvm.org/docs/LanguageExtensions.html) look like > > > > if (__builtin_umul_overflow(x, y, &result)) > >return kErrorCodeHackers; >