Re: Fix PR51298, libgomp barrier failure

2011-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2011 at 10:12:09AM +1030, Alan Modra wrote: --- libgomp/config/linux/bar.c(revision 181718) +++ libgomp/config/linux/bar.c(working copy) @@ -36,18 +36,15 @@ gomp_barrier_wait_end (gomp_barrier_t *b if (__builtin_expect ((state 1) != 0, 0)) { /*

Re: Use atomics in libgomp mutex

2011-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2011 at 10:37:09AM +1030, Alan Modra wrote: On Mon, Nov 28, 2011 at 09:27:20AM +1030, Alan Modra wrote: This is the mutex part. Depends on http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02454.html for MEMMODEL_* values. Arrgh, I posted the wrong patch. I know it needs

Re: Use atomics in libgomp mutex

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 09:15:02AM +0100, Jakub Jelinek wrote: On Mon, Nov 28, 2011 at 10:37:09AM +1030, Alan Modra wrote: 14 A flush region without a list is implied at the following locations: 15 • During a barrier region. 16 • At entry to and exit from parallel, critical, and ordered

Re: Fix PR51298, libgomp barrier failure

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 09:13:27AM +0100, Jakub Jelinek wrote: On Mon, Nov 28, 2011 at 10:12:09AM +1030, Alan Modra wrote: --- libgomp/config/linux/bar.c (revision 181718) +++ libgomp/config/linux/bar.c (working copy) @@ -36,18 +36,15 @@ gomp_barrier_wait_end (gomp_barrier_t *b

Add __stpncpy_chk builtin support

2011-11-28 Thread Romain Geissler
Hi, The current trunk have no support for the __stpncpy_chk function. As the latest OS X (10.7 aka Lion) now defines stpncpy as a call to builtin__stpncpy_chk for GNUC compliant compiler, the following code won't link: #include string.h int main(){ char string[10];

[RFA/ARM] Add an integer pipeline description for Cortex-A15

2011-11-28 Thread Matthew Gretton-Dann
All, The attached patch adds a integer pipeline description for Cortex-A15. Although not dependent on my testing has been done on top of Sameera's Deshpande's A15 Prologue/Epilogue patches (see: http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00856.html and following). Testing on some popular

Re: [Patch, Fortran] MOVE_ALLOC fixes

2011-11-28 Thread Tobias Burnus
Dear all, attached is an updated patch, I hadn't considered that the declared type of polymorphic arguments could be different. The middle end was not happy about: to = from where to and from where different class containers. I was considering to force the assignment (via

[v3] libstdc++/51288

2011-11-28 Thread Paolo Carlini
Hi, when I implemented get/put_money I gorgot about the sentry, oops. Tested x86_64-linux, committed to mainline. Paolo. / 2011-11-28 Paolo Carlini paolo.carl...@oracle.com PR libstdc++/51288 * include/std/iomanip (get_money, put_money): Use sentry.

[Patch, Fortran] PR51308 - fix bogus c_null_ptr error

2011-11-28 Thread Tobias Burnus
gfortran printed an error that c_null_ptr couldn't be SAVE an PARAMETER at the same time; removing the SAVE attribute causes an error that a BIND(C) variable may not be a PARAMETER, thus that has to be fixed as well. (Patch based on the one of Steven Build and regtested on x86-64-linux. OK

Re: [ARM] Rewrite ldrex/strex support for atomic optabs

2011-11-28 Thread David Gilbert
On 23 November 2011 23:43, Richard Henderson r...@redhat.com wrote: This transformation is quite a bit more dramatic than the other ports because ARM was not splitting the code sequences post-reload.  Indeed, the failure to split resulted in a distinctly odd coding style where fake output

Ping * [Patch] Take 2: Move Objective-C runtime flags to modern options system.

2011-11-28 Thread Iain Sandoe
Hi Joseph, Mike has OK'd this ... http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01672.html .. from the ObjC and Darwin points of view (and it implements your suggested changes from the review of version 1). Is it now OK for trunk? thanks Iain On 14 Nov 2011, at 20:30, Iain Sandoe wrote:

Re: Fix PR51298, libgomp barrier failure

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 08:09:01PM +1030, Alan Modra wrote: On Mon, Nov 28, 2011 at 09:13:27AM +0100, Jakub Jelinek wrote: On Mon, Nov 28, 2011 at 10:12:09AM +1030, Alan Modra wrote: --- libgomp/config/linux/bar.c(revision 181718) +++ libgomp/config/linux/bar.c(working copy) @@

Re: [Patch, Fortran] PR51308 - fix bogus c_null_ptr error

2011-11-28 Thread Tobias Burnus
On 11/28/2011 02:37 PM, Tobias Burnus wrote: Build and regtested on x86-64-linux. OK for the trunk? Steve approved the patch in the PR; thus, I have committed it as Rev. 181778. Tobias

[PATCH] Re: [v3] updated atomic configury

2011-11-28 Thread Andrew MacLeod
On 11/22/2011 03:48 PM, Joseph S. Myers wrote: On Tue, 22 Nov 2011, Andrew MacLeod wrote: It certainly does have those types, as typedefs defined inuchar.h for the same types as uint_least16_t and uint_least32_t. Andstdatomic.h is also required to define ATOMIC_CHAR16_T_LOCK_FREE and

Re: [build] Cleanup rs6000/t-ppccomm configurations (PR other/51022)

2011-11-28 Thread Rainer Orth
Alan Modra amo...@gmail.com writes: On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote: I was hoping that other targets affected by the patch would test it as well. powerpc-linux and powerpc64-linux look good. Thanks for the confirmation. However, Andreas Tobler pointed out in

Re: Fix libgomp semaphores

2011-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2011 at 09:23:43AM +1030, Alan Modra wrote: + int count = *sem; + + while ((count 0x7fff) != 0) +{ + int oldval = count; + __atomic_compare_exchange_4 (sem, oldval, count - 1, +false, MEMMODEL_ACQUIRE, MEMMODEL_RELAXED);

Re: [libitm, build] Clear hardware capabilities on libitm.so with Sun ld

2011-11-28 Thread Rainer Orth
Richard Henderson r...@redhat.com writes: On 11/21/2011 05:53 AM, Rainer Orth wrote: The libitm execution tests are currently failing on Solaris 10 and up with Sun as/ld: ld.so.1: cancel.exe: fatal: /var/gcc/regression/trunk/11-gcc/build/i386-pc-solaris2.11/./libitm/.libs/libitm.so.0:

Re: Ping * [Patch] Take 2: Move Objective-C runtime flags to modern options system.

2011-11-28 Thread Joseph S. Myers
On Mon, 28 Nov 2011, Iain Sandoe wrote: Hi Joseph, Mike has OK'd this ... http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01672.html .. from the ObjC and Darwin points of view (and it implements your suggested changes from the review of version 1). Is it now OK for trunk? OK. --

RE: Re: [Ping] RE: CR16 Port addition

2011-11-28 Thread Joseph S. Myers
You still have libgcc source files under gcc/config/ (cr16-libgcc.s, divmodhi3.c). You still have libgcc-related settings / makefile targets in gcc/config/cr16/t-cr16. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Re: [v3] updated atomic configury

2011-11-28 Thread Joseph S. Myers
On Mon, 28 Nov 2011, Andrew MacLeod wrote: OK, here's a reworked patch. This bootstraps but there is a regression... one set of PCH tests fail in a very odd way. I've investigated it and it turns out that for some reason, ptr_type_node doesn't always have it size set if code isn't being

Re: Go patch committed: Multiplex goroutines onto OS threads

2011-11-28 Thread Uros Bizjak
Hello! This patch changes the Go library to multiplex goroutines onto operating system threads. Previously, each new goroutine ran in a separate thread. That is inefficient for programs with lots of goroutines. This patch changes the library such that it runs a certain numbers of threads,

[PATCH] PR c++/51289 - ICE with alias template for bound template

2011-11-28 Thread Dodji Seketeli
Hello, Consider this example: templatetypename a, template typename, typename class b struct foo { template typename t using type = ba, t; template typename t ba, t funca() {} template typename t typet funcb() {}//#1 }; In #1, when

Re: [ARM] Rewrite ldrex/strex support for atomic optabs

2011-11-28 Thread Richard Henderson
On 11/28/2011 06:01 AM, David Gilbert wrote: Hi Rchard, Can you explain the code: + if (mod_f != MEMMODEL_RELAXED) +emit_label (label2); + + arm_post_atomic_barrier (mod_s); + + if (mod_f == MEMMODEL_RELAXED) +emit_label (label2); +} in the case of the existing __sync_*

[PATCH v2 0/5] Convert Sparc to atomic optabs

2011-11-28 Thread Richard Henderson
Changes v1-v2: * DImode fixes. * Use the new atomic_test_and_set optab for LDSTUB. * Change -mmmodel to -mmemory-model and document it. r~ Richard Henderson (5): sparc: Convert to mem_thread_fence. sparc: Convert to atomic_load/store. sparc: Convert to atomic_compare_and_swap.

[PATCH 1/5] sparc: Convert to mem_thread_fence.

2011-11-28 Thread Richard Henderson
--- gcc/config/sparc/predicates.md |4 ++ gcc/config/sparc/sparc-protos.h |2 + gcc/config/sparc/sparc.c| 47 +++ gcc/config/sparc/sync.md| 79 --- 4 files changed, 118 insertions(+), 14 deletions(-) diff --git

[PATCH 2/5] sparc: Convert to atomic_load/store.

2011-11-28 Thread Richard Henderson
--- gcc/config/sparc/predicates.md |5 +++ gcc/config/sparc/sparc.md |1 + gcc/config/sparc/sync.md | 59 3 files changed, 65 insertions(+), 0 deletions(-) diff --git a/gcc/config/sparc/predicates.md b/gcc/config/sparc/predicates.md

[PATCH 4/5] sparc: Convert to atomic_exchange.

2011-11-28 Thread Richard Henderson
--- gcc/config/sparc/sync.md | 90 +++-- 1 files changed, 30 insertions(+), 60 deletions(-) diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md index d7066b0..be8c4c4 100644 --- a/gcc/config/sparc/sync.md +++ b/gcc/config/sparc/sync.md @@

[PATCH 5/5] sparc: Add -mmemory-model command-line option.

2011-11-28 Thread Richard Henderson
--- gcc/config/sparc/sparc-opts.h | 10 + gcc/config/sparc/sparc.c | 48 ++- gcc/config/sparc/sparc.opt| 22 gcc/doc/invoke.texi | 74 ++-- 4 files changed, 134 insertions(+), 20 deletions(-)

[PATCH 3/5] sparc: Convert to atomic_compare_and_swap.

2011-11-28 Thread Richard Henderson
Aid the backend with mem_noofs_operand and a constraint to match. --- gcc/config/sparc/constraints.md |5 +++- gcc/config/sparc/predicates.md |4 +++ gcc/config/sparc/sparc-protos.h |2 +- gcc/config/sparc/sparc.c| 56 ---

[PATCH] Copy over TREE_THIS_VOLATILE during forwprop (PR tree-optimization/50078)

2011-11-28 Thread Jakub Jelinek
Hi! On the following testcase the volatile load/store are optimized away. IMHO this is a bug in forwprop, which replaces tmp_Y = nonvolvar[arg_X]; MEM[(volatile ...*)tmp_Y] ={v} ...; with MEM[(volatile ...*)nonvolvar][tmp_Y] ={v} ...; where the LHS is no longer TREE_THIS_VOLATILE like

[PATCH] Clear EDGE_CROSSING flag when redirecting edge succ to EXIT_BLOCK_PTR (PR middle-end/50907)

2011-11-28 Thread Jakub Jelinek
Hi! The checking code insists on edges to EXIT_BLOCK_PTR (and from ENTRY_BLOCK_PTR) to have no EDGE_CROSSING bit set, so if we have a bb in second partition jumping to first partition's entry block and convert_jumps_to_returns changes it to simple_return, we need to drop the EDGE_CROSSING bit.

[PATCH] When making var non-addressable, drop var ={v} {CLOBBER} stmts (PR debug/50317)

2011-11-28 Thread Jakub Jelinek
Hi! As discussed in the PR, SSA_NAME ={v} {CLOBBER} stmts are undesirable at least for the debug info, we really don't need to mark there the end of scope in the IL, the debug info records the ranges of the scopes and if the clobber gets scheduled before some insn we get unnecessarily pessimistic

Re: [PATCH] Clear EDGE_CROSSING flag when redirecting edge succ to EXIT_BLOCK_PTR (PR middle-end/50907)

2011-11-28 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/28/11 11:40, Jakub Jelinek wrote: Hi! The checking code insists on edges to EXIT_BLOCK_PTR (and from ENTRY_BLOCK_PTR) to have no EDGE_CROSSING bit set, so if we have a bb in second partition jumping to first partition's entry block and

Re: [PATCH] Copy over TREE_THIS_VOLATILE during forwprop (PR tree-optimization/50078)

2011-11-28 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/28/11 11:36, Jakub Jelinek wrote: Hi! On the following testcase the volatile load/store are optimized away. IMHO this is a bug in forwprop, which replaces tmp_Y = nonvolvar[arg_X]; MEM[(volatile ...*)tmp_Y] ={v} ...; with MEM[(volatile

Re: [PATCH] Re: [v3] updated atomic configury

2011-11-28 Thread Andrew MacLeod
On 11/28/2011 11:42 AM, Joseph S. Myers wrote: On Mon, 28 Nov 2011, Andrew MacLeod wrote: That would be why cppbuiltin.c, defining __SIZEOF_POINTER__, needs to use the POINTER_SIZE macro instead of directly using ptr_type_node. You may need to do something similar. /* ptr_type_node can't

[patch] libjava/classpath configure update for FreeBSD 10 and up

2011-11-28 Thread Andreas Tobler
All, I'd like to commit the attached patch to trunk and gcc-4.6. It is a follow up from this one: http://gcc.gnu.org/ml/gcc-cvs/2011-11/msg00886.html I missed this one because in my setup I didn't build any shared libraries from classpath. The config.rpath patch is already sent to classpath.

Re: [PATCH] Re: [v3] updated atomic configury

2011-11-28 Thread Richard Henderson
On 11/28/2011 11:29 AM, Andrew MacLeod wrote: c-family * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic predefines in one place. Add LOCK_FREE predefines. (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to new func. libstdc++-v3 *

Re: [PATCH] Copy over TREE_THIS_VOLATILE during forwprop (PR tree-optimization/50078)

2011-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2011 at 12:16:45PM -0700, Jeff Law wrote: On the following testcase the volatile load/store are optimized away. IMHO this is a bug in forwprop, which replaces tmp_Y = nonvolvar[arg_X]; MEM[(volatile ...*)tmp_Y] ={v} ...; with MEM[(volatile ...*)nonvolvar][tmp_Y] ={v} ...;

Re: [PATCH] Run remove_unreachable_handlers before expansion if needed (PR tree-optimization/50682)

2011-11-28 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/23/11 13:42, Jakub Jelinek wrote: Hi! As mentioned in the PR, if gimple_purge_dead_eh_edges is ever called after ehcleanup2 pass (or in its after todos as in the testcase below), nothing removes the unreachable EH regions and we crash

Re: New port^2: Renesas RL78

2011-11-28 Thread DJ Delorie
Ping? Anything else for this? http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02178.html http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01467.html http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01356.html

Re: [Patch, fortran, RFC] PR 40958 Reduce size of module files

2011-11-28 Thread Thomas Koenig
Hello world, the testing of the test patch I submitted earlier (Thanks Salvatore and Joost!) has shown a performance increase, so here is a formal submission. No test case because this patch is not supposed to change anything, just make module reading a bit more efficient. Regression-tested on

Re: Support Solaris 11/SPARC in MD_FALLBACK_FRAME_STATE_FOR (PR ada/41929)

2011-11-28 Thread Eric Botcazou
The result has been bootstrapped by Eric (thanks for this and debugging why a first version caused some regressions on Solaris 8) and myself on Solaris 8, 9, 10 and 11, and I've performed quite a bit of software archaeology (i.e. stared at old libc.so.1 and libthread.so.1 patches) to make

Re: [google] Patch to enable efficient function level instrumentation

2011-11-28 Thread Harshit Chopra
Ping! -- Harshit

Re: [Patch, fortran, RFC] PR 40958 Reduce size of module files

2011-11-28 Thread Janne Blomqvist
On Mon, Nov 28, 2011 at 22:29, Thomas Koenig tkoe...@netcologne.de wrote: Hello world, the testing of the test patch I submitted earlier (Thanks Salvatore and Joost!) has shown a performance increase, so here is a formal submission.  No test case because this patch is not supposed to change

Re: [PATCH] PR c++/51289 - ICE with alias template for bound template

2011-11-28 Thread Jason Merrill
On 11/28/2011 11:54 AM, Dodji Seketeli wrote: @@ -3028,10 +3028,12 @@ find_parameter_packs_r (tree*tp, int *walk_subtrees, void* data) case BOUND_TEMPLATE_TEMPLATE_PARM: /* Check the template itself. */ - cp_walk_tree (TREE_TYPE (TYPE_TI_TEMPLATE (t)), + cp_walk_tree

Re: [PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074)

2011-11-28 Thread Eric Botcazou
Here is an attempt to make the check more complete (e.g. the change wouldn't see overlap if addr was PLUS of two REGs, where one of the REGs was based on internal_arg_pointer, etc.) and less pessimistic. As tree-tailcall.c doesn't allow tail calls from functions that have address of any of

Re: [google] Patch to enable efficient function level instrumentation (issue 5416043)

2011-11-28 Thread davidxl
Please also explain the need for backpointer section. David http://codereview.appspot.com/5416043/diff/1/gcc/config/i386/i386.c File gcc/config/i386/i386.c (right): http://codereview.appspot.com/5416043/diff/1/gcc/config/i386/i386.c#newcode10801 gcc/config/i386/i386.c:10801: +static bool Add

Re: Fix libgomp semaphores

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 05:23:37PM +0100, Jakub Jelinek wrote: On Mon, Nov 28, 2011 at 09:23:43AM +1030, Alan Modra wrote: + int count = *sem; + + while ((count 0x7fff) != 0) +{ + int oldval = count; + __atomic_compare_exchange_4 (sem, oldval, count - 1, +

Re: [trunk] RFS: translate built-in include paths for sysroot (issue 5394041)

2011-11-28 Thread shenhan
Hi, Joseph, get a chance to take a look? Thanks! -Han On 2011/11/19 00:10:20, shenhan wrote: Hi, Joseph, thanks! ChangeLog entries added to the issue description. ChangeLog * Makefile.in (GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT): add a macro definition to compile command.

Re: [PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074)

2011-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2011 at 11:10:56PM +0100, Eric Botcazou wrote: This looks reasonable, but the logic is a bit hard to follow, especially the double usage of internal_arg_pointer_based_reg depending on SCAN's value. Would it be possible to split it into 2 functions that recursively call each

Re: Fix libgomp semaphores

2011-11-28 Thread Richard Henderson
On 11/28/2011 02:16 PM, Alan Modra wrote: Hmm, I suppose you could argue that powerpc and others ought to not generate those three extra instructions when using the return value. I'll see about fixing powerpc. True. For weak, the value *should* always be used (otherwise the user program is

[PATCH] Don't ICE on label DEBUG_INSN in rtl loop unrolling (PR rtl-optimization/51014)

2011-11-28 Thread Jakub Jelinek
Hi! DEBUG_INSN with LABEL_DECL var isn't duplicated in bb copies (we want just one definition of the label), which breaks apply_opt_in_copies attempt to match insn in bb copy with orig_insn from the orig_bb. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-28 Thread David Edelsohn
On Wed, Nov 23, 2011 at 8:57 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote: @@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra   TREE_SYMBOL_REFERENCED (tm_name) = 1;   /* Perform the same remapping to the comdat group.

Re: Fix libgomp semaphores

2011-11-28 Thread Richard Henderson
On 11/27/2011 02:53 PM, Alan Modra wrote: +enum memmodel +{ + MEMMODEL_RELAXED = 0, + MEMMODEL_CONSUME = 1, + MEMMODEL_ACQUIRE = 2, + MEMMODEL_RELEASE = 3, + MEMMODEL_ACQ_REL = 4, + MEMMODEL_SEQ_CST = 5, + MEMMODEL_LAST = 6 +}; This should probably go to libgomp.h. /* This is

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-28 Thread Richard Henderson
On 11/28/2011 03:54 PM, David Edelsohn wrote: On Wed, Nov 23, 2011 at 8:57 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote: @@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra TREE_SYMBOL_REFERENCED (tm_name) = 1; /*

Re: Fix libgomp semaphores

2011-11-28 Thread Richard Henderson
On 11/28/2011 03:05 PM, Richard Henderson wrote: On 11/28/2011 02:16 PM, Alan Modra wrote: Hmm, I suppose you could argue that powerpc and others ought to not generate those three extra instructions when using the return value. I'll see about fixing powerpc. However, we can do better by

[rs6000] Streamline compare-and-swap success return value computation

2011-11-28 Thread Richard Henderson
On 11/28/2011 04:26 PM, Richard Henderson wrote: On 11/28/2011 03:05 PM, Richard Henderson wrote: On 11/28/2011 02:16 PM, Alan Modra wrote: Hmm, I suppose you could argue that powerpc and others ought to not generate those three extra instructions when using the return value. I'll see about

Re: Fix libgomp semaphores

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 04:00:10PM -0800, Richard Henderson wrote: On 11/27/2011 02:53 PM, Alan Modra wrote: +enum memmodel +{ + MEMMODEL_RELAXED = 0, + MEMMODEL_CONSUME = 1, + MEMMODEL_ACQUIRE = 2, + MEMMODEL_RELEASE = 3, + MEMMODEL_ACQ_REL = 4, + MEMMODEL_SEQ_CST = 5, +

Re: [rs6000] Streamline compare-and-swap success return value computation

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 04:33:58PM -0800, Richard Henderson wrote: On 11/28/2011 04:26 PM, Richard Henderson wrote: On 11/28/2011 03:05 PM, Richard Henderson wrote: On 11/28/2011 02:16 PM, Alan Modra wrote: Hmm, I suppose you could argue that powerpc and others ought to not generate those

Re: Use atomics in libgomp mutex

2011-11-28 Thread Richard Henderson
On 11/27/2011 02:57 PM, Alan Modra wrote: This is the mutex part. Depends on http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02454.html for MEMMODEL_* values. * config/linux/mutex.h: Use atomic rather than sync builtins. * config/linux/mutex.c: Likewise. Comment. Use -1 for

Re: Fix PR51298, libgomp barrier failure

2011-11-28 Thread Richard Henderson
On 11/28/2011 06:02 AM, Alan Modra wrote: - unsigned int ret = bar-generation ~3; - /* Do we need any barrier here or is __sync_add_and_fetch acting - as the needed LoadLoad barrier already? */ - ret += __sync_add_and_fetch (bar-awaited, -1) == 0; + unsigned int ret =

[libgomp] Define memmodel

2011-11-28 Thread Richard Henderson
This fixes the ordering issues with a couple of Alan's pending patches, and put the enumeration where the entire library can use it. Committed. r~ * libgomp.h (enum memmodel): New. diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index 9cf9d32..2c9c071 100644 ---

Re: [PATCH, rs6000] Reorganize powerpc builtins and enable target pragma/attribute to enable/disable builtins

2011-11-28 Thread David Edelsohn
On Mon, Nov 7, 2011 at 5:32 PM, Michael Meissner meiss...@linux.vnet.ibm.com wrote: This patch rewrites the way builtins are handled in the rs6000 port so that like the x86, when you do #pragma GCC target or attribute((target(...))) and it enables or disables the builtins based on the

Re: [build] Cleanup rs6000/t-ppccomm configurations (PR other/51022)

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 05:15:08PM +0100, Rainer Orth wrote: Alan Modra amo...@gmail.com writes: On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote: I was hoping that other targets affected by the patch would test it as well. powerpc-linux and powerpc64-linux look good.

Re: [PATCH] Improve EXPAND_SUM handling in expand_expr_addr_expr* (PR middle-end/50074)

2011-11-28 Thread Richard Henderson
On 11/25/2011 12:58 PM, Jakub Jelinek wrote: PR middle-end/50074 * expr.c (expand_expr_addr_expr_1): Don't call force_operand for EXPAND_SUM modifier. Ok. r~

Re: Adjust omp-low test for alignment

2011-11-28 Thread Hans-Peter Nilsson
On Sat, 26 Nov 2011, Richard Henderson wrote: The m68k-linux failure for the various omp atomic tests is due to the fact that BIGGEST_ALIGNMENT is 16 bits on that platform. I think it's pretty reasonable to assume that if something is aligned to BIGGEST_ALIGNEMENT, then it can be considered

Re: [committed] Fix failure of Octeon BADDU tests

2011-11-28 Thread Andrew Pinski
On Sun, Nov 27, 2011 at 2:18 AM, Richard Sandiford rdsandif...@googlemail.com wrote: This patch fixes the MIPS octeon-baddu-1.c failures.  As Andrew says in the PR, the problem is that the combined instruction seems more expensive than the separate ones. I was going to submit a similar patch

Re: Fix PR51298, libgomp barrier failure

2011-11-28 Thread Alan Modra
On Mon, Nov 28, 2011 at 05:42:15PM -0800, Richard Henderson wrote: On 11/28/2011 06:02 AM, Alan Modra wrote: - unsigned int ret = bar-generation ~3; - /* Do we need any barrier here or is __sync_add_and_fetch acting - as the needed LoadLoad barrier already? */ - ret +=

[patch] Fix PR tree-optimization/51301

2011-11-28 Thread Ira Rosen
Hi, In vectorizer's over-widening pattern recognition the last statement is expected to be a type demotion, but the check for that was incomplete. We now check that the resulting type is not bigger than the original type of the computation. Bootstrapped and tested on powerpc64-suse-linux, tested

Go patch committed: Implement predefined error interface

2011-11-28 Thread Ian Lance Taylor
The Go language recently added a new predefined type, named error, which is an interface type with a single method, Error. This patch, from Rémy Oudompheng, implements this type for gccgo. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r

Fwd: Re: hashtable cleanup + new testsuite files

2011-11-28 Thread François Dumont
Attached patch applied. 2011-11-29 François Dumontfdum...@gcc.gnu.org * include/bits/hashtable.h (_Hashtable::_M_rehash): Remove code useless now that the hashtable implementation put the hash code in cache if the hash functor throws. *