[PATCH ARM/Embedded-4_8-branch]disable rtl loop invariant when optimizing for size

2013-08-28 Thread bin.cheng
Hi, The attached patch disables rtl loop invariant when optimizing for code size. Committed to ARM/Embedded-4_8-branch as r202067. Thanks. bin 2013-08-29 Zhenqiang Chen * config/arm/arm.c (arm_option_override): Disable loop2_invariant pass when optimize_size and ira-loop-pre

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Mike Stump
On Aug 28, 2013, at 1:41 PM, Kenneth Zadeck wrote: > On 08/28/2013 12:45 PM, Mike Stump wrote: >> >> tree t; >> wide_int w = t; >> >> wide_int_to_tree needs an additional type, so, the spelling is not as short >> out of necessity. > i made wide_int_to_tree a function that lives in tree.[ch], n

Go patch committed: Set TREE_PUBLIC reliably

2013-08-28 Thread Ian Lance Taylor
Uros tracked down a problem with the section used for immutable structs: the value of compute_reloc_for_constant would change between the time immutable_struct_set_init would call it and the time that get_variable_section would call it, for the same decl and the same decl initializer. He identifie

Re: [PATCH]: Fix PR middle-end/56382 -- Only move MODE_COMPLEX_FLOAT by parts if we can create pseudos

2013-08-28 Thread John David Anglin
On 24-Aug-13, at 6:43 AM, Steven Bosscher wrote: On Fri, Aug 23, 2013 at 2:47 AM, John David Anglin wrote: Ping. On 28-Jul-13, at 12:17 PM, John David Anglin wrote: This patch fixes PR middle-end/56382 on hppa64-hp-hpux11.11. The patch prevents moving a complex float by parts if we can't

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Kenneth Zadeck
Note that the bits above the precision are not defined and the algorithms used here are careful not to depend on their value. In particular, values that come in from rtx constants may have random bits. Which is a red herring. It should be fixed. I cannot even believe that sentenc

Re: [Patch, fortran] PR 52243 - avoid reallocation checks on assignment when possible

