Re: DECL_STRUCT_FUNCTION(cgraphnode-decl) == NULL when attempting Link-Time Optimization in plugin

2012-10-09 Thread Richard Guenther
On Mon, Oct 8, 2012 at 11:29 PM, David Malcolm dmalc...@redhat.com wrote: On Mon, 2012-10-08 at 18:21 +0200, Richard Guenther wrote: On Mon, Oct 8, 2012 at 5:17 PM, David Malcolm dmalc...@redhat.com wrote: I'm working on a static analysis extension to GCC via my gcc-python-plugin [1

Re: patch to fix constant math

2012-10-09 Thread Richard Guenther
On Mon, Oct 8, 2012 at 9:55 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Robert Dewar de...@adacore.com writes: On 10/8/2012 11:01 AM, Nathan Froyd wrote: - Original Message - Btw, as for Richards idea of conditionally placing the length field in rtx_def looks like

Re: Small cleanup/memory leak plugs for lto

2012-10-09 Thread Richard Guenther
On Mon, Oct 8, 2012 at 10:05 PM, Tobias Burnus bur...@net-b.de wrote: Some more issues found by Coverity scanner. lto-cgraph.c: The code seems to be unused, besides, it's a zero-trip loop as parm_num is set to 0 and then checked non nonzeroness. lto-opts: The check whether first_p is non

Re: [lra] 3rd patch to speed more compilation of PR54146

2012-10-09 Thread Richard Guenther
On Tue, Oct 9, 2012 at 6:10 PM, Vladimir Makarov vmaka...@redhat.com wrote: On 10/08/2012 05:14 PM, Steven Bosscher wrote: On Mon, Oct 8, 2012 at 10:26 PM, Vladimir Makarov vmaka...@redhat.com wrote: So I checked it on big file with hundred functionson Intel machine and got before a part

Re: TODO_rebuild_alias and -O0

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 11:26 AM, Ludovic Courtès l...@gnu.org wrote: Hello, Consider the attached plug-in, which adds a new dummy pass after the “ssa” pass, with ‘TODO_rebuild_alias’ as its start flags: When compiling with -O0 a non-trivial file with that plug-in, one ends up with:

Re: TODO_rebuild_alias and -O0

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 11:58 AM, Ludovic Courtès l...@gnu.org wrote: Richard Guenther richard.guent...@gmail.com skribis: At -O0 no virtual operands are produced. TODO_rebuild_alias only computes points-to sets which are in itself not useful. What do you want to achieve

Re: TODO_rebuild_alias and -O0

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 1:42 PM, Ludovic Courtès l...@gnu.org wrote: Richard Guenther richard.guent...@gmail.com skribis: On Mon, Oct 8, 2012 at 11:58 AM, Ludovic Courtès l...@gnu.org wrote: Richard Guenther richard.guent...@gmail.com skribis: At -O0 no virtual operands are produced

Re: TODO_rebuild_alias and -O0

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 3:32 PM, Ludovic Courtès l...@gnu.org wrote: Richard Guenther richard.guent...@gmail.com skribis: On Mon, Oct 8, 2012 at 1:42 PM, Ludovic Courtès l...@gnu.org wrote: Richard Guenther richard.guent...@gmail.com skribis: On Mon, Oct 8, 2012 at 11:58 AM, Ludovic Courtès l

Re: TODO_rebuild_alias and -O0

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 6:04 PM, Ludovic Courtès ludovic.cour...@inria.fr wrote: Richard Guenther richard.guent...@gmail.com skribis: On Mon, Oct 8, 2012 at 3:32 PM, Ludovic Courtès l...@gnu.org wrote: Richard Guenther richard.guent...@gmail.com skribis: On Mon, Oct 8, 2012 at 1:42 PM

Re: DECL_STRUCT_FUNCTION(cgraphnode-decl) == NULL when attempting Link-Time Optimization in plugin

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 5:17 PM, David Malcolm dmalc...@redhat.com wrote: I'm working on a static analysis extension to GCC via my gcc-python-plugin [1] The analysis is interprocedural (memory leak detection, as it happens). I have it working on one translation unit at a time, and I'm

Re: Fixup INTEGER_CST

2012-10-08 Thread Richard Guenther
On Sun, Oct 7, 2012 at 7:22 PM, Jan Hubicka hubi...@ucw.cz wrote: On Sun, Oct 7, 2012 at 5:15 PM, Jan Hubicka hubi...@ucw.cz wrote: Hi, I added a santy check that after fixup all types that lost in the merging are really dead. And it turns out we have some zombies around.

