Re: [Patch, fortran] PR46897 - [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign

2012-08-13 Thread Alessandro Fanfarillo
Dear Paul, Dear all, I tried to compile the check_compiler_for_memory_leaks.F90 file provided by Damian and it produces a segfault error. May be the problem is related with add_comp_ref. Regards Alessandro (from Malta) 2012/8/14 Paul Richard Thomas > > Dear Mikael, > > > I think there are a co

[PATCH] Enable bbro for -Os

2012-08-13 Thread Zhenqiang Chen
Hi, Basic block reordering is disabled for -Os from gcc 4.7 since the pass will lead to big code size regression. But benchmarks logs also show there are lots of regression due to poor code layout compared with 4.6. The patch is to enable bbro for -Os. When optimizing for size, it * avoid duplica

Re: PATCH [x86_64] PR20020 - 128 bit structs not targeted to TImode

2012-08-13 Thread Jakub Jelinek
On Mon, Aug 13, 2012 at 09:20:32PM -0700, Gary Funck wrote: > --- gcc/testsuite/gcc.dg/pr20020-1.c (revision 0) > +++ gcc/testsuite/gcc.dg/pr20020-1.c (revision 0) > @@ -0,0 +1,25 @@ > +/* Target is restricted to x86_64 type architectures, > + to check that 128-bit struct's are represented > +

Re: [EXTERNAL] [Fortran] PR37336 - FIINAL patch [1/n]: Implement the finalization wrapper subroutine

2012-08-13 Thread Tobias Burnus
Hi Damian, dear all, Rouson, Damian wrote: Thanks for your work on this. This is a big step. I would add to your list the following: (4) If the entity is of extended type and the parent type has a component that is finalizable, the parent component's component is finalized. I believe that's

Re: Merge C++ conversion into trunk (3/6 - gengtype C++ support)

2012-08-13 Thread Laurynas Biveinis
Diego - I have some relatively minor comments. In general, the these changes and the adjusted GTY doc intro blurb you sent in the other email are OK with the minor comments addressed and if no objections from global maintainers. > (walk_type): Set D->IN_PTR_FILED when walking a TYPE_POINT

Re: [Patch, fortran] PR46897 - [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign

2012-08-13 Thread Paul Richard Thomas
Dear Mikael, > I think there are a couple of bugs not triggered by the single component > types in the test. See below. Yes, you are right. We should have tested multiple components... my fault! > This could be moved to the only next caller (`previous' doesn't need to > be updated if `this_code

Re: Scheduler: Allow breaking dependencies by modifying patterns

2012-08-13 Thread Maxim Kuvyrkov
On 4/08/2012, at 12:05 AM, Bernd Schmidt wrote: > This patch allows us to change > > rn++ > rm=[rn] > > into > > rm=[rn + 4] > rn++ This is a good scheduler optimization that I wanted to have for quite a while. Bernd, kudos for implementing it! I am going to review this patch, and then the

Re: Scheduler: Save state at the end of a block

2012-08-13 Thread Maxim Kuvyrkov
On 13/08/2012, at 10:32 PM, Bernd Schmidt wrote: > This is a small patch for sched-rgn that attempts to save DFA state at > the end of a basic block and re-use it in successor blocks. This was a > customer-requested optimization; I've not seen it make much of a > difference in any macro benchmarks

PATCH [x86_64] PR20020 - 128 bit structs not targeted to TImode

2012-08-13 Thread Gary Funck
Attached, is a patch to fix PR20020, and three test cases. This patch improves the code generated for structs that can be represented in a TImode value on an x86_64 target. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20020 The test cases scan the generated RTL and verify that TImode operations are

Re: [C++ Pubnames Patch] Anonymous namespaces enclosed in named namespaces. (issue6343052)

2012-08-13 Thread Mike Stump
On Aug 13, 2012, at 4:56 PM, Sterling Augustine wrote: > The enclosed patch adjusts the test so it will pass on darwin. The > issue was that it looked for some elf-specific assembly directives, > which it shouldn't. > > OK for mainline? Ok.

Re: [EXTERNAL] [Fortran] PR37336 - FIINAL patch [1/n]: Implement the finalization wrapper subroutine

2012-08-13 Thread Rouson, Damian
Hi Tobias, Thanks for your work on this. This is a big step. I would add to your list the following: (4) If the entity is of extended type and the parent type has a component that is finalizable, the parent component's component is finalized. In ForTrilnos, we need for this to happen even when

Re: [patch][gcov] Clarify the internals a bit

2012-08-13 Thread Nathan Sidwell
On 07/23/12 02:34, Steven Bosscher wrote: Hello, While reading up on how gcov/profiling works, I noticed that there are a lot of places where the notes file is still referred to as the "basic block graph" file. Also, the gcov manual has not been updated for -fprofile-dir. The attached patch addr

Re: [PATCH] Fix up an IRA ICE (PR middle-end/53411, rtl-optimization/53495)

2012-08-13 Thread Vladimir Makarov
On 08/13/2012 02:44 PM, Jakub Jelinek wrote: Hi! move_unallocated_pseudos apparently relies on no insns being deleted in between find_moveable_pseudos and itself, which can happen when delete_trivially_dead_insns removes dead insns and insns that feed them. This can be fixed either by moving th

Re: [PATCH, MIPS] 74k madd scheduler tweaks

2012-08-13 Thread Maxim Kuvyrkov
On 9/08/2012, at 7:10 AM, Richard Sandiford wrote: > Hmm, yeah, it does look like they should be using mips_linked_madd_p > instead, except that mips_linked_madd_p isn't yet wired up to handle > DSP macs. Rather than pattern-match them all, the easiest thing would > probably be to define a new at

Re: [C++ Pubnames Patch] Anonymous namespaces enclosed in named namespaces. (issue6343052)

2012-08-13 Thread Sterling Augustine
On Sun, Aug 12, 2012 at 12:46 PM, Jack Howarth wrote: > On Sun, Jul 01, 2012 at 09:33:06AM -0500, Gabriel Dos Reis wrote: >> On Thu, Jun 28, 2012 at 12:50 PM, Sterling Augustine >> wrote: >> > The enclosed patch adds a fix for the pubnames anonymous namespaces >> > contained >> > within named na

[google/gcc-4_7] Backport arm hardfp patch from trunk

2012-08-13 Thread 沈涵
Hi Carrot, could you take a look at this patch? Thanks! The modification is in upstream trunk patch revision - 186859. The same patch has been back ported to google/gcc-4_6 (http://codereview.appspot.com/6206055/), this is to apply on google/gcc-4_7 Regards, -Han 2012-08-13 Han Shen

Re: PING [PATCH] Fix PR libstdc++/54036, problem negating DFP NaNs

2012-08-13 Thread Peter Bergner
On 08/03/2012 11:28:57 +0200 Paolo Carlini wrote: > No problem ;) Patch is Ok, thanks! Hi Paolo, I see you committed the patch for me. Thanks!! I literally posted that last patch just minutes before heading out on vacation and didn't want to commit it just before I left in case it caused any fa

[SH] PR 50751 - Add support for SH2A movu.b and movu.w insns

2012-08-13 Thread Oleg Endo
Hello, This adds support for the SH2A instructions movu.b and movu.w for zero-extending mem loads with displacement addressing. Tested on rev 190332 with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" and no new failures. OK? Chee

Re: LEA-splitting improvement patch.

2012-08-13 Thread Uros Bizjak
Hello! > It is known that LEA splitting is one of the most critical problems > for Atom processors and changes try to improve it through: > 1. More aggressive Lea splitting – do not perform splitting if > only split cost exceeds AGU stall . > 2. Reordering splitting instructions to get

Re: C++ PATCH for c++/48707 (c++0x ice on initialization in template)

2012-08-13 Thread H.J. Lu
On Mon, Apr 25, 2011 at 2:53 PM, Jason Merrill wrote: > In C++0x we can have an initializer that is potentially constant and yet > still type-dependent if it involves a call, so we need to handle that. > > For 4.7 I'm explicitly testing for type-dependency; for 4.6 I've made a > smaller change to

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Richard Henderson wrote: > On 08/13/2012 01:22 PM, Lawrence Crowl wrote: >>> > yes, it is just as confusing and a bug as >>> > >>> > 2.3 + 1; >>> > >>> > is in plain C. >> Yes, it is a bug. It's a bit disturbing that it wasn't caught >> in bootstrap. > > You'll recall that I pointed i

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Richard Henderson
On 08/13/2012 01:22 PM, Lawrence Crowl wrote: >> > yes, it is just as confusing and a bug as >> > >> > 2.3 + 1; >> > >> > is in plain C. > Yes, it is a bug. It's a bit disturbing that it wasn't caught > in bootstrap. > You'll recall that I pointed it out last time around as well. r~

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Diego Novillo
On Mon, Aug 13, 2012 at 5:41 AM, Richard Guenther wrote: >> *this += double_int_one; >> would be less confusing. > > Increment/decrement operations did not exist, please do not add them > at this point. But they are going to be used when the call-sites are converted. There is no point in leaving

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-13 Thread Ollie Wild
On Mon, Aug 13, 2012 at 3:50 PM, Jakub Jelinek wrote: > > The formatting doesn't match GCC coding conventions in several ways. > You don't have spaces before (, and ( shouldn't be at the end of line if > possible. Updated patch attached. Ollie commit d023097c555a6f7cb84685fd7befedb550889d2c Auth

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-13 Thread Jakub Jelinek
On Mon, Aug 13, 2012 at 03:47:43PM -0500, Ollie Wild wrote: > diff --git a/gcc/cp/call.c b/gcc/cp/call.c > index 5345f2b..b2fac16 100644 > --- a/gcc/cp/call.c > +++ b/gcc/cp/call.c > @@ -8924,6 +8924,12 @@ extend_ref_init_temps_1 (tree decl, tree init, > VEC(tree,gc) **cleanups) >tree sub = in

[C++ Patch] for c++/11750

2012-08-13 Thread Fabien Chêne
Hi, Here, we were setting the LOOKUP_NONVIRTUAL flag wrongly. Actually, we need to check if the function context is the same than the instance type -- yes that might happen that they be different in presence of using-declarations. It happens that it was working if the call was invoked through a p

C++ PR 54197: lifetime of reference not properly extended

2012-08-13 Thread Ollie Wild
This patch fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54197. Certain constructs (see bug for examples) cause C++ references to be initialized with COMPOUND_EXPR's. The old logic was ignoring these, causing those temporaries to be prematurely destroyed. Tested on trunk via full x86_64 boot

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Richard Guenther wrote: > Increment/decrement operations did not exist, please do not add > them at this point. Note that I have also added +=, -= and *= operations. Having them has three advantages. First, it matches expectations on what numeric types allow. Second, it results in

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/12/12, Marc Glisse wrote: > On Sun, 12 Aug 2012, Diego Novillo wrote: > > This implements the double_int rewrite. > > > > See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00711.html for > > details. > > I am taking it as a chance to ask a couple questions about the coding > conventions. > > >

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Gabriel Dos Reis wrote: > On Aug 13, 2012 Marc Glisse wrote: > > On Mon, 13 Aug 2012, Jakub Jelinek wrote: > > > On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: > > > > > +inline double_int & > > > > > +double_int::operator ++ () > > > > > +{ > > > > > + *this + double_i

Re: [patch] Fix problems with -fdebug-types-section and local types

2012-08-13 Thread Cary Coutant
> 2012-08-07 Cary Coutant > > gcc/ > * dwarf2out.c (clone_as_declaration): Copy DW_AT_abstract_origin > attribute. > (generate_skeleton_bottom_up): Remove DW_AT_object_pointer attribute > from original DIE. > (clone_tree_hash): Rename to ... > (cl

[SH] PR 52933 - Use div0s insn for integer sign comparisons

2012-08-13 Thread Oleg Endo
Hello, This patch adds basic support for utilizing the SH div0s instruction to simplify some integer sign comparisons such as '(a < 0) == (b < 0)'. Tested on rev 190332 with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" and no new

[Fortran] PR37336 - FIINAL patch [1/n]: Implement the finalization wrapper subroutine

2012-08-13 Thread Tobias Burnus
Dear all, Attached is the first part of a patch which will implement finalization support and polymorphic freeing in gfortran. It addresses two needs: a) For polymorphic ("CLASS") variables, allocatable components have to be freed; however, at compile time only the allocatable components of

[v3] fix libstdc++/54185

2012-08-13 Thread Jonathan Wakely
This fixes an error I inadvertently introduced a few months ago. 2012-08-13 David Adler PR libstdc++/54185 * src/c++11/condition_variable.cc (condition_variable): Always destroy native type in destructor. * testsuite/30_threads/condition_variable/54185.cc: New.

Re: [PATCH,i386] fma,fma4 and xop flags

2012-08-13 Thread Richard Henderson
On 08/13/2012 12:33 PM, Uros Bizjak wrote: > AFAIU fma3 is better than fma4 for bdver2 (the only CPU that > implements both FMA sets). Current description of bdver2 doesn't even > enable fma4 in processor_alias_table due to this fact. > > The change you are referring to adds preference for fma3 in

Re: Value type of map need not be default copyable

2012-08-13 Thread François Dumont
On 08/13/2012 02:10 PM, Paolo Carlini wrote: On 08/12/2012 10:00 PM, François Dumont wrote: Ok for trunk ? Ok, thanks! Paolo. PS: you may want to remove the trailing blank line of testsuite_counter_type.h Attached patch applied. 2012-08-13 François Dumont Ollie Wild *

Re: [PATCH] Fix some undefined behavior spots in gcc sources (PR c/53968)

2012-08-13 Thread Richard Sandiford
Jakub Jelinek writes: > --- gcc/simplify-rtx.c.jj 2012-08-10 15:49:20.0 +0200 > +++ gcc/simplify-rtx.c2012-08-13 09:51:43.628508537 +0200 > @@ -66,7 +66,7 @@ static rtx simplify_binary_operation_1 ( > static rtx > neg_const_int (enum machine_mode mode, const_rtx i) > { > -

[PATCH][RFC] Fixing instability of -fschedule-insns for x86

2012-08-13 Thread Igor Zamyatin
Hi all! Patch aims to fix instability introduced by first scheduler on x86. In particular it targets following list: [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46843 [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46829 [3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680 [4] http://gcc.gnu

Re: [PATCH,i386] fma,fma4 and xop flags

2012-08-13 Thread Uros Bizjak
On Mon, Aug 13, 2012 at 9:03 PM, Richard Henderson wrote: >> + (eq_attr "isa" "fma") (symbol_ref "TARGET_FMA") >> + (eq_attr "isa" "fma4") >> +(symbol_ref "TARGET_FMA4 && !TARGET_FMA") > > Why the !TARGET_FMA for fma4? > > If both ISAs are enabled, I don't see why we couldn't ch

Re: [PATCH,i386] fma,fma4 and xop flags

2012-08-13 Thread Richard Henderson
On 08/10/2012 03:24 PM, Uros Bizjak wrote: > + (eq_attr "isa" "fma") (symbol_ref "TARGET_FMA") > + (eq_attr "isa" "fma4") > +(symbol_ref "TARGET_FMA4 && !TARGET_FMA") Why the !TARGET_FMA for fma4? If both ISAs are enabled, I don't see why we couldn't choose from either. If they

[PATCH] Fix up an IRA ICE (PR middle-end/53411, rtl-optimization/53495)

2012-08-13 Thread Jakub Jelinek
Hi! move_unallocated_pseudos apparently relies on no insns being deleted in between find_moveable_pseudos and itself, which can happen when delete_trivially_dead_insns removes dead insns and insns that feed them. This can be fixed either by moving the delete_trivially_dead_insns call earlier in i

Re: [PATCH] Combine location with block using block_locations

2012-08-13 Thread Dodji Seketeli
Hello Dehao, I have mostly cosmetic comments to make about the libcpp parts. Dehao Chen writes: > Index: libcpp/include/line-map.h > === > *** libcpp/include/line-map.h (revision 189835) > --- libcpp/include/line-map.h (working cop

Re: [Patch, fortran] PR46897 - [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign

2012-08-13 Thread Mikael Morin
Hello Paul, I think there are a couple of bugs not triggered by the single component types in the test. See below. On 13/08/2012 15:37, Paul Richard Thomas wrote: > + > + /* Go through the code chain eliminating all but calls to > + typebound procedures. Since we have been through > +

Re: [v3] improve exception text when threads not enabled

2012-08-13 Thread Jonathan Wakely
On 13 August 2012 18:49, Jonathan Wakely wrote: > I suppose EOPNOTSUPP might be better, if it's supported everywhere. > EPERM has the advantage of being a documented error for > pthread_create. We do define std::errc::operation_not_supported unconditionally on most platforms, but not mingw or djgp

[contrib] Add expiration support for validate_failures.py

2012-08-13 Thread Diego Novillo
I noticed recently that while the validator was accepting the 'expire=MMDD' attribute, it was not actually doing anything with it. This patch fixes the oversight. Simon, I will be backporting the patch to google/gcc-4_7. Committed to trunk. 2012-08-13 Diego Novillo * testsuite-m

Re: complex.h

2012-08-13 Thread Jonathan Wakely
On 13 August 2012 12:57, Marc Glisse wrote: > I only modified the xml version. I expect the html version will be updated > the next time someone who knows what they are doing touches the doc... That's no problem, I tend to regenerate the html fairly frequently. Thanks.

[google/gcc-4_7] Fix regression - SUBTARGET_EXTRA_SPECS overridden by LINUX_GRTE_EXTRA_SPECS

2012-08-13 Thread 沈涵
Hi, the google/gcc-4_7 fails to linking anything (on x86-generic), by looking into specs file, it seems that 'link_emulation' section is missing in specs. The problem is in config/i386/linux.h, SUBTARGET_EXTRA_SPECS (which is not empty for chrome x86-generic) is overridden by "LINUX_GRTE_EXTRA_SPE

Re: RFC: fix std::unique_ptr pretty-printer

2012-08-13 Thread Jonathan Wakely
On 13 August 2012 14:31, Tom Tromey wrote: >> "Jonathan" == Jonathan Wakely writes: > >>> $11 = std::unique_ptr containing (datum *) 0x6067d0 > > Jonathan> It's inconsistent with the other printers in that it prints > Jonathan> the stored type, unlike e.g. std::vector which just says > Jonatha

Re: [v3] improve exception text when threads not enabled

2012-08-13 Thread Jonathan Wakely
On 13 August 2012 16:47, Joe Buck wrote: > On Sun, Aug 12, 2012 at 08:02:30PM +0100, Jonathan Wakely wrote: >> This improves the fairly uninformative "Operation not supported" >> message given when std::thread is used without linking to libpthread. >> >> Now you get: >> >> terminate called after t

Re: [PATCH 0/7] s390 improvements with r[ioxn]sbg

2012-08-13 Thread Richard Henderson
On 08/13/2012 10:07 AM, Ulrich Weigand wrote: >> +/* Check whether a rotate of ROTL followed by an AND of CONTIG is equivalent >> + to a shift followed by the AND. In particular, CONTIG should not overlap >> + the (rotated) bit 0/bit 63 gap. */ >> + >> +bool >> +s390_extzv_shift_ok (int bitsi

Re: [PATCH 0/7] s390 improvements with r[ioxn]sbg

2012-08-13 Thread Ulrich Weigand
Richard Henderson wrote: > Only "tested" visually, by examining assembly diffs of the > runtime libraries between successive patches. All told it > would appear to be some remarkable code size improvements. Thanks for having a look at this! > Please test. Unfortunately GCC crashes during bootst

[PATCH, i386]: Rewrite ix86_conditional_register_usage

2012-08-13 Thread Uros Bizjak
Hello! This patch rewrites ix86_conditional_register_usage to improve following things: - Do not mark REX registers in FIXED_REGISTERS. We know that no 32bit target supports them, so we can disable REX registers at ix86_conditional_register_usage as well. - Use bitmaps in CALL_USED_REGISTERS to c

Re: [C++ Pubnames Patch] Anonymous namespaces enclosed in named namespaces. (issue6343052)

2012-08-13 Thread Sterling Augustine
On Sun, Aug 12, 2012 at 12:46 PM, Jack Howarth wrote: > This patch introduces the regressions... > > FAIL: g++.dg/debug/dwarf2/pubnames-2.C scan-assembler > .section\t.debug_pubnames > FAIL: g++.dg/debug/dwarf2/pubnames-2.C scan-assembler > "_GLOBAL__sub_I__ZN3one3c1vE0"+[ \t]+[#;]+[ \t]+exte

Re: [v3] improve exception text when threads not enabled

2012-08-13 Thread Joe Buck
On Sun, Aug 12, 2012 at 08:02:30PM +0100, Jonathan Wakely wrote: > This improves the fairly uninformative "Operation not supported" > message given when std::thread is used without linking to libpthread. > > Now you get: > > terminate called after throwing an instance of 'std::system_error' > w

Re: combine permutations in gimple

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Marc Glisse wrote: On Mon, 13 Aug 2012, Richard Guenther wrote: If your new predicate would match more places (can you do a quick search?) You mean: if there are more optimizations that either already check for double use in the same statement, or could benefit from doi

Re: Scheduler: Save state at the end of a block

2012-08-13 Thread Vladimir Makarov
On 08/13/2012 06:32 AM, Bernd Schmidt wrote: This is a small patch for sched-rgn that attempts to save DFA state at the end of a basic block and re-use it in successor blocks. This was a customer-requested optimization; I've not seen it make much of a difference in any macro benchmarks. Bootstrap

LEA-splitting improvement patch.

2012-08-13 Thread Yuri Rumyantsev
Hi all, It is known that LEA splitting is one of the most critical problems for Atom processors and changes try to improve it through: 1. More aggressive Lea splitting – do not perform splitting if only split cost exceeds AGU stall . 2. Reordering splitting instructions to get better s

Re: combine permutations in gimple

2012-08-13 Thread Richard Guenther
On Mon, Aug 13, 2012 at 4:12 PM, Ramana Radhakrishnan wrote: > On 13 August 2012 14:54, Jakub Jelinek wrote: >> On Mon, Aug 13, 2012 at 03:45:00PM +0200, Marc Glisse wrote: >>> On Mon, 13 Aug 2012, Jakub Jelinek wrote: >>> >>> >On Mon, Aug 13, 2012 at 03:13:26PM +0200, Richard Guenther wrote: >>>

[Patch, fortran] PR 47586 Missing deep copy when assigning from a function returning a pointer.

2012-08-13 Thread Mikael Morin
Hello, here is a fix for PR47586: missing deep copy for the case: dt_w_alloc = ptr_func(arg) where dt_w_alloc is of derived type with allocatable components, and ptr_func returns a data pointer. The fix tweaks expr_is_variable so that gfc_trans_scalar_assign is called with the flag enabling deep

Re: combine permutations in gimple

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Ramana Radhakrishnan wrote: On 13 August 2012 14:21, Marc Glisse wrote: On Mon, 13 Aug 2012, Richard Guenther wrote: On Mon, Aug 13, 2012 at 3:12 PM, Ramana Radhakrishnan wrote: I guess people will complain soon enough if this causes horrible performance regressions

Re: combine permutations in gimple

2012-08-13 Thread Ramana Radhakrishnan
On 13 August 2012 14:54, Jakub Jelinek wrote: > On Mon, Aug 13, 2012 at 03:45:00PM +0200, Marc Glisse wrote: >> On Mon, 13 Aug 2012, Jakub Jelinek wrote: >> >> >On Mon, Aug 13, 2012 at 03:13:26PM +0200, Richard Guenther wrote: >> >>The patch does not do that. It merely assumes that the target kno

Re: combine permutations in gimple

2012-08-13 Thread Ramana Radhakrishnan
On 13 August 2012 14:21, Marc Glisse wrote: > On Mon, 13 Aug 2012, Richard Guenther wrote: > >> On Mon, Aug 13, 2012 at 3:12 PM, Ramana Radhakrishnan >> wrote: I guess people will complain soon enough if this causes horrible performance regressions in vectorized code. >>>

Re: combine permutations in gimple

2012-08-13 Thread Jakub Jelinek
On Mon, Aug 13, 2012 at 03:45:00PM +0200, Marc Glisse wrote: > On Mon, 13 Aug 2012, Jakub Jelinek wrote: > > >On Mon, Aug 13, 2012 at 03:13:26PM +0200, Richard Guenther wrote: > >>The patch does not do that. It merely assumes that the target knows > >>how to perform an optimal constant permute an

Re: combine permutations in gimple

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Jakub Jelinek wrote: On Mon, Aug 13, 2012 at 03:13:26PM +0200, Richard Guenther wrote: The patch does not do that. It merely assumes that the target knows how to perform an optimal constant permute and that two constant permutes never generate better code than a single one

Re: [cxx-conversion] Support garbage-collected C++ templates

2012-08-13 Thread Diego Novillo
On Sun, Aug 12, 2012 at 11:28 PM, Laurynas Biveinis wrote: > I'm referring to the very first part of gty.texi, section 22 before > the subsection table of contents: > http://gcc.gnu.org/onlinedocs/gccint/Type-Information.html#Type-Information. > It talks about C, structs and unions and it will ne

[Patch, fortran] PR46897 - [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign

2012-08-13 Thread Paul Richard Thomas
Dear All, Please find attached a patch and testcase for the above PR. The comment before generate_component_assignments explains the need for the patch, which itself is fairly self explanatory. Bootstrapped and regtested on Fc9/x86_64 - OK for trunk? Best regards Paul and Alessandro. 2012-08-

Re: RFC: fix std::unique_ptr pretty-printer

2012-08-13 Thread Tom Tromey
> "Jonathan" == Jonathan Wakely writes: >> $11 = std::unique_ptr containing (datum *) 0x6067d0 Jonathan> It's inconsistent with the other printers in that it prints Jonathan> the stored type, unlike e.g. std::vector which just says Jonathan> "std::vector of length ..." but I think that's an

Re: combine permutations in gimple

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Richard Guenther wrote: + /* Check that it is only used here. We cannot use has_single_use + since the expression is using it twice itself... */ Ah ... so then || num_imm_uses (op0) != 2 Ah, ok, that's simpler indeed, but there were such dire warnings to

Re: combine permutations in gimple

2012-08-13 Thread Jakub Jelinek
On Mon, Aug 13, 2012 at 03:13:26PM +0200, Richard Guenther wrote: > On Mon, Aug 13, 2012 at 3:12 PM, Ramana Radhakrishnan > wrote: > >> > >> I guess people will complain soon enough if this causes horrible > >> performance > >> regressions in vectorized code. > > > > Not having looked at your pat

Re: combine permutations in gimple

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Richard Guenther wrote: On Mon, Aug 13, 2012 at 3:12 PM, Ramana Radhakrishnan wrote: I guess people will complain soon enough if this causes horrible performance regressions in vectorized code. Not having looked at your patch in great detail,. surely what we don't want

Re: combine permutations in gimple

2012-08-13 Thread Richard Guenther
On Mon, Aug 13, 2012 at 3:12 PM, Ramana Radhakrishnan wrote: >> >> I guess people will complain soon enough if this causes horrible performance >> regressions in vectorized code. > > Not having looked at your patch in great detail,. surely what we don't > want is a situation where 2 constant permu

Re: combine permutations in gimple

2012-08-13 Thread Ramana Radhakrishnan
> > I guess people will complain soon enough if this causes horrible performance > regressions in vectorized code. Not having looked at your patch in great detail,. surely what we don't want is a situation where 2 constant permutations are converted into one generic permute. Based on a quick read

Re: combine permutations in gimple

2012-08-13 Thread Richard Guenther
On Mon, Aug 13, 2012 at 3:03 PM, Marc Glisse wrote: > On Mon, 13 Aug 2012, Richard Guenther wrote: > >> On Sat, Aug 11, 2012 at 2:25 PM, Marc Glisse wrote: >>> >>> On Fri, 10 Aug 2012, Marc Glisse wrote: >>> 1) I am not sure we always want to combine permutations. Indeed, someone (user?

Re: [PATCH,i386] cpuid function for prefetchw

2012-08-13 Thread H.J. Lu
On Mon, Aug 13, 2012 at 5:59 AM, Uros Bizjak wrote: > On Mon, Aug 13, 2012 at 2:10 PM, Jakub Jelinek wrote: > >>> > To get the prefetchw cpuid flag, cpuid >>> > function 0x8001 needs to be called. >>> > Previous to patch, function 0x7 is called. >>> > >>> > Bootstrapping and "make -k check" p

Re: complex.h

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Rainer Orth wrote: Paolo Carlini writes: Marc Glisse ha scritto: To be honest, I only checked the patch on linux/glibc, so there is a real risk on other platforms (which I don't have access to). I also did a quick sanity check on freebsd (not a true test). Ok, condit

Re: combine permutations in gimple

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Richard Guenther wrote: On Sat, Aug 11, 2012 at 2:25 PM, Marc Glisse wrote: On Fri, 10 Aug 2012, Marc Glisse wrote: 1) I am not sure we always want to combine permutations. Indeed, someone (user? vectorizer?) may have written 2 permutations to help the backend generate o

[PATCH] Fix loop dumping ICEs

2012-08-13 Thread Richard Guenther
Bootstrapped on x86_64-unknown-linux-gnu, committed. Richard. 2012-08-13 Richard Guenther * tree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with multiple latches. Index: gcc/tree-cfg.c =

[PATCH] Remove basic_block->loop_depth

2012-08-13 Thread Richard Guenther
Accessing loop_depth (bb->loop_father) isn't very expensive. The following removes the duplicate info in basic-blocks which is not properly kept up-to-date at the moment. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-08-13 Richard Guenther * basic-blo

Re: [PATCH,i386] cpuid function for prefetchw

2012-08-13 Thread Uros Bizjak
On Mon, Aug 13, 2012 at 2:10 PM, Jakub Jelinek wrote: >> > To get the prefetchw cpuid flag, cpuid >> > function 0x8001 needs to be called. >> > Previous to patch, function 0x7 is called. >> > >> > Bootstrapping and "make -k check" passes without failures. >> > Ok for trunk? >> >> IMHO you mov

[AArch64] Merge from upstream trunk r190154

2012-08-13 Thread Sofiane Naci
Hi, I've just merged upstream trunk on the aarch64-branch up to r190335. Thanks Sofiane

Re: Scheduler: Save state at the end of a block

2012-08-13 Thread Andrey Belevantsev
On 13.08.2012 14:32, Bernd Schmidt wrote: This is a small patch for sched-rgn that attempts to save DFA state at the end of a basic block and re-use it in successor blocks. This was a customer-requested optimization; I've not seen it make much of a difference in any macro benchmarks. FWIW, this

Re: complex.h

2012-08-13 Thread Rainer Orth
Paolo Carlini writes: > Marc Glisse ha scritto: > >>To be honest, I only checked the patch on linux/glibc, so there is a >>real >>risk on other platforms (which I don't have access to). I also did a >>quick >>sanity check on freebsd (not a true test). > > Ok, conditioning the small change on g

Re: [PATCH] Fix some undefined behavior spots in gcc sources (PR c/53968)

2012-08-13 Thread Richard Guenther
On Mon, Aug 13, 2012 at 2:01 PM, Jakub Jelinek wrote: > Hi! > > John Regehr discovered a couple of spots in GCC sources that invoke > undefined behavior during bootstrap/regtest, the following patch fixes most > of them. I couldn't reproduce the diagnostic.c failure and would like to > leave the

Re: combine permutations in gimple

2012-08-13 Thread Richard Guenther
On Sat, Aug 11, 2012 at 2:25 PM, Marc Glisse wrote: > On Fri, 10 Aug 2012, Marc Glisse wrote: > >> this patch detects permutations of permutations and merges them. It also >> canonicalizes permutations a bit more. >> >> There are several issues with this patch: >> >> 1) I am not sure we always wan

Re: [PATCH,i386] cpuid function for prefetchw

2012-08-13 Thread Jakub Jelinek
On Mon, Aug 13, 2012 at 11:45:36AM +0200, Jakub Jelinek wrote: > On Mon, Aug 13, 2012 at 09:29:45AM +, Gopalasubramanian, Ganesh wrote: > > To get the prefetchw cpuid flag, cpuid > > function 0x8001 needs to be called. > > Previous to patch, function 0x7 is called. > > > > Bootstrapping an

Re: Value type of map need not be default copyable

2012-08-13 Thread Paolo Carlini
On 08/12/2012 10:00 PM, François Dumont wrote: On 08/11/2012 03:47 PM, Marc Glisse wrote: On Sat, 11 Aug 2012, François Dumont wrote: Your remark on using std::move rather than std::forward Marc made sens but didn't work. I don't understand why but the new test is showing that std::forward

[PATCH] Fix some undefined behavior spots in gcc sources (PR c/53968)

2012-08-13 Thread Jakub Jelinek
Hi! John Regehr discovered a couple of spots in GCC sources that invoke undefined behavior during bootstrap/regtest, the following patch fixes most of them. I couldn't reproduce the diagnostic.c failure and would like to leave the ipa hunk to Honza, I think the probability/frequency code often mi

Re: complex.h

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Gabriel Dos Reis wrote: On Mon, Aug 13, 2012 at 6:17 AM, Marc Glisse wrote: On Mon, 13 Aug 2012, Gabriel Dos Reis wrote: On Fri, Aug 10, 2012 at 7:00 PM, Jonathan Wakely wrote: Let's CC Gaby, who likes to keep an eye on patches involving Thanks Jonathan. The patc

Re: Merge C++ conversion into trunk (2/6 - VEC rewrite)

2012-08-13 Thread Diego Novillo
On 12-08-13 05:39 , Richard Guenther wrote: It's an odd thing that you need to touch code replacing -> with . (yes, it's due to the use of references) but not at the same time convert those places to the new VEC interface. Yes. I hated this aspect of the initial conversion. It caused many m

Re: Merge C++ conversion into trunk (0/6 - Overview)

2012-08-13 Thread Diego Novillo
On 12-08-13 05:37 , Richard Guenther wrote: On Sun, Aug 12, 2012 at 10:04 PM, Diego Novillo wrote: I will be sending 6 patches that implement all the changes we have been making on the cxx-conversion branch. As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, these patches change

Re: complex.h

2012-08-13 Thread Gabriel Dos Reis
On Mon, Aug 13, 2012 at 6:17 AM, Marc Glisse wrote: > On Mon, 13 Aug 2012, Gabriel Dos Reis wrote: > >> On Fri, Aug 10, 2012 at 7:00 PM, Jonathan Wakely >> wrote: >>> >>> Let's CC Gaby, who likes to keep an eye on patches involving >> >> >> Thanks Jonathan. >> >> The patch is OK -- though I susp

Re: complex.h

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Gabriel Dos Reis wrote: On Fri, Aug 10, 2012 at 7:00 PM, Jonathan Wakely wrote: Let's CC Gaby, who likes to keep an eye on patches involving Thanks Jonathan. The patch is OK -- though I suspect we should have a documentation note about the extension of allowing other C

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Gabriel Dos Reis
On Mon, Aug 13, 2012 at 5:32 AM, Marc Glisse wrote: > On Mon, 13 Aug 2012, Jakub Jelinek wrote: > >> On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: +inline double_int & +double_int::operator ++ () +{ + *this + double_int_one; >>> >>> >>> *this += double_int_

Re: complex.h

2012-08-13 Thread Gabriel Dos Reis
On Fri, Aug 10, 2012 at 7:00 PM, Jonathan Wakely wrote: > Let's CC Gaby, who likes to keep an eye on patches involving Thanks Jonathan. The patch is OK -- though I suspect we should have a documentation note about the extension of allowing other C99 complex functions in . -- Gaby > > > On 10

RE: [PATCH,i386] cpuid function for prefetchw

2012-08-13 Thread Gopalasubramanian, Ganesh
Yes! Thanks Jakub. -Original Message- From: Jakub Jelinek [mailto:ja...@redhat.com] Sent: Monday, August 13, 2012 3:16 PM To: Gopalasubramanian, Ganesh Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH,i386] cpuid function for prefetchw On Mon, Aug 13, 2012 at 09:29:45AM +, Gopalasubra

Scheduler: Save state at the end of a block

2012-08-13 Thread Bernd Schmidt
This is a small patch for sched-rgn that attempts to save DFA state at the end of a basic block and re-use it in successor blocks. This was a customer-requested optimization; I've not seen it make much of a difference in any macro benchmarks. Bootstrapped and tested on x86_64-linux and also tested

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Jakub Jelinek wrote: On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: +inline double_int & +double_int::operator ++ () +{ + *this + double_int_one; *this += double_int_one; would be less confusing. Do you mean that *this + double_int_one; alone also works,

Ping: [PATCH]Remove duplicate check on BRANCH_COST in fold-const.c

2012-08-13 Thread Bin Cheng
Ping. > -Original Message- > From: Richard Earnshaw > Sent: Thursday, July 26, 2012 9:19 PM > To: Andrew Pinski > Cc: Bin Cheng; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH]Remove duplicate check on BRANCH_COST in fold-const.c > > On 26/07/12 11:27, Andrew Pinski wrote: > > On Thu, Jul

[PATCH GCC/ARM] Fix problem that hardreg_cprop opportunities are missed on thumb1

2012-08-13 Thread Bin Cheng
Hi, For thumb1, arm-gcc rewrites move insn into subtract of ZERO in peephole2 pass intentionally, then executes pass_if_after_reload/pass_regrename/pass_cprop_hardreg sequentially. In this scenario, copy propagation opportunities are missed because: 1. the move insns are re-written. 2. pass_cp

Backported patch to 4.7 branch

2012-08-13 Thread Jakub Jelinek
Hi! I've bootstrapped/regtested on x86_64-linux and i686-linux and committed the following backport to 4.7 branch. 2012-08-13 Jakub Jelinek Backported from trunk 2012-07-19 Jakub Jelinek PR rtl-optimization/53942 * function.c (assign_parm_setup_reg): Avoid

  1   2   >