Re: [google] dump inline decisions to stderr under -fopt-info

2011-12-13 Thread Xinliang David Li
There are a couple of problems with the patch (the patch is only compatible with 4_6 branch) 1) the dump_inline_decision should be called inside cgraph_mark_inline_edge when the edge is finally picked (and when the callee node is cloned) 2) The source location is not printed which makes the dumpin

Re: [google] dump inline decisions to stderr under -fopt-info

2011-12-13 Thread Dehao Chen
Sorry, forgot to attach the patch... Dehao On Wed, Dec 14, 2011 at 9:13 AM, Dehao Chen wrote: > I've updated the patch to fix a bug in dump_inline_decision. > > Thanks, > Dehao > > On Thu, Dec 1, 2011 at 9:59 AM, Dehao Chen wrote: >> >> This patch is for google-{main|gcc_4.6} only. >> >> Tested

Re: [Patch,AVR] ad PR50931: Implement mulpsi3

2011-12-13 Thread Denis Chertykov
2011/12/13 Georg-Johann Lay : > This adds missing 24-Bit multiplication. > > Besides implementing __mulpsi3 in libgcc the patch adds some minor tweaks to > multiply with small numbers and to represent the reduced register footprint of > asm implementations. > > With this patch PR50931 is complete f

Re: Fix flags for edges from/to entry/exit basic blocks (issue5486043)

2011-12-13 Thread Hans-Peter Nilsson
> From: Dmitry Vyukov > Date: Tue, 13 Dec 2011 11:43:18 +0100 > On Tue, Dec 13, 2011 at 3:04 AM, Hans-Peter Nilsson > wrote: > > Details in PR51521. > Sorry for the trouble. What should I do now? Do what Diego and others asked, roll back your patch immediately; I see it hasn't happened yet. No

C++ PATCH for c++/51406, 51161 (wrong-code with static cast to rvalue ref)

2011-12-13 Thread Jason Merrill
The code for casting to rvalue ref was assuming that no base adjustment would be necessary. This patch delegates to the normal lvalue binding code, and then changes the result to be an rvalue reference. Tested x86_64-pc-linux-gnu, applying to trunk. Will apply to 4.5/4.6 as well after testin

[PATCH] MIPS16: Fix truncated DWARF-2 line information

2011-12-13 Thread Maciej W. Rozycki
Hi, I've noticed in the presence of a specific MIPS16 function thunk, GCC fails to emit suitable DWARF-2 location directives, which in turn causes DWARF-2 line records to provide truncated information. This is probably best illustrated with an example. Given the following source code: $ ca

Go patch committed: Move reading export data to gcc interface

2011-12-13 Thread Ian Lance Taylor
This patch moves reading export data from an object file out of the Go frontend proper into the gcc side of the interface. The purpose of this move is to let the gcc side entirely control the name of the Mach-O segment and section where the export data is stored. Bootstrapped and ran Go testsuite

Re: [google] dump inline decisions to stderr under -fopt-info

2011-12-13 Thread Dehao Chen
I've updated the patch to fix a bug in dump_inline_decision. Thanks, Dehao On Thu, Dec 1, 2011 at 9:59 AM, Dehao Chen wrote: > > This patch is for google-{main|gcc_4.6} only. > > Tested with bootstrap and regression tests. > > Dump inline decisions, also output the inline chain. > > Dehao > > 20

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue 5488054)

2011-12-13 Thread tmsriram
On 2011/12/14 00:04:10, davidxl wrote: http://codereview.appspot.com/5488054/diff/4002/tree-vect-stmts.c File tree-vect-stmts.c (right): http://codereview.appspot.com/5488054/diff/4002/tree-vect-stmts.c#newcode3712 tree-vect-stmts.c:3712: } The check can be put into a helper function. Fixed

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Patrick Marlier
On 12/13/2011 04:04 PM, Aldy Hernandez wrote: On 12/13/11 15:02, Richard Henderson wrote: On 12/13/2011 12:48 PM, Aldy Hernandez wrote: PR middle-end/51411 * trans-mem.c (ipa_tm_create_version): Do not zap DECL_EXTERNAL. ... /* ??? Is it worth trying to use make_decl_one_only? */ if (DECL_DEC

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue 5488054)

2011-12-13 Thread davidxl
http://codereview.appspot.com/5488054/diff/4002/tree-vect-stmts.c File tree-vect-stmts.c (right): http://codereview.appspot.com/5488054/diff/4002/tree-vect-stmts.c#newcode3712 tree-vect-stmts.c:3712: } The check can be put into a helper function. http://codereview.appspot.com/5488054/

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Sriraman Tallam
I updated the patch to add the checks in vectorizable_load and vectorizable_store itself. Thanks, -Sri. On Tue, Dec 13, 2011 at 12:16 PM, Xinliang David Li wrote: > See instruction tables here: > http://www.agner.org/optimize/instruction_tables.pdf > > My brief reading of the table for core2 and