Re: handle isl and cloog in contrib/download_prerequisites

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 3:16 AM, Jonathan Wakely jwakely@gmail.com wrote: On 7 October 2012 21:31, Manuel López-Ibáñez wrote: On 7 October 2012 22:13, Jonathan Wakely jwakely@gmail.com wrote: On Oct 7, 2012 12:00 AM, NightStrike nightstr...@gmail.com wrote: On Sat, Oct 6, 2012 at 7:30

Re: [lra] patch to speed more compilation of PR54146

2012-10-08 Thread Richard Guenther
On Sun, Oct 7, 2012 at 11:27 PM, Steven Bosscher stevenb@gmail.com wrote: On Sun, Oct 7, 2012 at 5:59 PM, Vladimir Makarov wrote: The following patch speeds LRA up more on PR54146. Below times for compilation of the test on gcc17.fsffrance.org (an AMD machine): Before: real=1214.71

Re: [ping patch] Predict for loop exits in short-circuit conditions

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 4:50 AM, Dehao Chen de...@google.com wrote: Attached is the updated patch. Yes, if we add a VRP pass before profile pass, this patch would be unnecessary. Should we add a VRP pass? No, we don't want VRP in early optimizations. Richard. Thanks, Dehao On Sat, Oct 6,

Re: [PATCH] Fix PR54489 - FRE needing AVAIL_OUT

2012-10-08 Thread Richard Guenther
On Fri, 5 Oct 2012, Steven Bosscher wrote: On Fri, Sep 14, 2012 at 2:26 PM, Richard Guenther rguent...@suse.de wrote: If you can figure out a better name for the function we should probably move it to cfganal.c It looks like my previous e-mail about this appears to have gone got somehow

Re: vec_cond_expr adjustments