2013-08-28 Thread Tobias Burnus
Dear Thomas, dear all, Thomas Koenig wrote: the attached patch avoids checks for reallocation on assignment when the same variable is on both sides of the assignment. Regression-tested. OK for trunk? OK and thanks for the patch. (Can you remove the trailing spaces in the line the first "re

[Patch, fortran] PR 52243 - avoid reallocation checks on assignment when possible

2013-08-28 Thread Thomas Koenig
Hello world, the attached patch avoids checks for reallocation on assignment when the same variable is on both sides of the assignment. Regression-tested. OK for trunk? Thomas 2013-08-29 Thomas Koenig PR fortran/52243 * trans-expr.c (is_runtime_conformable): New fu

Re: [PATCH i386 2/8] [AVX512] Add mask registers.

2013-08-28 Thread Kirill Yukhin
Hello, On 28 Aug 13:17, Richard Henderson wrote: > Uh, no, you can't just add it when doing the split. You could be adding it in > a place that the flags register is live. You must ALWAYS have the clobber on > the whole pattern when gprs are possible. I see now, thanks a lot for explanation! >

Re: [C++ Patch] PR 58255

2013-08-28 Thread Jason Merrill
OK. Jason

Re: Make some comdats implicitly hidden

2013-08-28 Thread Jason Merrill
Looks good. Jason

[PATCH] PR58143/58227 wrong code at -O3

2013-08-28 Thread Bernd Edlinger
The lim pass (aka loop invariant motion) can move conditional expressions with possible undefined behavior out of the if statement inside a loop which may cause the loop optimization to silently generate wrong code as PR tree-optimization/58143 and PR tree-optimization/58227 demonstrate. This

Re: [PATCH, vtv update] Add documentation for --enable-vtable-verify configure option...

2013-08-28 Thread Caroline Tice
Discussion on this topic seems to have petered out. I have removed references to ENABLE_VTABLE_VERIFY from libvtv, as requested. I cannot remove them from libgcc, as they really need to be there. I have updated the documentation in install.texi, as requested. Please review the attached patch, wh

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Kenneth Zadeck
On 08/28/2013 12:45 PM, Mike Stump wrote: On Aug 28, 2013, at 5:48 AM, Richard Biener wrote: Only if the precision is > HOST_BITS_PER_WIDE_INT. If the precision is HOST_BITS_PER_WIDE_INT then both are { -1U }. That wasn't my understanding on how things work. You are thinking about prec==0 nu

Re: [PATCH i386 2/8] [AVX512] Add mask registers.

2013-08-28 Thread Richard Henderson
On 08/28/2013 11:38 AM, Kirill Yukhin wrote: >> When combine puts the AND and the NOT together, we don't know what registers >> we >> want the data in. If we do not supply the general register alternative, with >> the clobber, then we will be FORCED to implement the operation in the mask >> regis

Re: [PATCH 1/2] fix PR49847 ICE-on-HAVE_cc0 regression from PR50780 changes

2013-08-28 Thread Jeff Law
On 08/28/2013 03:50 AM, Mikael Pettersson wrote: This patch fixes an ICE that occurs in #ifdef HAVE_cc0 code. The ICE breaks both Java and Ada bootstrap on m68k-linux. There is also a tiny C++ test case in the BZ entry. The ICE is triggered by the PR middle-end/50780 changes in r180192. As exp

Re: [PATCH i386 2/8] [AVX512] Add mask registers.

2013-08-28 Thread Kirill Yukhin
Hello Richard, On 28 Aug 10:55, Richard Henderson wrote: > On 08/28/2013 10:45 AM, Kirill Yukhin wrote: > > Hello Richard, > > > > On 27 Aug 13:07, Richard Henderson wrote: > >> On 08/27/2013 11:11 AM, Kirill Yukhin wrote: > > What happened to the bmi andn alternative we discussed? > >>> BMI

Re: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C

2013-08-28 Thread Aldy Hernandez
On 08/27/13 16:27, Iyer, Balaji V wrote: Hello Aldy, I went through all the emails and here are the major issues that I could gather (other than lowering the keywords after gimplification, which I am skipping since it is more of an optimization for now). Ok, for now I am fine with delaying hand

Re: [PATCH] Sanitize block partitioning under -freorder-blocks-and-partition

2013-08-28 Thread Teresa Johnson
On Wed, Aug 28, 2013 at 9:58 AM, Jan Hubicka wrote: > Hi, > with Martin we did bit of progress on analyzing the problems. We now have > COMDAT profile merging for FDO Great! Is this the LTO merging you were talking about in an earlier message, or the gcov runtime fix (that would presumably not

Re: opt-info message change for vectorizer

2013-08-28 Thread Xinliang David Li
Fixed as requested. I don't like the extra newline either, but I will leave that to Teresa. basic3.c:8:foo: note: loop vectorized basic3.c:8:foo: note: loop versioned for vectorization because of possible aliasing basic3.c:8:foo: note: loop peeled for vectorization to enhance alignment basic3.c

Re: [PATCH][2/n] 2nd try: Re-organize -fvect-cost-model, enable basic vectorization at -O2

2013-08-28 Thread Xinliang David Li
On Wed, Aug 28, 2013 at 12:59 AM, Richard Biener wrote: > On Tue, 27 Aug 2013, Xinliang David Li wrote: > >> Richard, I have some comments about the patch. >> >> > -ftree-vectorizer-verbose=This switch is deprecated. Use >> > -fopt-info instead. >> > >> > ftree-slp-vectorize >> > ! Common

Re: [PATCH i386 2/8] [AVX512] Add mask registers.

2013-08-28 Thread Richard Henderson
On 08/28/2013 10:45 AM, Kirill Yukhin wrote: > Hello Richard, > > On 27 Aug 13:07, Richard Henderson wrote: >> On 08/27/2013 11:11 AM, Kirill Yukhin wrote: > What happened to the bmi andn alternative we discussed? >>> BMI only supported for 4- and 8- byte integers, while >>> kandw - for HI/QI

Re: [PATCH i386 2/8] [AVX512] Add mask registers.

2013-08-28 Thread Kirill Yukhin
Hello Richard, On 27 Aug 13:07, Richard Henderson wrote: > On 08/27/2013 11:11 AM, Kirill Yukhin wrote: > >> > What happened to the bmi andn alternative we discussed? > > BMI only supported for 4- and 8- byte integers, while > > kandw - for HI/QI > > > > We're talking about values in registers. I

Re: [PATCH, vtv update] Change fixed size array to a vector; fix diagnostic messages.

2013-08-28 Thread Diego Novillo
On Wed, Aug 28, 2013 at 1:39 PM, Caroline Tice wrote: > num_vtable_args was an int that we manually incremented/decremented, > so it might have been negative. I am > assuming that a vec.length() can never be negative. So before > the else-clause was explicitly checking that the value was 0 or 1

Re: [PATCH, vtv update] Change fixed size array to a vector; fix diagnostic messages.

2013-08-28 Thread Caroline Tice
On Wed, Aug 28, 2013 at 10:30 AM, Diego Novillo wrote: > On 2013-08-28 12:59 , Caroline Tice wrote: > >> static void >> -output_set_info (tree record_type, tree *vtbl_ptr_array, int array_size) >> +output_set_info (tree record_type, vec *vtbl_ptr_array) > > Okay, will do. > Since this function

Re: [PATCH, vtv update] Change fixed size array to a vector; fix diagnostic messages.

2013-08-28 Thread Diego Novillo
On 2013-08-28 12:59 , Caroline Tice wrote: static void -output_set_info (tree record_type, tree *vtbl_ptr_array, int array_size) +output_set_info (tree record_type, vec *vtbl_ptr_array) Since this function does not modify vtbl_ptr_array, you could pass it by value. @@ -1023,23 +1010,23 @

Re: Make some comdats implicitly hidden

2013-08-28 Thread Jan Hubicka
> On 08/26/2013 03:57 PM, Jan Hubicka wrote: > >While analyzing the relocations of libreoffice I noticed that I can play > >the same game w/o LTO at linker level. Making those symbols hidden truns > >external relocations to internal and should improve runtime, too: comdat > >sharing by dynamic lin

Re: [PATCH, vtv update] Change fixed size array to a vector; fix diagnostic messages.

2013-08-28 Thread Diego Novillo
There are two patches attached in your original submission. I assume they're both identical? On Wed, Aug 28, 2013 at 12:59 PM, Caroline Tice wrote: > PING! > > Could somebody please, pretty please review this patch? It's not very > big or complex, and it's been out there for three weeks now

Re: [ubsan] Introduce pointer_sized_int_node

2013-08-28 Thread Joseph S. Myers
On Wed, 28 Aug 2013, Richard Biener wrote: > > That is not easily possible. The thing is, in the C FEs they are created > > from the C/C++ type name (for stdint purposes): > > if (INTPTR_TYPE) > > intptr_type_node = > > TREE_TYPE (identifier_global_value (c_get_ident (INTPTR_TYPE)));

Re: [PATCH, tm]: Annotate _ITM_free as leaf

2013-08-28 Thread Jan Hubicka
> On Wed, Aug 28, 2013 at 07:06:04PM +0200, Uros Bizjak wrote: > > >> while adding LEAF attributes, I apparently missed free. Malloc is > > >> already annotated. > > >> Fixed thus. Comitted as obvoius. > > > > > > Given that glibc headers mark free as leaf and nothing has been reported > > > aga

Re: [PATCH] Change the badness computation to ensure no integer-underflow

2013-08-28 Thread Jan Hubicka
> > I am giving the patch brief benchmarking on profiledbootstrap and it it > > won't > > cause major regression, I think we should go ahead with the patch. Uhm, I profiledbootstrapped and we bit too fast to get resonable oprofile. What I get is: 7443 9.4372 lto1 lto1

Re: [PATCH, tm]: Annotate _ITM_free as leaf

2013-08-28 Thread Jakub Jelinek
On Wed, Aug 28, 2013 at 07:06:04PM +0200, Uros Bizjak wrote: > >> while adding LEAF attributes, I apparently missed free. Malloc is > >> already annotated. > >> Fixed thus. Comitted as obvoius. > > > > Given that glibc headers mark free as leaf and nothing has been reported > > against it, it is

[PATCH, tm]: Annotate _ITM_free as leaf

2013-08-28 Thread Uros Bizjak
Hello! >> while adding LEAF attributes, I apparently missed free. Malloc is already >> annotated. >> Fixed thus. Comitted as obvoius. > > Given that glibc headers mark free as leaf and nothing has been reported > against it, it is probably fine; but you've ignored the comment that > told you to

Re: [PATCH 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy

2013-08-28 Thread Mike Stump
On Aug 28, 2013, at 2:34 AM, Richard Biener wrote: > Huh? Why should wide-int need to be marked GTY at all?! Can I answer with a question? Why would nb_iter_bound be GTYed? Why would dw_val_struct be GTYed? The first makes little sense to me. The second, well, it is used to generate debug

Re: [PATCH, vtv update] Change fixed size array to a vector; fix diagnostic messages.

2013-08-28 Thread Caroline Tice
PING! Could somebody please, pretty please review this patch? It's not very big or complex, and it's been out there for three weeks nowIs there something else I need to do for this? -- Caroline Tice cmt...@google.com On Wed, Aug 21, 2013 at 1:30 PM, Caroline Tice wrote: > Ping? Ping? > > O

Re: [PATCH] Sanitize block partitioning under -freorder-blocks-and-partition

2013-08-28 Thread Jan Hubicka
Hi, with Martin we did bit of progress on analyzing the problems. We now have COMDAT profile merging for FDO and we also noticed that forks can make your basic blocks appear never executed even though they are executed every run: the fork is accounted as 3 independnet runs of the program. First r

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Mike Stump
On Aug 28, 2013, at 5:48 AM, Richard Biener wrote: >> Only if the precision is > HOST_BITS_PER_WIDE_INT. If the precision >> is HOST_BITS_PER_WIDE_INT then both are { -1U }. > > That wasn't my understanding on how things work. You are thinking about prec==0 numbers. These are useful and import

Re: [PATCH] Convert more passes to new dump framework

2013-08-28 Thread Teresa Johnson
On Wed, Aug 28, 2013 at 7:09 AM, Teresa Johnson wrote: > On Wed, Aug 28, 2013 at 4:01 AM, Richard Biener > wrote: >> On Wed, Aug 7, 2013 at 7:23 AM, Teresa Johnson wrote: >>> On Tue, Aug 6, 2013 at 9:29 AM, Teresa Johnson wrote: On Tue, Aug 6, 2013 at 9:01 AM, Martin Jambor wrote: > H

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Mike Stump
On Aug 28, 2013, at 3:22 AM, Richard Biener wrote: > Btw, rtl.h still wastes space with > > struct GTY((variable_size)) hwivec_def { > int num_elem; /* number of elements */ > HOST_WIDE_INT elem[1]; > }; > > struct GTY((chain_next ("RTX_NEXT (&%h)"), >chain_prev ("RTX_PREV

Re: [RFC] Old school parallelization of WPA streaming

2013-08-28 Thread Michael Matz
Hi, On Wed, 21 Aug 2013, Richard Biener wrote: > I also fail to see why threads should not work here. Maybe simply > annotate gcc with openmp? Threads simply don't work here, because the whole streamer infrastructure (or anything else in GCC for that matter) isn't thread safe (you'd have to

Re: [PATCH] -mcmodel=large -fpic TLS GD and LD support gcc + binutils (PR target/58067)

2013-08-28 Thread H.J. Lu
On Wed, Aug 28, 2013 at 2:37 AM, Jakub Jelinek wrote: > On Wed, Aug 14, 2013 at 09:03:24AM +0200, Uros Bizjak wrote: >> The implementation for x86 is technically OK, but I wonder if these >> sequences should be documented in some authoritative document about >> TLS relocations. The "ELF Handling F

Re: [PATCH] Convert more passes to new dump framework

2013-08-28 Thread Xinliang David Li
On Wed, Aug 28, 2013 at 7:09 AM, Teresa Johnson wrote: > On Wed, Aug 28, 2013 at 4:01 AM, Richard Biener > wrote: >> On Wed, Aug 7, 2013 at 7:23 AM, Teresa Johnson wrote: >>> On Tue, Aug 6, 2013 at 9:29 AM, Teresa Johnson wrote: On Tue, Aug 6, 2013 at 9:01 AM, Martin Jambor wrote: > H

Another jump threading improvement

2013-08-28 Thread Jeff Law
When the code was written to thread jumps through joiner blocks, out of an abundance of caution I severely restricted the form allowed for the successors of the joiner block. In particular we required the successor of the joiner block to have just one predecessor and more than one successor.

[PATCH, PR 58106] Make ipa_edge_duplication_hook cope with recursive inlining

2013-08-28 Thread Martin Jambor
Hi, PR 58106 happens because the reference description duplication code cannot deal with existence of master_nodes of recursive inlining. It did not put rdescs pertaining to edges going out of these nodes to the lookup linked list (because they do not seem to be inlined into anything) but the rem

Re: [PATCH] Convert more passes to new dump framework

2013-08-28 Thread Teresa Johnson
On Wed, Aug 28, 2013 at 4:01 AM, Richard Biener wrote: > On Wed, Aug 7, 2013 at 7:23 AM, Teresa Johnson wrote: >> On Tue, Aug 6, 2013 at 9:29 AM, Teresa Johnson wrote: >>> On Tue, Aug 6, 2013 at 9:01 AM, Martin Jambor wrote: Hi, On Tue, Aug 06, 2013 at 07:14:42AM -0700, Teresa Jo

Re: [PATCH] Change the badness computation to ensure no integer-underflow

2013-08-28 Thread Richard Biener
On Wed, Aug 28, 2013 at 2:13 PM, Jan Hubicka wrote: >> On Tue, Aug 27, 2013 at 2:50 PM, Jan Hubicka wrote: >> >> >> >> >> >> I've updated the patch (as attached) to use sreal to compute badness. >> >> + badness = ((int)((double) edge->count / max_count >> >> + * relbenefit / RELAT

Re: Free decl_in_states when not needed

2013-08-28 Thread Jan Hubicka
> > Index: lto-section-in.c > > === > > --- lto-section-in.c(revision 202047) > > +++ lto-section-in.c(working copy) > > @@ -414,6 +414,41 @@ lto_get_function_in_decl_state (struct l > >return slot? ((struct lto_in_

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Jakub Jelinek
On Wed, Aug 28, 2013 at 03:30:46PM +0200, Marek Polacek wrote: > >From a quick look, it doesn't seem like we do. (I was searching for > something about pointer_map in ggc* and gen* files.) If we can't make it GC aware easily, I'm afraid we need to revert that change to pointer_map. Now, the ques

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Marek Polacek
On Wed, Aug 28, 2013 at 03:05:37PM +0200, Jakub Jelinek wrote: > On Wed, Aug 28, 2013 at 02:57:01PM +0200, Marek Polacek wrote: > > On Wed, Aug 28, 2013 at 02:49:54PM +0200, Richard Biener wrote: > > > On Wed, Aug 28, 2013 at 2:15 PM, Marek Polacek wrote: > > > > On Wed, Aug 28, 2013 at 12:40:50PM

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Richard Biener
On Wed, Aug 28, 2013 at 3:05 PM, Jakub Jelinek wrote: > On Wed, Aug 28, 2013 at 02:57:01PM +0200, Marek Polacek wrote: >> On Wed, Aug 28, 2013 at 02:49:54PM +0200, Richard Biener wrote: >> > On Wed, Aug 28, 2013 at 2:15 PM, Marek Polacek wrote: >> > > On Wed, Aug 28, 2013 at 12:40:50PM +0200, Ric

[C++ Patch] PR 58255

2013-08-28 Thread Paolo Carlini
Hi, for value-initialization (thus void_type_node as init), explicit should not matter, thus we shouldn't set LOOKUP_ONLYCONVERTING. I also double checked that we do the right thing for testcases like: struct A { explicit A(int = 0); }; A a1 = 1; /* error */ A a2; /* Ok */ A a3(2); /*

Re: opt-info message change for vectorizer

2013-08-28 Thread Teresa Johnson
On Wed, Aug 28, 2013 at 2:45 AM, Richard Biener wrote: > On Tue, Aug 27, 2013 at 10:30 PM, Xinliang David Li > wrote: >> If this is the convention, we should probably have another patch to >> fix all the existing opt-info messages. > > Yes please. > > Also ... > > > b.c:16:A::foo: note: Loop

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Kenneth Zadeck
Note that the bits above the precision are not defined and the algorithms used here are careful not to depend on their value. In particular, values that come in from rtx constants may have random bits. Which is a red herring. It should be fixed. I cannot even believe that sentenc

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Jakub Jelinek
On Wed, Aug 28, 2013 at 02:57:01PM +0200, Marek Polacek wrote: > On Wed, Aug 28, 2013 at 02:49:54PM +0200, Richard Biener wrote: > > On Wed, Aug 28, 2013 at 2:15 PM, Marek Polacek wrote: > > > On Wed, Aug 28, 2013 at 12:40:50PM +0200, Richard Biener wrote: > > >> On Tue, Aug 27, 2013 at 2:33 PM, M

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Marek Polacek
On Wed, Aug 28, 2013 at 02:49:54PM +0200, Richard Biener wrote: > On Wed, Aug 28, 2013 at 2:15 PM, Marek Polacek wrote: > > On Wed, Aug 28, 2013 at 12:40:50PM +0200, Richard Biener wrote: > >> On Tue, Aug 27, 2013 at 2:33 PM, Marek Polacek wrote: > >> > It turned out that for tree -> tree mapping

Re: [PATCH] Support dumping type bindings and 'mutable' qualifier in lambda diagnostics.

2013-08-28 Thread Gabriel Dos Reis
On Tue, Aug 27, 2013 at 7:54 PM, Adam Butcher wrote: > * error.c (dump_function_decl): Use standard diagnostic flow to dump a > lambda diagnostic, albeit without stating the function name or > duplicating the parameter spec (which is dumped as part of the type). > R

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Richard Biener
On Wed, Aug 28, 2013 at 2:15 PM, Marek Polacek wrote: > On Wed, Aug 28, 2013 at 12:40:50PM +0200, Richard Biener wrote: >> On Tue, Aug 27, 2013 at 2:33 PM, Marek Polacek wrote: >> > It turned out that for tree -> tree mapping we don't need the hash >> > table at all; pointer map is much more conv

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Richard Sandiford wrote: > Richard Biener writes: > > > On Wed, 28 Aug 2013, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> >> So the precision variable is good for the rtl level in several ways: > >> >> > >> >> - As you say, it avoids adding the explicit tr

[ubsan] Fix Makefile.in dependencies

2013-08-28 Thread Marek Polacek
As usually, when changing #include's in ubsan.c, I forgot to adjust Makefile.in as well. Thus fixed now. Applying to the ubsan branch. 2013-08-28 Marek Polacek * Makefile.in (ubsan.o): Add pointer-set.h dependency. Remove alloc-pool.h and HASH_TABLE_H dependencies. --- gcc/

Re: wide-int branch updated.

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Kenneth Zadeck wrote: > On 08/28/2013 03:45 AM, Richard Biener wrote: > > On Tue, 27 Aug 2013, Kenneth Zadeck wrote: > > > > > removed all knowledge of SHIFT_COUNT_TRUNCATED from wide-int > > > > > > both Richard Biener and Richard Sandiford had commented negatively about >

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Sandiford
Richard Biener writes: > On Wed, 28 Aug 2013, Richard Sandiford wrote: > >> Richard Biener writes: >> >> So the precision variable is good for the rtl level in several ways: >> >> >> >> - As you say, it avoids adding the explicit truncations that (in practice) >> >> every rtl operation would

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Marek Polacek
On Wed, Aug 28, 2013 at 12:40:50PM +0200, Richard Biener wrote: > On Tue, Aug 27, 2013 at 2:33 PM, Marek Polacek wrote: > > It turned out that for tree -> tree mapping we don't need the hash > > table at all; pointer map is much more convenient. So this patch > > weeds out the hash table out of u

Re: [PATCH] Change the badness computation to ensure no integer-underflow

2013-08-28 Thread Jan Hubicka
> On Tue, Aug 27, 2013 at 2:50 PM, Jan Hubicka wrote: > >> >> > >> >> I've updated the patch (as attached) to use sreal to compute badness. > >> + badness = ((int)((double) edge->count / max_count > >> + * relbenefit / RELATIVE_TIME_BENEFIT_RANGE * INT_MIN / 2)) / > >> growth

Re: wide-int branch updated

2013-08-28 Thread Kenneth Zadeck
On 08/28/2013 03:50 AM, Richard Biener wrote: On Tue, 27 Aug 2013, Richard Sandiford wrote: Kenneth Zadeck writes: fixed fits_uhwi_p. tested on x86-64. kenny Index: gcc/wide-int.h === --- gcc/wide-int.h (revision 201985)

Re: wide-int branch updated.

2013-08-28 Thread Kenneth Zadeck
On 08/28/2013 03:45 AM, Richard Biener wrote: On Tue, 27 Aug 2013, Kenneth Zadeck wrote: removed all knowledge of SHIFT_COUNT_TRUNCATED from wide-int both Richard Biener and Richard Sandiford had commented negatively about this. fixed bug with wide-int::fits_uhwi_p. inline bool wide_int_

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Richard Sandiford wrote: > Richard Biener writes: > >> So the precision variable is good for the rtl level in several ways: > >> > >> - As you say, it avoids adding the explicit truncations that (in practice) > >> every rtl operation would need > >> > >> - It's more effic

Re: ELF interposition and One Definition Rule

2013-08-28 Thread Jan Hubicka
> > I had thought that that case (overriding malloc etc) was what this patch was > > dealing with. Perhaps I was confused. > > > > There's nothing particularly special about ctors, dtors and virtual function > > implementations. Their common feature, as Jan described, is that it's hard > > to tak

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Sandiford
Richard Biener writes: >> So the precision variable is good for the rtl level in several ways: >> >> - As you say, it avoids adding the explicit truncations that (in practice) >> every rtl operation would need >> >> - It's more efficient in that case, since we don't calculate high values >>

Re: [ubsan] Introduce pointer_sized_int_node

2013-08-28 Thread Richard Biener
On Wed, Aug 28, 2013 at 1:10 PM, Jakub Jelinek wrote: > On Wed, Aug 28, 2013 at 12:48:41PM +0200, Richard Biener wrote: >> On Tue, Aug 27, 2013 at 2:56 PM, Marek Polacek wrote: >> > On Tue, Aug 27, 2013 at 01:48:29PM +0200, Richard Biener wrote: >> >> > + TI_POINTER_SIZED_TYPE, >> >> >> >> I'd r

Re: [ubsan] Introduce pointer_sized_int_node

2013-08-28 Thread Jakub Jelinek
On Wed, Aug 28, 2013 at 12:48:41PM +0200, Richard Biener wrote: > On Tue, Aug 27, 2013 at 2:56 PM, Marek Polacek wrote: > > On Tue, Aug 27, 2013 at 01:48:29PM +0200, Richard Biener wrote: > >> > + TI_POINTER_SIZED_TYPE, > >> > >> I'd rather see TI_UINTPTR_TYPE and TI_INTPTR_TYPE (note they might

Re: Free decl_in_states when not needed

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Jan Hubicka wrote: > Hi, > this patch saves almost 1Gb of GGC reachable memory for firefox. > Currently we point to all streamed in trees from global decl in state and from > function specific states. The states are big and they dangle pointers. > This patch gets rid of stat

Re: [PATCH] Convert more passes to new dump framework

2013-08-28 Thread Richard Biener
On Wed, Aug 7, 2013 at 7:23 AM, Teresa Johnson wrote: > On Tue, Aug 6, 2013 at 9:29 AM, Teresa Johnson wrote: >> On Tue, Aug 6, 2013 at 9:01 AM, Martin Jambor wrote: >>> Hi, >>> >>> On Tue, Aug 06, 2013 at 07:14:42AM -0700, Teresa Johnson wrote: On Tue, Aug 6, 2013 at 5:37 AM, Martin Jambor

Re: [ubsan] Introduce pointer_sized_int_node

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 2:56 PM, Marek Polacek wrote: > On Tue, Aug 27, 2013 at 01:48:29PM +0200, Richard Biener wrote: >> > + TI_POINTER_SIZED_TYPE, >> >> I'd rather see TI_UINTPTR_TYPE and TI_INTPTR_TYPE (note they might >> not be exactly of POINTER_SIZE but larger). > > We already have [u]intp

Free decl_in_states when not needed

2013-08-28 Thread Jan Hubicka
Hi, this patch saves almost 1Gb of GGC reachable memory for firefox. Currently we point to all streamed in trees from global decl in state and from function specific states. The states are big and they dangle pointers. This patch gets rid of states we do not need. We run GGC collect just once du

Re: ELF interposition and One Definition Rule

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 2:53 PM, Nathan Sidwell wrote: > On 08/26/13 20:58, Jason Merrill wrote: > >> I would be happy with an even stronger default that optimizes on the >> assumption >> that no interposition occurs; typically interposition is overriding a >> symbol >> found in a dynamic library

Re: [PATCH] Change the badness computation to ensure no integer-underflow

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 2:50 PM, Jan Hubicka wrote: >> >> >> >> I've updated the patch (as attached) to use sreal to compute badness. >> + badness = ((int)((double) edge->count / max_count >> + * relbenefit / RELATIVE_TIME_BENEFIT_RANGE * INT_MIN / 2)) / growth; >> + >> >>> >>

Re: [ubsan] Use pointer map instead of hash table.

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 2:33 PM, Marek Polacek wrote: > It turned out that for tree -> tree mapping we don't need the hash > table at all; pointer map is much more convenient. So this patch > weeds out the hash table out of ubsan and introduces pointer map > instead. Quite a lot of code could go

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Richard Sandiford wrote: > Richard Biener writes: > >> * As above, constants coming from rtl are already in the right form, > >> so if you create a wide_int from an rtx and only query it, no explicit > >> extension is needed. > >> > >> * Things like logical operations an

[committed] Fix bogus warning on OpenMP collapsed loops (PR middle-end/58257)

2013-08-28 Thread Jakub Jelinek
Hi! The .count.NN vars have TREE_NO_WARNING set on them, because they may be uninitialized if the loop body isn't executed at all (zero trip count), but copy_var_decl wasn't propagating the flag over to the parallel body ompfn function vars. Fixed thusly, tested on x86_64-linux, committed to trun

[PATCH 2/2] fix PR48835 ICE-on-HAVE_cc0 regression from PR50780 changes

2013-08-28 Thread Mikael Pettersson
This patch fixes an ICE that occurs in #ifdef HAVE_cc0 code. The ICE breaks Ada bootstrap with m68060 multilibs on m68k-linux; see . The ICE is triggered by the PR middle-end/50780 changes in r180192. Unlike the previous patch for PR49847, th

[PATCH 1/2] fix PR49847 ICE-on-HAVE_cc0 regression from PR50780 changes

2013-08-28 Thread Mikael Pettersson
This patch fixes an ICE that occurs in #ifdef HAVE_cc0 code. The ICE breaks both Java and Ada bootstrap on m68k-linux. There is also a tiny C++ test case in the BZ entry. The ICE is triggered by the PR middle-end/50780 changes in r180192. As explained in

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Sandiford
Richard Biener writes: >> * As above, constants coming from rtl are already in the right form, >> so if you create a wide_int from an rtx and only query it, no explicit >> extension is needed. >> >> * Things like logical operations and right shifts naturally preserve >> the sign-extended fo

Re: opt-info message change for vectorizer

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 10:30 PM, Xinliang David Li wrote: > If this is the convention, we should probably have another patch to > fix all the existing opt-info messages. Yes please. Also ... b.c:16:A::foo: note: Loop is vectorized "loop vectorized" b.c:16:A::foo: note: Loop i

Re: [PATCH] -mcmodel=large -fpic TLS GD and LD support gcc + binutils (PR target/58067)

2013-08-28 Thread Uros Bizjak
On Wed, Aug 28, 2013 at 11:37 AM, Jakub Jelinek wrote: > On Wed, Aug 14, 2013 at 09:03:24AM +0200, Uros Bizjak wrote: >> The implementation for x86 is technically OK, but I wonder if these >> sequences should be documented in some authoritative document about >> TLS relocations. The "ELF Handling

Re: [PATCH] -mcmodel=large -fpic TLS GD and LD support gcc + binutils (PR target/58067)

2013-08-28 Thread Jakub Jelinek
On Wed, Aug 14, 2013 at 09:03:24AM +0200, Uros Bizjak wrote: > The implementation for x86 is technically OK, but I wonder if these > sequences should be documented in some authoritative document about > TLS relocations. The "ELF Handling For Thread-Local Storage" document > [1] doesn't mention vari

Re: [PATCH 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 5:06 PM, Mike Stump wrote: > On Aug 27, 2013, at 4:08 AM, Richard Biener > wrote: >>> and converts: >>> struct GTY(()) cgraph_node >>> to: >>> struct GTY((user)) cgraph_node : public symtab_node_base > > GTY didn't like single inheritance for me in in wide-int.h. I ext

Re: [PING PATCH, PR 57748] Set mode of structures with zero sized arrays to be BLK

2013-08-28 Thread Martin Jambor
On Wed, Aug 28, 2013 at 10:17:52AM +0200, Richard Biener wrote: > On Wed, 28 Aug 2013, Richard Biener wrote: > > Eh ... :/ > > > > I'm extremely nervous about this change. I also believe the change > > is unrelated to the issue in the bugreport (even if it happens to > > fix the ICE). > > > > Le

Re: Remove streaming of some tree flags and fields

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Jan Hubicka wrote: > Hi, > this patch removes streaming of DECL_DEFER_OUTPUT, BINFO_INHERITANCE_CHAIN. > BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, DECL_IN_TEXT_SECTION. > and DECL_ERROR_ISSUED. > > I originally intended to remove DECL_DEFER_OUTPUT completely (it is pointless > ev

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Biener
On Sun, 25 Aug 2013, Mike Stump wrote: > On Aug 25, 2013, at 12:26 AM, Richard Sandiford > wrote: > > (2) Adding a new namespace, wi, for the operators. So far this > >just contains the previously-static comparison functions > >and whatever else was needed to avoid cross-dependencies >

[PATCH] Support dumping type bindings and 'mutable' qualifier in lambda diagnostics.

2013-08-28 Thread Adam Butcher
* error.c (dump_function_decl): Use standard diagnostic flow to dump a lambda diagnostic, albeit without stating the function name or duplicating the parameter spec (which is dumped as part of the type). Rather than qualifying the diagnostic with 'const' for plain la

Re: wide-int branch now up for public comment and review

2013-08-28 Thread Richard Biener
On Fri, 23 Aug 2013, Richard Sandiford wrote: > Hi Kenny, > > This is the first time I've looked at the implementation of wide-int.h > (rather than just looking at the rtl changes, which as you know I like > in general), so FWIW here are some comments on wide-int.h. I expect > a lot of them over

Remove streaming of some tree flags and fields

2013-08-28 Thread Jan Hubicka
Hi, this patch removes streaming of DECL_DEFER_OUTPUT, BINFO_INHERITANCE_CHAIN. BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, DECL_IN_TEXT_SECTION. and DECL_ERROR_ISSUED. I originally intended to remove DECL_DEFER_OUTPUT completely (it is pointless ever since we are unit-at-a-time), but that is bit harder

Re: [PATCH, i386] PR 57927: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K)

2013-08-28 Thread Uros Bizjak
Hello! >> >>> As reported in [1] the host processor detection has not yet been updated >> >>> to recognize Intel Ivy Bridge and Haswell processors. >> >>> This small patch adds the detection of these processors and assumes >> >>> core-avx2 as march for unknown processors of the PENTIUMPRO family t

Re: [PING PATCH, PR 57748] Set mode of structures with zero sized arrays to be BLK

2013-08-28 Thread Richard Biener
On Wed, 28 Aug 2013, Richard Biener wrote: > On Tue, 27 Aug 2013, Jakub Jelinek wrote: > > > On Tue, Aug 27, 2013 at 04:03:42PM +0200, Martin Jambor wrote: > > > On Fri, Aug 23, 2013 at 05:29:23PM +0200, Jakub Jelinek wrote: > > > > On Fri, Aug 23, 2013 at 05:11:22PM +0200, Martin Jambor wrote: >

Re: [PING PATCH, PR 57748] Set mode of structures with zero sized arrays to be BLK

2013-08-28 Thread Richard Biener
On Tue, 27 Aug 2013, Jakub Jelinek wrote: > On Tue, Aug 27, 2013 at 04:03:42PM +0200, Martin Jambor wrote: > > On Fri, Aug 23, 2013 at 05:29:23PM +0200, Jakub Jelinek wrote: > > > On Fri, Aug 23, 2013 at 05:11:22PM +0200, Martin Jambor wrote: > > > > Hi Jakub and/or Joseph, > > > > > > > > the re

Re: [PATCH][2/n] 2nd try: Re-organize -fvect-cost-model, enable basic vectorization at -O2

2013-08-28 Thread Richard Biener
On Tue, 27 Aug 2013, Xinliang David Li wrote: > Richard, I have some comments about the patch. > > > -ftree-vectorizer-verbose=This switch is deprecated. Use > > -fopt-info instead. > > > > ftree-slp-vectorize > > ! Common Report Var(flag_tree_slp_vectorize) Optimization > > Enable bas

Re: wide-int branch updated

2013-08-28 Thread Richard Biener
On Tue, 27 Aug 2013, Richard Sandiford wrote: > Kenneth Zadeck writes: > > fixed fits_uhwi_p. > > > > tested on x86-64. > > > > kenny > > > > Index: gcc/wide-int.h > > === > > --- gcc/wide-int.h (revision 201985) > > +++ gcc/wide-in

Re: wide-int branch updated.

2013-08-28 Thread Richard Biener
On Tue, 27 Aug 2013, Kenneth Zadeck wrote: > removed all knowledge of SHIFT_COUNT_TRUNCATED from wide-int > > both Richard Biener and Richard Sandiford had commented negatively about > this. > > fixed bug with wide-int::fits_uhwi_p. inline bool wide_int_ro::fits_uhwi_p () const { - return (

[PATCH] Fix gcc.dg/vect/pr56933.c runtime

2013-08-28 Thread Richard Biener
Using check_vect (). Tested on x86_64-unknown-linux-gnu, applied. Richard. 2013-08-28 Richard Biener PR tree-optimization/56933 * gcc.dg/vect/pr56933.c: Properly guard runtime with check_vect (). Index: gcc/testsuite/gcc.dg/vect/pr56933.c ===

Re: Annotate free as leaf

2013-08-28 Thread Jakub Jelinek
On Wed, Aug 28, 2013 at 09:21:28AM +0200, Jan Hubicka wrote: > while adding LEAF attributes, I apparently missed free. Malloc is already > annotated. > Fixed thus. Comitted as obvoius. Given that glibc headers mark free as leaf and nothing has been reported against it, it is probably fine; but

Annotate free as leaf

2013-08-28 Thread Jan Hubicka
Hi, while adding LEAF attributes, I apparently missed free. Malloc is already annotated. Fixed thus. Comitted as obvoius. Honza cndex: ChangeLog === --- ChangeLog (revision 202003) +++ ChangeLog (working copy) @@ -1,5 +1,9 @@

  1   2   >