Re: Go patch committed: Multiplex goroutines onto OS threads

2011-12-13 Thread Ian Lance Taylor
Uros Bizjak writes: >> 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

Re: [google] Add support for delete operator that takes the size of the object as a parameter

2011-12-13 Thread Easwaran Raman
On Mon, Dec 12, 2011 at 1:52 PM, Easwaran Raman wrote: > On Mon, Dec 12, 2011 at 12:41 PM, Paolo Carlini > wrote: >> On 12/12/2011 09:37 PM, Easwaran Raman wrote: >>> >>> Thanks for the comments Paolo. I have attached the new patch. I have >>> bumped the version to 3.4.18 >> >> You shouldn't: 4.7

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Gabriel Dos Reis
On Tue, Dec 13, 2011 at 12:02 PM, Jonathan Wakely wrote: > On 13 December 2011 17:01, Paolo Carlini wrote: >> Hi, >>> >>> This patch seems pretty simple and safe.  Are you (Gaby and Paolo) arguing >>> that even so, it shouldn't go in? >> >> As far as I'm concerned, definetely not! I also think t

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Gabriel Dos Reis
On Tue, Dec 13, 2011 at 10:43 AM, Jason Merrill wrote: > On 12/12/2011 09:14 AM, Gabriel Dos Reis wrote: >> >> On Mon, Dec 12, 2011 at 5:25 AM, Paolo Carlini >>  wrote: >> I think being able to detect a final class is good enough for now, until we find out if there are real problems bein

Re: [Tentative patch] -finit-real=snan - would it really be so simple for automatic arrays.