2012-10-08 Thread Richard Guenther
On Fri, Oct 5, 2012 at 5:01 PM, Marc Glisse marc.gli...@inria.fr wrote: [I am still a little confused, sorry for the long email...] On Tue, 2 Oct 2012, Richard Guenther wrote: + if (TREE_CODE (op0) == VECTOR_CST TREE_CODE (op1) == VECTOR_CST) +{ + int count = VECTOR_CST_NELTS

Re: patch to fix constant math - second small patch

2012-10-08 Thread Richard Guenther
On Sat, Oct 6, 2012 at 12:48 AM, Kenneth Zadeck zad...@naturalbridge.com wrote: This patch adds machinery to genmodes.c so that largest possible sizes of various data structures can be determined at gcc build time. These functions create 3 symbols that are available in insn-modes.h:

Re: patch to fix constant math - third small patch

2012-10-08 Thread Richard Guenther
On Sat, Oct 6, 2012 at 5:55 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: This is the third patch in the series of patches to fix constant math. this one changes some predicates at the rtl level to use the new predicate CONST_SCALAR_INT_P. I did not include a few that were tightly

Re: Check that unlinked uses do not contain ssa-names when renaming.

2012-10-08 Thread Richard Guenther
On Sun, Oct 7, 2012 at 12:44 PM, Tom de Vries tom_devr...@mentor.com wrote: Richard, attached patch checks that unlinked uses do not contain ssa-names when renaming. This assert triggers when compiling (without the fix) the PR54735 example. AFAIU, it was due to chance that we caught the

Re: patch to fix constant math

2012-10-08 Thread Richard Guenther
On Sun, Oct 7, 2012 at 4:58 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: On 10/07/2012 09:19 AM, Richard Guenther wrote: In fact, you could argue that the tree level did it wrong (not that i am suggesting to change this). But it makes me think what was going on when the decision

Re: Fixup INTEGER_CST

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 11:18 AM, Jan Hubicka hubi...@ucw.cz wrote: On Sun, Oct 7, 2012 at 7:22 PM, Jan Hubicka hubi...@ucw.cz wrote: On Sun, Oct 7, 2012 at 5:15 PM, Jan Hubicka hubi...@ucw.cz wrote: Hi, I added a santy check that after fixup all types that lost in the merging are

Re: vec_cond_expr adjustments

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 11:34 AM, Marc Glisse marc.gli...@inria.fr wrote: On Mon, 8 Oct 2012, Richard Guenther wrote: VEC_COND_EXPR is more complicated. We could for instance require that it takes as first argument a vector of -1 and 0 (thus 0, !=0 and the neon thing are equivalent). Which

Re: [RFC] Make vectorizer to skip loops with small iteration estimate

2012-10-08 Thread Richard Guenther
On Sat, Oct 6, 2012 at 11:34 AM, Jan Hubicka hubi...@ucw.cz wrote: Hi, I benchmarked the patch moving loop header copying and it is quite noticeable win. Some testsuite updating is needed. In many cases it is just because the optimizations are now happening earlier. There are however few

Re: [ping patch] Predict for loop exits in short-circuit conditions

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 12:01 PM, Jan Hubicka hubi...@ucw.cz wrote: On Mon, Oct 8, 2012 at 11:04 AM, Jan Hubicka hubi...@ucw.cz wrote: On Mon, Oct 8, 2012 at 4:50 AM, Dehao Chen de...@google.com wrote: Attached is the updated patch. Yes, if we add a VRP pass before profile pass, this patch

Re: [Patch] Fix PR53397

2012-10-08 Thread Richard Guenther
. Ok. Thanks, Richard. Regards, Venkat. -Original Message- From: Richard Guenther [mailto:richard.guent...@gmail.com] Sent: Thursday, October 04, 2012 6:26 PM To: Kumar, Venkataramanan Cc: Richard Guenther; gcc-patches@gcc.gnu.org Subject: Re: [Patch] Fix PR53397 On Tue, Oct 2

[PATCH] Remove my_rev_post_order_compute

2012-10-08 Thread Richard Guenther
This replaces my_rev_post_order_compute in PRE by the already existing inverted_post_order_compute, with the necessary adjustments. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-10-08 Richard Guenther rguent...@suse.de * tree-ssa-pre.c (postorder_num

[PATCH] Fix PR54825

2012-10-08 Thread Richard Guenther
This fixes PR54825, properly FRE/PRE vector BIT_FIELD_REFs. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-10-08 Richard Guenther rguent...@suse.de PR tree-optimization/54825 * tree-ssa-sccvn.c (vn_nary_length_from_stmt): Handle BIT_FIELD_REF

Re: patch to fix constant math - third small patch

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 1:36 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: yes, my bad. here it is with the patches. Just for the record, ok! Thanks, Richard. On 10/06/2012 11:55 AM, Kenneth Zadeck wrote: This is the third patch in the series of patches to fix constant math. this one

Re: [RFC] Implement load sinking in loops

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 12:38 PM, Eric Botcazou ebotca...@adacore.com wrote: Hi, we recently noticed that, even at -O3, the compiler doesn't figure out that the following loop is dumb: #define SIZE 64 int foo (int v[]) { int r; for (i = 0; i SIZE; i++) r = v[i]; return r;

Re: [RFC] Implement load sinking in loops

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 2:32 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Oct 8, 2012 at 12:38 PM, Eric Botcazou ebotca...@adacore.com wrote: Hi, we recently noticed that, even at -O3, the compiler doesn't figure out that the following loop is dumb: #define SIZE 64 int

Re: gcc/lto/lto.c: Free lto_file struct after closing the file

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 2:39 PM, Tobias Burnus bur...@net-b.de wrote: lto_obj_file_open allocates: lo = XCNEW (struct lto_simple_object); However, the data is never freed - neither explicitly nor in lto_obj_file_close. In the attached patch, I free the memory now after the call to

Re: patch to fix constant math

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 5:01 PM, Nathan Froyd froy...@mozilla.com wrote: - Original Message - Btw, as for Richards idea of conditionally placing the length field in rtx_def looks like overkill to me. These days we'd merely want to optimize for 64bit hosts, thus unconditionally adding

Re: reverse bitfield patch

2012-10-07 Thread Richard Guenther
On Fri, Oct 5, 2012 at 8:15 PM, DJ Delorie d...@redhat.com wrote: Why do you need to change varasm.c at all? The hunks seem to be completely separate of the attribute. Because static constructors have fields in the original order, not the reversed order. Otherwise code like this is

Re: patch to fix constant math

2012-10-07 Thread Richard Guenther
On Fri, Oct 5, 2012 at 6:34 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: richard s, there are two comments that i deferred to you. that have the word richard in them, richi, thank, i will start doing this now. kenny On 10/05/2012 09:49 AM, Richard Guenther wrote: On Fri, Oct 5

Re: patch to fix constant math

2012-10-07 Thread Richard Guenther
On Sun, Oct 7, 2012 at 3:11 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: On 10/07/2012 08:47 AM, Richard Guenther wrote: len seems redundant unless you want to optimize encoding. len == (precision + HOST_BITS_PER_WIDE_INT - 1) / HOST_BITS_PER_WIDE_INT. that is exactly what we do

Re: Fixup INTEGER_CST

2012-10-07 Thread Richard Guenther
On Sun, Oct 7, 2012 at 5:15 PM, Jan Hubicka hubi...@ucw.cz wrote: Hi, I added a santy check that after fixup all types that lost in the merging are really dead. And it turns out we have some zombies around. INTEGER_CST needs special care because it is special cased by the streamer. We

Re: inlined memcpy/memset degradation in gcc 4.6 or later

2012-10-05 Thread Richard Guenther
4.7, however, I get inlined byte-by-byte copies: ... On Thu, Oct 04, 2012 at 01:58:54PM +0200, Richard Guenther wrote: There is no way to fix it. memcpy does not require aligned arguments and the merely presence of a typed pointer contains zero information of alignment for the middle-end

Re: Functions that are CSEable but not pure

2012-10-05 Thread Richard Guenther
On Thu, Oct 4, 2012 at 8:02 PM, Jason Merrill ja...@redhat.com wrote: On 10/04/2012 01:42 PM, Richard Guenther wrote: So I suppose the testcase that would be valid but break with using pure would be instead int main() { int x = init_count; int *p = get_me(); if (init_count == x

Re: reverse bitfield patch

2012-10-05 Thread Richard Guenther
On Thu, Oct 4, 2012 at 8:38 PM, DJ Delorie d...@redhat.com wrote: ChangeLog missing, new functions need a toplevel comment documenting function, argument and return value as per coding conventions. Any review of the patch itself? I know the overhead is not there... Why do you need to change

Re: libbacktrace and darwin

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 9:15 AM, Tristan Gingold ging...@adacore.com wrote: On Oct 4, 2012, at 11:23 PM, Ian Lance Taylor wrote: On Thu, Oct 4, 2012 at 1:32 PM, Jack Howarth howa...@bromo.med.uc.edu wrote: Is libbacktrace currently functional in gcc trunk and is it expected to function on

Re: Variable DECL_SIZE

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 10:28 AM, Ilya Enkovich enkovich@gmail.com wrote: 2012/10/4 Richard Guenther richard.guent...@gmail.com: On Wed, Oct 3, 2012 at 7:05 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, I fall into ssa verification failure when try to pass field's DECL_SIZE

Re: Variable DECL_SIZE

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 2:36 PM, Ilya Enkovich enkovich@gmail.com wrote: 2012/10/5 Richard Guenther richard.guent...@gmail.com: On Fri, Oct 5, 2012 at 10:28 AM, Ilya Enkovich enkovich@gmail.com wrote: 2012/10/4 Richard Guenther richard.guent...@gmail.com: On Wed, Oct 3, 2012 at 7:05

Re: RFC: C++ PATCH to support dynamic initialization and destruction of C++11 and OpenMP TLS variables

2012-10-05 Thread Richard Guenther
On Thu, Oct 4, 2012 at 7:38 PM, Jason Merrill ja...@redhat.com wrote: Both C++11 and OpenMP specify that thread_local/threadprivate variables can have dynamic initialization and destruction semantics. This sequence of patches implements that. The first patch adds the C++11 thread_local

Re: Use conditional casting with symtab_node

2012-10-05 Thread Richard Guenther
On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo dnovi...@google.com wrote: On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl cr...@googlers.com wrote: So, Jan Hubicka requested and approved the current spelling. What now? I don't think we should hold this up. The names Jan requested seem

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Thu, Oct 4, 2012 at 9:27 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Kenneth Zadeck zad...@naturalbridge.com writes: On 10/04/2012 12:58 PM, Richard Guenther wrote: On Thu, Oct 4, 2012 at 3:55 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: Let me talk about the mode here

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 11:26 AM, Richard Guenther richard.guent...@gmail.com wrote: Look at RTL users of the double-int routines and provide wrappers that take RTXen as inputs. Enforce that all CONSTs have a mode. Which would, btw, allow to merge CONST_INT, CONST_DOUBLE and CONST_WIDE

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 11:55 AM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Guenther richard.guent...@gmail.com writes: As far as the wide_ints recording a mode or precision goes: we're in the lucky position of having tried both options. Trees record the type (and thus

Re: [PATCH, gdc] - Merging gdc (GNU D Compiler) into gcc

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 12:07 PM, Iain Buclaw ibuc...@ubuntu.com wrote: On 5 October 2012 01:06, Joseph S. Myers jos...@codesourcery.com wrote: On Thu, 4 Oct 2012, Iain Buclaw wrote: The only patches to gcc proper are documentation-related and adding the D frontend / libphobos to configure and

Re: Use conditional casting with symtab_node

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 12:50 PM, Nathan Froyd froy...@mozilla.com wrote: - Original Message - I see all these patches with mixed feeling - it puts breaks on all developers because they need to learn the new interface which does not bring any immediate benefit. So I think _your_

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 1:24 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Guenther richard.guent...@gmail.com writes: On Fri, Oct 5, 2012 at 11:55 AM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Guenther richard.guent...@gmail.com writes: As far

Re: [PATCH] Improve debug info for partial inlining (PR debug/54519, take 2)

2012-10-05 Thread Richard Guenther
On Wed, 3 Oct 2012, Jakub Jelinek wrote: On Tue, Sep 11, 2012 at 03:59:56PM +0200, Jakub Jelinek wrote: As discussed in the PR, right now we do a very bad job for debug info of partially inlined functions (both when they are kept only partially inlined, or when partial inlining is

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 2:26 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Guenther richard.guent...@gmail.com writes: On Fri, Oct 5, 2012 at 1:24 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Guenther richard.guent...@gmail.com writes: The issue

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 2:39 PM, Richard Guenther richard.guent...@gmail.com wrote: Ok, I see where you are going. Let me look at the patch again. * The introduction and use of CONST_SCALAR_INT_P could be split out (obvious and good) * DEF_RTL_EXPR(CONST_WIDE_INT, const_wide_int

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 3:18 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Sandiford rdsandif...@googlemail.com writes: How is CONST_WIDE_INT variable size? It's just the usual trailing variable-length array thing. Good. Do you get rid of CONST_DOUBLE (for integers) at the

Re: [PATCH] Improve debug info for partial inlining (PR debug/54519, take 2)

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 2:49 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Oct 05, 2012 at 02:20:13PM +0200, Richard Guenther wrote: The following could use a comment on what you are doing ... Will add something. + if (args_to_skip) +for (parm = DECL_ARGUMENTS

Re: patch to fix constant math

2012-10-05 Thread Richard Guenther
On Fri, Oct 5, 2012 at 4:14 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Guenther richard.guent...@gmail.com writes: On Fri, Oct 5, 2012 at 3:18 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Sandiford rdsandif...@googlemail.com writes: How

Re: Variable DECL_SIZE

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 7:05 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, I fall into ssa verification failure when try to pass field's DECL_SIZE as an operand for CALL_EXPR. The fail occurs if field's size is not a constant. In such case DECL_SIZE holds a VAR_DECL and I need to find

Re: Functions that are CSEable but not pure

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 9:00 PM, Jason Merrill ja...@redhat.com wrote: In C++ there is a common idiom called initialize on first use. In its simplest form it looks like int lazy_i() { static int i = init; return i; } If the initialization is expensive or order-sensitive, this is a

Re: reverse bitfield patch

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 12:07 AM, DJ Delorie d...@redhat.com wrote: Here's my current patch for the bitfield reversal feature I've been working on for a while, with an RX-specific pragma to apply it globally. Could someone please review this? It would be nice to get it in before stage1

Re: inlined memcpy/memset degradation in gcc 4.6 or later

2012-10-04 Thread Richard Guenther
On Tue, Oct 2, 2012 at 4:19 PM, Walter Lee w...@tilera.com wrote: On TILE-Gx, I'm observing a degradation in inlined memcpy/memset in gcc 4.6 and later versus gcc 4.4. Though I find the problem on TILE-Gx, I think this is a problem for any architectures with SLOW_UNALIGNED_ACCESS set to 1.

Re: Functions that are CSEable but not pure

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 2:56 PM, Jason Merrill ja...@redhat.com wrote: On 10/04/2012 08:45 AM, Jakub Jelinek wrote: On Thu, Oct 04, 2012 at 10:42:59AM +0200, Richard Guenther wrote: On Wed, Oct 3, 2012 at 9:00 PM, Jason Merrill ja...@redhat.com wrote: If the result is not needed, are we

Re: Functions that are CSEable but not pure

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 5:22 PM, Jason Merrill ja...@redhat.com wrote: On 10/04/2012 09:07 AM, Richard Guenther wrote: Ugh. Especially with the above (you can DCE those calls) makes this severly mis-specified ... and any implementation error-prone (look what mess our losely defined 'malloc

Re: Functions that are CSEable but not pure

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 7:08 PM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Oct 4, 2012 at 5:22 PM, Jason Merrill ja...@redhat.com wrote: On 10/04/2012 09:07 AM, Richard Guenther wrote: Ugh. Especially with the above (you can DCE those calls) makes this severly mis-specified

Re: Functions that are CSEable but not pure

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 7:15 PM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Oct 04, 2012 at 07:08:02PM +0200, Richard Guenther wrote: But isn't it a fact that it _cannot_ modify init_count? If the second call is CSEable then it cannot have side-effects that are observable at the call site

Re: RFC: Using DECL_NO_LIMIT_STACK as a backend specific flag

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 5:20 PM, nick clifton ni...@redhat.com wrote: Hi Ian, Can't you just keep a list of the decls for which you have issued the warning? Yes - that would work too. In fact I agree that this would be cleaner solution in my particular case. I'll create a new patch...

Re: RFA: add lock_length attribute to break branch-shortening cycles

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 8:22 PM, Joern Rennecke joern.renne...@embecosm.com wrote: The ARCompact architecture has some pipelining features that result in the vanilla branch shortening not always converging. Moreover, there are some short, complex branch instructions with very short offsets;

Re: opts.c, gcc.c: Plug some memory leaks - and an out-of-bounds memory access

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 11:01 PM, Tobias Burnus bur...@net-b.de wrote: Found using http://scan5.coverity.com/ Build on x86-64-gnu-linux with C/C++/Fortran. I will now do an all-language build/regtest. OK when it passes? (Note to the save_string call: I reduced it by 2: The +1 in the call

Re: [Ping]FW: [PATCH] Cilk Plus merging to trunk (2 of n)

2012-10-04 Thread Richard Guenther
, In my last patch, I forgot to add the change Richard Guenther wanted me to make. He wanted me to move the ARRAY_NOTATION_REF node from tree.def to c-family/c-common.def. Here is a new one that has this change. I am sorry for this. Here are ChangeLog entries: gcc/ChangeLog 2012-09-26

Re: Fix -fdump-ada-spec

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 10:26 AM, Arnaud Charlet char...@adacore.com wrote: After changes by Sharad (Add option for dumping to stderr (issue6190057)), -fdump-ada-spec is broken, and is now a no-op. Admittedly, this is because -fdump-ada-spec is handled differently from other -fdump-* switches,

Re: [patch][lra] Improve initial program point density in lra-lives.c (was: Re: RFC: LRA for x86/x86-64 [7/9])

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 11:43 AM, Steven Bosscher stevenb@gmail.com wrote: On Wed, Oct 3, 2012 at 5:35 PM, Steven Bosscher stevenb@gmail.com wrote: The worst result is this: Compressing live ranges: from 726174 to 64496 - 8%, pre_count 40476128, post_count 12483414 But that's still a

Re: patch to fix

2012-10-04 Thread Richard Guenther
On Wed, Oct 3, 2012 at 7:15 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: The enclosed patch is the third of at least four patches that fix the problems associated with supporting integers on the target that are wider than two HOST_WIDE_INTs. While GCC claims to support OI mode, and we

Re: [Patch] Fix PR53397

2012-10-04 Thread Richard Guenther
of dumping the references here. Is there a cleaner way to dump the references at one place? Yes, call dump_mem_ref then, instead of repeating parts of its body. Richard. Regards, Venkat. -Original Message- From: Richard Guenther [mailto:rguent...@suse.de] Sent: Tuesday, October 02

Re: patch to fix constant math

2012-10-04 Thread Richard Guenther
integers magically come from? Richard. Kenny On 10/04/2012 08:48 AM, Richard Guenther wrote: On Wed, Oct 3, 2012 at 7:15 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: The enclosed patch is the third of at least four patches that fix the problems associated with supporting integers

Re: [lra] patch to solve most scalability problems for LRA

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 7:07 PM, Steven Bosscher stevenb@gmail.com wrote: On Thu, Oct 4, 2012 at 5:37 PM, Vladimir Makarov vmaka...@redhat.com wrote: The only issue now is PR54146 compilation time for IRA+LRA although it was improved significantly. I will continue work on PR54146. But

Re: PATCH trunk: gengtype honoring mark_hook-s inside struct inside union-s

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 7:24 PM, Basile Starynkevitch bas...@starynkevitch.net wrote: On Thu, Oct 04, 2012 at 06:51:35PM +0300, Laurynas Biveinis wrote: 2012-10-03 Basile Starynkevitch bas...@starynkevitch.net * gengtype.c (walk_type): Emit mark_hook when inside a

Re: [PATCH] Teach VRP to handle if ((unsigned_narrowing_cast) x != 0) similarly to if ((x 0xffff) != 0) (PR tree-optimization/54810)

2012-10-04 Thread Richard Guenther
On Thu, Oct 4, 2012 at 6:31 PM, Jakub Jelinek ja...@redhat.com wrote: Hi! This patch handles unsigned narrowing casts the same as BIT_AND_EXPR with the unsigned narrow type's max value. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Ok. Thanks, Richard. 2012-10-04

Re: How much time left till phase 3?

2012-10-02 Thread Richard Guenther
On Tue, Oct 2, 2012 at 10:44 AM, Joern Rennecke joern.renne...@embecosm.com wrote: I'll have to prepare a few more patches to (supposedly) generic code to support the ARCompact port, which we (Synopsys and Embecosm) would like contribute in time for gcc 4.8. How much time is left till we

Re: How much time left till phase 3?

2012-10-02 Thread Richard Guenther
On Tue, Oct 2, 2012 at 11:34 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Oct 2, 2012 at 10:44 AM, Joern Rennecke joern.renne...@embecosm.com wrote: I'll have to prepare a few more patches to (supposedly) generic code to support the ARCompact port, which we (Synopsys

Re: [RFC] Make vectorizer to skip loops with small iteration estimate

2012-10-02 Thread Richard Guenther
On Mon, 1 Oct 2012, Jan Hubicka wrote: So the unvectorized cost is SIC * niters The vectorized path is SOC + VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC The scalar path of vectorizer loop is SIC * niters + SOC Note that 'th' is used for

Re: Convert more non-GTY htab_t to hash_table.

2012-10-02 Thread Richard Guenther
On Mon, 1 Oct 2012, Lawrence Crowl wrote: Change more non-GTY hash tables to use the new type-safe template hash table. Constify member function parameters that can be const. Correct a couple of expressions in formerly uninstantiated templates. The new code is 0.362% faster in bootstrap,

Re: [PATCH] Fix powerpc breakage, was: Add option for dumping to stderr (issue6190057)

2012-10-02 Thread Richard Guenther
On Tue, Oct 2, 2012 at 1:11 AM, Xinliang David Li davi...@google.com wrote: On Mon, Oct 1, 2012 at 4:05 PM, Sharad Singhai sing...@google.com wrote: Thanks for tracking down and fixing the powerpc port. The dump_kind_p () check is redundant but canonical form here. I think blocks of dump code

Re: [PATCH] Fix test breakage, was: Add option for dumping to stderr (issue6190057)

2012-10-02 Thread Richard Guenther
On Tue, Oct 2, 2012 at 1:31 AM, Sharad Singhai sing...@google.com wrote: Here is a patch to fix test breakage caused by r191883. Bootstrapped on x86_64 and tested with make -k check RUNTESTFLAGS=--target_board=unix/\{,-m32\}. Okay for trunk? Ok. Thanks, Richard. Thanks, Sharad

Re: [PATCH] Add option for dumping to stderr (issue6190057)

2012-10-02 Thread Richard Guenther
On Mon, Oct 1, 2012 at 8:39 PM, Gabriel Dos Reis g...@integrable-solutions.net wrote: On Mon, Oct 1, 2012 at 1:27 PM, Michael Meissner meiss...@linux.vnet.ibm.com wrote: On Mon, Oct 01, 2012 at 02:02:26PM -0400, Michael Meissner wrote: Your change on September 30th, breaks the powerpc port

Re: [Patch] Fix PR53397

2012-10-02 Thread Richard Guenther
On Mon, 1 Oct 2012, venkataramanan.ku...@amd.com wrote: Hi, The below patch fixes the FFT/Scimark regression caused by useless prefetch generation. This fix tries to make prefetch less aggressive by prefetching arrays in the inner loop, when the step is invariant in the entire loop

Re: vec_cond_expr adjustments

2012-10-02 Thread Richard Guenther
On Mon, Oct 1, 2012 at 5:57 PM, Marc Glisse marc.gli...@inria.fr wrote: [merging both threads, thanks for the answers] On Mon, 1 Oct 2012, Richard Guenther wrote: optabs should be fixed instead, an is_gimple_val condition is implicitely val != 0. For vectors, I think it should be val 0

Re: [PATCH] Vector CONSTRUCTOR verifier

2012-10-02 Thread Richard Guenther
On Tue, Oct 2, 2012 at 3:01 PM, Jakub Jelinek ja...@redhat.com wrote: Hi! As discussed in the PR and on IRC, this patch verifies that vector CONSTRUCTOR in GIMPLE is either empty CONSTRUCTOR, or contains scalar elements of type compatible with vector element type (then the verification is

[PATCH] Fix PR54735

2012-10-02 Thread Richard Guenther
on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-10-02 Richard Guenther rguent...@suse.de PR middle-end/54735 * tree-ssa-pre.c (do_pre): Make sure to update virtual SSA form before cleaning up the CFG. * g++.dg/torture/pr54735.C: New testcase

Re: [patch] Minor TARGET_MEM_REF cleanup

2012-10-01 Thread Richard Guenther
On Sat, Sep 29, 2012 at 1:17 PM, Eric Botcazou ebotca...@adacore.com wrote: Hi, for simple loops like: extern int a[]; extern int b[]; void foo (int l) { int i; for (i = 0; i l; i++) a[i] = b [i]; } you get in the .lim3 dump: Unanalyzed memory reference 0: _5 =

Re: [PATCH] Fix PR middle-end/54759

2012-10-01 Thread Richard Guenther
On Sun, Sep 30, 2012 at 9:03 PM, Dehao Chen de...@google.com wrote: Hi, This patch fixes the bug when comparing location to UNKNOWN_LOC. Bootstrapped and passed gcc regression test. Okay for trunk? Ok. Thanks, Richard. Thanks, Dehao 2012-09-30 Dehao Chen de...@google.com PR

Re: RFC: LRA for x86/x86-64 [0/9]

2012-10-01 Thread Richard Guenther
On Mon, Oct 1, 2012 at 7:48 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, Sep 30, 2012 at 06:50:50PM -0400, Vladimir Makarov wrote: But I think that LRA cpu time problem for this test can be fixed. But I don't think I can fix it for 2 weeks. So if people believe that current LRA

Re: Profile housekeeping 5/n (make RTL loop optimizers to use loop bounds better)

2012-10-01 Thread Richard Guenther
On Mon, Oct 1, 2012 at 11:37 AM, Jan Hubicka hubi...@ucw.cz wrote: Hi, this patch commonizes the maximal iteration estimate logic in between SCEV and loop-iv. Both are now using loop-nb_iterations_upper_bound. I decided to keep same API for SCEV code as for RTL code, so I made

Re: Constant-fold vector comparisons

2012-10-01 Thread Richard Guenther
On Sat, Sep 29, 2012 at 3:25 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this patch does 2 things (I should have split it in 2, but the questions go together): 1) it handles constant folding of vector comparisons, 2) it fixes another place where vectors are not expected (I'll

[PATCH] Fix PR47799 - debug info for early-inlining with LTO

2012-10-01 Thread Richard Guenther
; int res = bar (k); return res; } and debug information with/without LTO is now reasonably the same and I can set breakpoints on the inlined instances. Thanks, Richard. 2012-10-01 Richard Guenther rguent...@suse.de PR lto/47788 * tree-streamer-out.c

Re: [RFC] Make vectorizer to skip loops with small iteration estimate

2012-10-01 Thread Richard Guenther
On Sun, 30 Sep 2012, Jan Hubicka wrote: Hi, the point of the following patch is to make vectorizer to not vectorize the following testcase with profile feedback: int a[1]; int i=5; int k=2; int val; __attribute__ ((noinline,noclone)) test() { int j; for(j=0;jk;j++)

[PATCH] Fix -frounding-math builtins

2012-10-01 Thread Richard Guenther
. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. 2012-10-01 Richard Guenther rguent...@suse.de * builtins.def (ATTR_MATHFN_FPROUNDING): Do not use no-vops with -frounding-math. * builtin-attrs.def (ATTR_PURE_NOTHROW_NOVOPS_LIST): Remove

Re: [PATCH] Add option for dumping to stderr (issue6190057)

2012-10-01 Thread Richard Guenther
On Mon, Oct 1, 2012 at 3:55 PM, Sharad Singhai sing...@google.com wrote: On Mon, Oct 1, 2012 at 6:52 AM, H.J. Lu hjl.to...@gmail.com wrote: On Mon, Oct 1, 2012 at 6:49 AM, Sharad Singhai sing...@google.com wrote: I am sorry, I didn't enable all the languages. Will fix the fortran test breakage

Re: RFC: LRA for x86/x86-64 [0/9]

2012-09-30 Thread Richard Guenther
On Sun, Sep 30, 2012 at 6:52 PM, Steven Bosscher stevenb@gmail.com wrote: Hi, To look at it in yet another way: integrated RA : 189.34 (16%) usr LRA non-specific: 59.82 ( 5%) usr LRA virtuals eliminatenon: 56.79 ( 5%) usr LRA create live ranges : 175.30 (15%)

Re: RFC: LRA for x86/x86-64 [0/9]

2012-09-28 Thread Richard Guenther
On Fri, Sep 28, 2012 at 12:56 AM, Vladimir Makarov vmaka...@redhat.com wrote: Originally I was to submit LRA at the very beginning of stage1 for gcc4.9 as it was discussed on this summer GNU Tools Cauldron. After some thinking, I've decided to submit LRA now but only switched on for

Re: vec_cond_expr adjustments

2012-09-28 Thread Richard Guenther
On Fri, Sep 28, 2012 at 12:42 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, I have been experimenting with generating VEC_COND_EXPR from the front-end, and these are just a couple things I noticed. 1) optabs.c requires that the first argument of vec_cond_expr be a comparison, but

[PATCH][LTO] properly stream PARM_DECLs

2012-09-28 Thread Richard Guenther
-linux-gnu, applied. Richard. 2012-09-28 Richard Guenther rguent...@suse.de PR lto/47799 * lto-streamer-out.c (tree_is_indexable): Make PARM_DECLs global. (lto_output_tree_ref): Handle references to them. (output_function): Do not output function arguments again

  1   2   3   4   5   6   7   8   9   10   >