2011-12-13 Thread Toon Moene
On 12/13/2011 08:41 PM, Thomas Koenig wrote: Hi Toon, (For gcc-patches: Patch at http://gcc.gnu.org/ml/fortran/2011-12/msg00080.html ) I would appreciate a review and a regression test by someone who can. Regression-test passed on trunk. This one really looks obvious. Unless somebody object

Re: [gofrontend-dev] *-rtems Compilation Failures Advice Wanted

2011-12-13 Thread Ian Lance Taylor
Joel Sherrill writes: > RTEMS does not currently have IPv6. > > /users/joel/test-gcc/gcc-svn/libgo/go/syscall/socket.go:299:51: error: > use of undefined type 'IPv6Mreq' This patch is intended to fix this problem. Bootstrapped on x86_64-unknown-linux-gnu, which proves little since the code is n

Re: RTEMS Go Patch

2011-12-13 Thread Ian Lance Taylor
Joel Sherrill writes: > * libgo/go/syscall/wait.c: Conditionalize on WIFxxx macros > and SIGxxx being defined. I think I have fixed the wait issues as follows. Bootstrapped on x86_64-unknown-linux-gnu, which means little as the files are not compiled there. Committed to mainli

Re: RTEMS Go Patch

2011-12-13 Thread Ian Lance Taylor
Joel Sherrill writes: > 2011-12-02 Joel Sherrill > > * runtime/go-signal.c: Add conditional on SIGPROF. > * runtime/mem_posix_memalign.c: Add USED directives. > * libgo/go/syscall/wait.c: Conditionalize on WIFxxx macros > and SIGxxx being defined. I committed t

[PATCH] PR c++/51477 - ICE with invalid NSDMI

2011-12-13 Thread Dodji Seketeli
Hello, In the example of this patch, during the implicit declaration of the destructor, walk_field_subobs calls locate_fn_flags on the field invalid field 'x', to locate its destructor. That function pokes the BINFO of that field, which is NULL, and passes it along to lookup_fnfields. And we ICE

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Dodji Seketeli
Jason Merrill writes: > But yes, the patch is OK after fixing the comment. Thanks. Here is what I am bootstrapping. gcc/cp/ PR c++/51476 * pt.c (convert_nontype_argument): Don't call maybe_constant_value for PTRMEM_CST nodes. gcc/testsuite/ PR c++/51476

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Aldy Hernandez
On 12/13/11 15:02, Richard Henderson wrote: On 12/13/2011 12:48 PM, Aldy Hernandez wrote: PR middle-end/51411 * trans-mem.c (ipa_tm_create_version): Do not zap DECL_EXTERNAL. ... /* ??? Is it worth trying to use make_decl_one_only? */ if (DECL_DECLARED_INLINE_P

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Richard Henderson
On 12/13/2011 12:48 PM, Aldy Hernandez wrote: > PR middle-end/51411 > * trans-mem.c (ipa_tm_create_version): Do not zap DECL_EXTERNAL. ... >/* ??? Is it worth trying to use make_decl_one_only? */ >if (DECL_DECLARED_INLINE_P (new_decl) && DECL_EXTERNAL (new_decl)) > -

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Jason Merrill
On 12/13/2011 03:48 PM, Aldy Hernandez wrote: Be that as it may, I gather this is what you want? Yep, that's what I had in mind. Jason

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Aldy Hernandez
On 12/13/11 14:42, Richard Henderson wrote: On 12/13/2011 12:41 PM, Aldy Hernandez wrote: The TM clone is marked weak as the original decl was weak, but it is no longer external or public. I suggested to just clear the DECL_WEAK bit on the clone, but Jason mentioned that unsetting DECL_EXTERN

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Richard Henderson
On 12/13/2011 12:41 PM, Aldy Hernandez wrote: > The TM clone is marked weak as the original decl was weak, but it is no > longer external or public. I suggested to just clear the DECL_WEAK bit on > the clone, but Jason mentioned that unsetting DECL_EXTERNAL is more optimal-- > so that the clone

PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Aldy Hernandez
IPA's function_and_variable_visibility is dying, because for a C++ virtual inlined TM clone, we have zapped the DECL_EXTERNAL and TREE_PUBLIC bits while building the clone in ipa_tm_create_version. The assert fails here in function_and_variable_visibility(): gcc_assert ((!DECL_WEAK (node

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Sriraman Tallam
On Tue, Dec 13, 2011 at 10:56 AM, Richard Henderson wrote: > On 12/13/2011 10:26 AM, Sriraman Tallam wrote: >> Cool, this works for stores!  It generates the movlps + movhps. I have >> to also make a similar change to another call to gen_sse2_movdqu for >> loads. Would it be ok to not do this when

Re: [RFC][libitm] Convert to c++11 atomics

2011-12-13 Thread Richard Henderson
On 12/13/2011 11:43 AM, Dominique Dhumieres wrote: >> I've committed the patch. > > It caused: > > ../../../work/libitm/config/posix/rwlock.cc: In member function 'bool > GTM::gtm_rwlock::write_lock_generic(GTM::gtm_thread*)': > ../../../work/libitm/config/posix/rwlock.cc:196:56: error: comparis

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Xinliang David Li
See instruction tables here: http://www.agner.org/optimize/instruction_tables.pdf My brief reading of the table for core2 and corei7 suggest the following: 1. On core2 movdqu -- both load and store forms take up to 8 cycles to complete, and store form produces 8 uops while load produces 4 uops

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Jason Merrill
On 12/13/2011 12:01 PM, Paolo Carlini wrote: As far as I'm concerned, definetely not! I also think that it would be great if, for 4.7, Jon could handle the library issues with EBO by exploiting it. The patch is OK, then. Jason

Re: [PATCH] [MIPS] Add Octeon2 cpu support to GCC

2011-12-13 Thread Andrew Pinski
On Tue, Dec 13, 2011 at 11:19 AM, Richard Sandiford wrote: > Andrew Pinski writes: >> +(define_insn_reservation "octeon_imul3_o2" 6 >> +  (and (eq_attr "cpu" "octeon2") >> +       (eq_attr "type" "imul3,pop,clz")) >> +  " octeon_pipe1 + octeon_mult") > > Excess space before ". > >> Index: config/

Re: [RFC][libitm] Convert to c++11 atomics

2011-12-13 Thread Dominique Dhumieres
> I've committed the patch. It caused: ../../../work/libitm/config/posix/rwlock.cc: In member function 'bool GTM::gtm_rwlock::write_lock_generic(GTM::gtm_thread*)': ../../../work/libitm/config/posix/rwlock.cc:196:56: error: comparison between signed and unsigned integer expressions [-Werror=sig

Re: [Tentative patch] -finit-real=snan - would it really be so simple for automatic arrays.

2011-12-13 Thread Thomas Koenig
Hi Toon, (For gcc-patches: Patch at http://gcc.gnu.org/ml/fortran/2011-12/msg00080.html ) I would appreciate a review and a regression test by someone who can. Regression-test passed on trunk. This one really looks obvious. Unless somebody objects who knows this field better than I do, OK f

[Patch,AVR] ad PR50931: Implement mulpsi3

2011-12-13 Thread Georg-Johann Lay
This adds missing 24-Bit multiplication. Besides implementing __mulpsi3 in libgcc the patch adds some minor tweaks to multiply with small numbers and to represent the reduced register footprint of asm implementations. With this patch PR50931 is complete from the target side. (But there is still a

Re: [PATCH] regmove: Fix segfault when accessing call_used_regs

2011-12-13 Thread Richard Sandiford
"Andreas Krebbel" writes: > Ok for mainline, 4.6, 4.5, and 4.4? OK everywhere, but (sorry to be picky)... > Index: gcc/regmove.c > === > *** gcc/regmove.c.orig > --- gcc/regmove.c > *** fixup_match_2 (rtx insn, rtx dst,

Re: [PATCH] [MIPS] Add Octeon2 cpu support to GCC

2011-12-13 Thread Richard Sandiford
Andrew Pinski writes: > +(define_insn_reservation "octeon_imul3_o2" 6 > + (and (eq_attr "cpu" "octeon2") > + (eq_attr "type" "imul3,pop,clz")) > + " octeon_pipe1 + octeon_mult") Excess space before ". > Index: config/mips/mips.h > =

Re: Go patch committed: Multiplex goroutines onto OS threads

2011-12-13 Thread Ian Lance Taylor
Rainer Orth writes: > Only a few minor compilation problems, fixed with the following patch. Thanks. Committed. Ian

Re: [RFC][libitm] Convert to c++11 atomics

2011-12-13 Thread Richard Henderson
On 11/30/2011 05:13 PM, Richard Henderson wrote: > The library is written in C++, so in theory we can use the real atomic<> > templates, etc. Except that we have the same horrid problem finding the C++ > headers as did for , so again we have a local copy of . > Blah. But given that it is a co

libgo patch committed: Update to weekly.2011-12-02

2011-12-13 Thread Ian Lance Taylor
I have committed a patch to update libgo to the weekly.2011-12-02 release of the master library. In this message I have only included the diffs to files that are specific to the gccgo copy of the library. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian d

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Sriraman Tallam
On Tue, Dec 13, 2011 at 10:56 AM, Richard Henderson wrote: > On 12/13/2011 10:26 AM, Sriraman Tallam wrote: >> Cool, this works for stores!  It generates the movlps + movhps. I have >> to also make a similar change to another call to gen_sse2_movdqu for >> loads. Would it be ok to not do this when

Re: fix TM-clone calls in C++ dumps

2011-12-13 Thread Richard Henderson
On 12/10/2011 11:32 AM, Aldy Hernandez wrote: > * trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and > DECL_LANG_SPECIFIC. Ok. r~

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Jason Merrill
On 12/13/2011 02:03 PM, Jason Merrill wrote: On 12/13/2011 12:43 PM, Dodji Seketeli wrote: + if (TREE_CODE (expr) == PTRMEM_CST) + /* We don't need to test if a PTRMEM_CST is a constant value + because maybe_constant_value might crash and because + [temp.arg.nontype]/1 says it's not allowed as a

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Jason Merrill
On 12/13/2011 12:43 PM, Dodji Seketeli wrote: + if (TREE_CODE (expr) == PTRMEM_CST) + /* We don't need to test if a PTRMEM_CST is a constant value + because maybe_constant_value might crash and because + [temp.arg.nontype]/1 says it's not allowed as a template +

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Richard Henderson
On 12/13/2011 10:26 AM, Sriraman Tallam wrote: > Cool, this works for stores! It generates the movlps + movhps. I have > to also make a similar change to another call to gen_sse2_movdqu for > loads. Would it be ok to not do this when tune=core2? We can work something out. I'd like you to do th

Go patch committed: Fix last conversion patch

2011-12-13 Thread Ian Lance Taylor
I came across a test case which showed that the conversion patch I just committed did not always use the correct types--it got a gimplification failure. The problem was that the builtin call was being recorded as returning the type for which it was first called, and that might be different from so

Re: Go patch committed: Multiplex goroutines onto OS threads

2011-12-13 Thread Rainer Orth
Ian Lance Taylor writes: > Rainer Orth writes: > >> Ian Lance Taylor writes: >> >>> Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Tested >>> both with and without -fsplit-stack support. Committed to mainline. >> >> Once Go bootstrap works again on Solaris, I notice that there

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Paolo Carlini
Hi, > So the proposed patch just adds the __is_final intrinsic for use > internally by the library, to allow library changes so the test cases > in the bug report will pass. If preferred I won't even add __is_final > to the extend.texi docs, to leave it as an undocumented extension that > we coul

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Sriraman Tallam
On Mon, Dec 12, 2011 at 9:54 PM, Ira Rosen wrote: > > > gcc-patches-ow...@gcc.gnu.org wrote on 13/12/2011 04:05:57 AM: > >> On core2, unaligned vector load/store using movdqu is a very slow > operation. >> Experiments show it is six times slower than movdqa (aligned) and this is >> irrespective of

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Sriraman Tallam
On Mon, Dec 12, 2011 at 11:49 PM, Jakub Jelinek wrote: > On Mon, Dec 12, 2011 at 06:05:57PM -0800, Sriraman Tallam wrote: >>       Do not vectorize loops on Core2 that need to use unaligned >>       vector load/stores. >>       * tree-vect-stmts.c (is_slow_vect_unaligned_load_store): New function.

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Sriraman Tallam
On Tue, Dec 13, 2011 at 9:58 AM, Richard Henderson wrote: > On 12/12/2011 06:05 PM, Sriraman Tallam wrote: >> On core2, unaligned vector load/store using movdqu is a very slow operation. >> Experiments show it is six times slower than movdqa (aligned) and this is >> irrespective of whether the res

Re: [libjava] Support 64-bit multilib for i?86-linux

2011-12-13 Thread Andrew Haley
On 12/13/2011 05:51 PM, Rainer Orth wrote: > 2011-12-13 Rainer Orth > > * configure.ac (i?86-*-linux*): Set SIGNAL_HANDLER_AUX. > * configure: Regenerate. > * include/i386-signal.h: Wrap in __i386__, include > java-signal-aux.h otherwise. OK, thanks. Andrew.

Go patch committed: Permit conversions between string and named slice

2011-12-13 Thread Ian Lance Taylor
The Go language permits converting between string and []byte or []rune. It was recently changed to permit converting between string a named type whose base type is []byte or []rune. This patch implements that in gccgo. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to ma

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Jonathan Wakely
On 13 December 2011 17:01, Paolo Carlini wrote: > Hi, >> >> This patch seems pretty simple and safe.  Are you (Gaby and Paolo) arguing >> that even so, it shouldn't go in? > > As far as I'm concerned, definetely not! I also think that it would be great > if, for 4.7, Jon could handle the library

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-13 Thread Richard Henderson
On 12/12/2011 06:05 PM, Sriraman Tallam wrote: > On core2, unaligned vector load/store using movdqu is a very slow operation. > Experiments show it is six times slower than movdqa (aligned) and this is > irrespective of whether the resulting data happens to be aligned or not. > For Corei7, there i

Re: PR/51443: fix inline assembly in transaction_callable functions

2011-12-13 Thread Aldy Hernandez
On 12/13/11 11:49, Eric Botcazou wrote: This fixes the PR. You need to put the Component before the / in the ChangeLog, otherwise the commit won't be cross-referenced in Bugzilla. Funny, I just noticed. I will do so from now on. Thanks.

[libjava] Support 64-bit multilib for i?86-linux

2011-12-13 Thread Rainer Orth
This is the last patch necessary to have a full-blown i686-unknown-linux-gnu --enable-targets=all configuration to work. It requires http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01011.html and fixes a compilation failure compiling the 64-bit libgcj multilib: $ /var/gcc/regression/trunk/

Re: PR/51443: fix inline assembly in transaction_callable functions

2011-12-13 Thread Eric Botcazou
> This fixes the PR. You need to put the Component before the / in the ChangeLog, otherwise the commit won't be cross-referenced in Bugzilla. -- Eric Botcazou

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Dodji Seketeli
Jason Merrill writes: > Let's check for PTRMEM_CST separately, before any of the other tests. Like this? I still need to run it through bootstrap ... gcc/cp/ PR c++/51476 * pt.c (convert_nontype_argument): Don't call maybe_constant_value for PTRMEM_CST nodes. gcc/test

[PATCH] regmove: Fix segfault when accessing call_used_regs

2011-12-13 Thread Andreas Krebbel
Hi, a very high pseudo register number is needed here to actually cause a segfault. I observed it on s390 with a high value in max-completely-peeled-insns when compiling the href benchmark on s390. Ok for mainline, 4.6, 4.5, and 4.4? Bye, -Andreas- 2011-12-13 Andreas Krebbel * r

[libffi] Build 64-bit multilib for i?86-linux

2011-12-13 Thread Rainer Orth
I've recently tried a i686-unknown-linux-gnu --enable-targets=all bootstrap, which failed to link the 64-bit jv-convert etc.: ./.libs/libgcj.so: undefined reference to `ffi_raw_call' ./.libs/libgcj.so: undefined reference to `ffi_prep_raw_closure_loc' ./.libs/libgcj.so: undefined reference to `ffi

[Patch, Fortran] Some fixes for polymorphic coarrays

2011-12-13 Thread Tobias Burnus
Two small fixes: a) There was an ICE when simplifying "THIS_IMAGE(caf)" (for -fcoarray=single); solution: Simply use internally lcobound(), which is identically (for a single image). b) There was an segfault of the compiled program when running "this_image(caf)" where "caf" is a corank-1 coa

Re: [RFC] Port libitm to powerpc

2011-12-13 Thread Richard Henderson
On 12/12/2011 07:08 PM, David Edelsohn wrote: > If you don't want to grab the L2 cache line size directly, could you > default to 32 bytes on PPC32 and 128 bytes on PPC64 (__powerpc64__) ? Done. r~

[ada] Support 64-bit libgnat multilib on i?86-linux

2011-12-13 Thread Rainer Orth
I recently set up a bi-arch environment on i686-unknown-linux-gnu with --enable-targets=all to check which of a couple of problems I'm seeing on i386-pc-solaris2.1? are Solaris specific and which are generic. When trying to bootstrap such a compiler with all languages, Ada bootstrap failed compili

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-13 Thread 沈涵
Hi, further comments? Or ok for submit? And as suggested by Diego, I'd like to make it upstream and google branch. Thanks, -Han On Thu, Dec 8, 2011 at 4:55 PM, Han Shen(沈涵) wrote: > Hi, Jakub, thanks! Fixed! > > Hi, Andrew, it's good suggestion. Done. Also modified foo10. > > A small c++ test

Re: [RFC] Port libitm to powerpc

2011-12-13 Thread Richard Henderson
On 12/13/2011 01:51 AM, Iain Sandoe wrote: > works for me - modulo a couple of typos - probably already fixed in... > >> git://repo.or.cz/gcc/rth.git rth/tm-next > > ... but I haven't got a chance to check that out and rebuild this morning.. Thanks, no I didn't have all of these fixed. Applied

Re: [Patch] Adjust diag-scans in vect-tests to fix fails on AVX/AVX2

2011-12-13 Thread Richard Henderson
On 12/12/2011 09:44 PM, Michael Zolotukhin wrote: > Should we introduce checks for each possible vector datatype (e.g. > vect_8byte_int_available, vect_16byte_int_available, > vect_32byte_int_available, vect_16byte_float_available, > vect_32byte_float_available etc.) along with a check for > prefer

Re: PR/51443: fix inline assembly in transaction_callable functions

2011-12-13 Thread Richard Henderson
On 12/13/2011 07:37 AM, Aldy Hernandez wrote: > PR/51443 > * trans-mem.c (struct diagnose_tm): Remove saw_unsafe. > (diagnose_tm_1): Same. > (ipa_tm_execute): Do not test tm_may_enter_irr before we set it. > (ipa_tm_scan_irr_function): Return gracefully when no >

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Paolo Carlini
Hi, > > This patch seems pretty simple and safe. Are you (Gaby and Paolo) arguing > that even so, it shouldn't go in? As far as I'm concerned, definetely not! I also think that it would be great if, for 4.7, Jon could handle the library issues with EBO by exploiting it. I only meant to say th

Re: [patch] add __is_final trait to fix libstdc++/51365

2011-12-13 Thread Jason Merrill
On 12/12/2011 09:14 AM, Gabriel Dos Reis wrote: On Mon, Dec 12, 2011 at 5:25 AM, Paolo Carlini wrote: I think being able to detect a final class is good enough for now, until we find out if there are real problems being encountered as people make more use of C++11. Maybe. But in my opinion w

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Jason Merrill
On 12/13/2011 10:50 AM, Dodji Seketeli wrote: - if (INTEGRAL_OR_ENUMERATION_TYPE_P (type)) + if (INTEGRAL_OR_ENUMERATION_TYPE_P (type) + && TREE_CODE (expr) != PTRMEM_CST) expr = maybe_constant_value (expr); else if (TYPE_PTR_P (type) || (TYPE_PTR_T

[COMMITTED, PR 50628] More careful SRA sub-access propagation accross assignments

2011-12-13 Thread Martin Jambor
Hi, Richi approved the following patch to fix 50628 on IRC. Details about the problem and this particular patch are also in bugzilla. Of course, I bootstrapped and tested the patch today on x86_64-linux. Thanks, Martin 2011-12-13 Martin Jambor PR middle-end/50628 * tree-s

Re: [PATCH, PR 51362] Make IPA-CP not ICE if estimate_ipcp_clone_size_and_time returns zero size

2011-12-13 Thread Jan Hubicka
> On Tue, Dec 13, 2011 at 2:38 PM, Martin Jambor wrote: > > Hi, > > > > IPA-CP currently assumes that cloning estimates always have some > > positive size cost.  However, there are apparently situations in which > > estimate_ipcp_clone_size_and_time does return zero size and which then > > mostly

[PATCH] Tidy replace_uses_by

2011-12-13 Thread Richard Guenther
After fixing PR51481 I noticed replace_uses_by does quite some unnecessary work despite being (one of) the core propagator routine(s). The following patch cleans it up to avoid doing useless work. LTO bootstrapped on x86_64-unknown-linux-gnu, testing in progress. I'll apply this tomorrow. Thank

Re: [C++ Patch] PR 51464

2011-12-13 Thread Jason Merrill
OK. Jason

[PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Dodji Seketeli
Hello, In the example of the patch, we crash because convert_nontype_argument calls maybe_constant_value with the PTRMEM_CST for &B::i (in cxx0x mode) which ends up trying to poke at the offset of i, but struct B is not yet laid out. My understanding is that using a pointer to non-static member a

PR/51443: fix inline assembly in transaction_callable functions

2011-12-13 Thread Aldy Hernandez
A while back we redesigned how the may go irrevocable bit was set. In particular, we redesigned it so that the analysis was done after IPA-inline was done, so we didn't make incorrect assumptions about irrevocability. This means that any set or use of the tm_may_enter_irr bit before we calcu

[PATCH, i386]: Fix PR testsuite/51524

2011-12-13 Thread Uros Bizjak
Hello! Recent RA change disturbs delicate balance of register allocation, so a couple of scan tests begins to fail. Attached patch fixes these scan failures by forcing arguments of test function in registers. 2011-12-13 Uros Bizjak PR testsuite/51524 * gcc.target/i386/bmi2-mu

[PATCH] Fix PR48354

2011-12-13 Thread Richard Guenther
This fixes PR48354 by streaming DECL_ORIGINAL_TYPE. LTO bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-12-13 Richard Guenther PR lto/48354 * tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE. * tree-streamer-in.c (lto_input_ts_dec

Re: Fix flags for edges from/to entry/exit basic blocks (issue5486043)

2011-12-13 Thread Diego Novillo
On 11-12-13 09:22 , Diego Novillo wrote: When testing the patch, you should just run 'make -jN -k check' from the toplevel build directory, do not just test a subset of the testsuite. Additionally, you will need to configure and build with all the default languages. Your change affects every

Re: Fix flags for edges from/to entry/exit basic blocks (issue5486043)

2011-12-13 Thread Diego Novillo
On Tue, Dec 13, 2011 at 05:43, Dmitry Vyukov wrote: > Sorry for the trouble. What should I do now? > Just in case I've prepared a patch that rolls it back: > http://codereview.appspot.com/5485054 Dmitry, please roll back the patch for now. You should be able to see the failures if you run full

Re: Go patch committed: Multiplex goroutines onto OS threads

2011-12-13 Thread Ian Lance Taylor
Rainer Orth writes: > Ian Lance Taylor writes: > >> of any differences between Solaris and GNU/Linux when it comes to the >> getcontext, setcontext, and makecontext functions? > > I've just found something in Solaris 11 makecontext(3C) (NOTES section), > but that doesn't explain why 32-bit Solar

Re: [PATCH, PR 51362] Make IPA-CP not ICE if estimate_ipcp_clone_size_and_time returns zero size

2011-12-13 Thread Richard Guenther
On Tue, Dec 13, 2011 at 2:38 PM, Martin Jambor wrote: > Hi, > > IPA-CP currently assumes that cloning estimates always have some > positive size cost.  However, there are apparently situations in which > estimate_ipcp_clone_size_and_time does return zero size and which then > mostly lead to divisi

[Patch]: Guard the call to begin_epilogue

2011-12-13 Thread Tristan Gingold
Hi, currently, the call to begin_epilogue debug hook in final_scan_insn is unconditional and therefore occurs even when DECL_IGNORED_P is true. This is not what is done for other debug hooks, and leads to ICE on VMS (the only platform that defines the hook) as last_filename is NULL. Tested on

[PATCH, PR 51362] Make IPA-CP not ICE if estimate_ipcp_clone_size_and_time returns zero size

2011-12-13 Thread Martin Jambor
Hi, IPA-CP currently assumes that cloning estimates always have some positive size cost. However, there are apparently situations in which estimate_ipcp_clone_size_and_time does return zero size and which then mostly lead to divisions by zero or failed asserts. This patch avoids that by simply b

[vms/committed]: fix crash in vmsdbgout.c

2011-12-13 Thread Tristan Gingold
Hi, there were calls in vmsdbgout.c to dwarf2out_source_line outside the normal flow: in end_prologue, begin_epilogue, end_epilogue. This is useless and not not expected by dwarf2out. This patch removes these extra calls, and fixes a crash. Tested by building c+ada for alpha64-dec-openvms.

Re: [PATCH, PR51491] add CLOBBER before __builtin_stack_restore when converting vla alloca_with_align to array decl

2011-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2011 at 01:26:42PM +0100, Tom de Vries wrote: > 2011-12-13 Tom de Vries > > PR tree-optimization/51491 > * tree-ssa-ccp.c (insert_clobber_before_stack_restore): New function. > (ccp_fold_stmt): Use insert_clobber_before_stack_restore after a > successful

[PATCH] Fix PR51481

2011-12-13 Thread Richard Guenther
This fixes the maybe_clean_or_replace_eh_stmt call in replace_uses_by. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2011-12-13 Richard Guenther PR middle-end/51481 * tree-cfg.c (replace_uses_by): Pass proper arguments to maybe_clean

[PATCH] Fix PR51519

2011-12-13 Thread Richard Guenther
This fixes PR51519. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2011-12-13 Richard Guenther PR tree-optimization/51519 * ipa-inline.c (edge_badness): Use edge growth in non-guessed branch probability case as well. * gcc.dg/pr51519

[PATCH] New testcase for -flto -g

2011-12-13 Thread Richard Guenther
Committed. Richard. 2011-12-13 Richard Guenther * gcc.dg/lto/20111213-1_0.c: New testcase. Index: gcc/testsuite/gcc.dg/lto/20111213-1_0.c === --- gcc/testsuite/gcc.dg/lto/20111213-1_0.c (revision 0) +++ gcc

[PATCH, PR51491] add CLOBBER before __builtin_stack_restore when converting vla alloca_with_align to array decl

2011-12-13 Thread Tom de Vries
Jakub, I have a patch for PR51491. Consider the following test-case, compiled with gcc -O2 -S f.c -fdump-tree-all: ... int f(void) { int tt = 0; int t = 4; { int a[t]; tt = g(a); tt += a[0]; } { int a[4]; tt += g(a); tt += a[0]; } return tt; } ... The vla a[

Re: [patch] Remove occurrences of int64_t (and int32_t)

2011-12-13 Thread Eric Botcazou
> Please simply switch it to unconditional use of tree_to_double_int > (DECL_SIZE_UNIT (t)).low and make 'size' a HOST_WIDE_INT (we properly > require 64 bit hwi for targets that have 64bit sizes/pointers). Sure, but we need a 64-bit container for 'size' at least, because 8 bytes are read from it

Re: [PATCH] Call maybe_clean_or_redirect_eh_stmt in gimple_fold_call (PR tree-optimization/51481)

2011-12-13 Thread Richard Guenther
On Tue, Dec 13, 2011 at 1:15 PM, Jakub Jelinek wrote: > On Tue, Dec 13, 2011 at 01:05:30PM +0100, Richard Guenther wrote: >> Yeah, I'm testing a followup patch that fixes the call in replace_uses_by >> (that alone fixes the testcase in the PR). > > That patch looks good, but then forwprop has the

Re: [PATCH] Call maybe_clean_or_redirect_eh_stmt in gimple_fold_call (PR tree-optimization/51481)

2011-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2011 at 01:05:30PM +0100, Richard Guenther wrote: > Yeah, I'm testing a followup patch that fixes the call in replace_uses_by > (that alone fixes the testcase in the PR). That patch looks good, but then forwprop has the same static void tidy_after_forward_propagate_addr (gimple stm

Re: [PATCH] Call maybe_clean_or_redirect_eh_stmt in gimple_fold_call (PR tree-optimization/51481)

2011-12-13 Thread Richard Guenther
On Tue, Dec 13, 2011 at 1:00 PM, Jakub Jelinek wrote: > On Tue, Dec 13, 2011 at 11:52:38AM +0100, Richard Guenther wrote: >> On Mon, Dec 12, 2011 at 6:01 PM, Jakub Jelinek wrote: >> > In gimple_fold_call (called from fold_stmt from replace_uses_by from cfg >> > cleanup) we weren't calling maybe_c

Re: [PATCH] Call maybe_clean_or_redirect_eh_stmt in gimple_fold_call (PR tree-optimization/51481)

2011-12-13 Thread Richard Guenther
On Tue, Dec 13, 2011 at 1:00 PM, Jakub Jelinek wrote: > On Tue, Dec 13, 2011 at 11:52:38AM +0100, Richard Guenther wrote: >> On Mon, Dec 12, 2011 at 6:01 PM, Jakub Jelinek wrote: >> > In gimple_fold_call (called from fold_stmt from replace_uses_by from cfg >> > cleanup) we weren't calling maybe_c

Re: [PATCH] _GCC_PICFLAG: use -fPIC for s390x targets

2011-12-13 Thread Andreas Krebbel
On 12/07/2011 10:33 AM, Rainer Orth wrote: > Mike Frysinger writes: >> s390*-*-*) >> $1=-fpic >> ;; > > Perhaps it's better to remove both s390* cases and use the -fPIC default > everywhere, as does libtool. picflag.m4 is supposed to be usable > everywhere. >From a performance pe

Re: [PATCH] Call maybe_clean_or_redirect_eh_stmt in gimple_fold_call (PR tree-optimization/51481)

2011-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2011 at 11:52:38AM +0100, Richard Guenther wrote: > On Mon, Dec 12, 2011 at 6:01 PM, Jakub Jelinek wrote: > > In gimple_fold_call (called from fold_stmt from replace_uses_by from cfg > > cleanup) we weren't calling maybe_clean_or_replace_eh_stmt, so when > > we've replaced a printf

[Ada] Add more vectorization (sub-)tests

2011-12-13 Thread Eric Botcazou
Tested on i586-suse-linux, applied on the mainline. 2011-12-13 Eric Botcazou * gnat.dg/vect1.ad[sb]: Add more tests. * gnat.dg/vect2.ad[sb]: Likewise. * gnat.dg/vect3.ad[sb]: Likewise. * gnat.dg/vect4.ad[sb]: Likewise. * gnat.dg/vect5.ad[sb]: Likewise.

  1   2   >