[PATCH] Fix PR54634

2012-09-20 Thread Richard Guenther
This fixes PR54634, data-ref analysis does not properly model "reads of global memory" done by pure functions. So just give up. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-09-20 Richard Guenther PR tree-optimization/54634 * tree-

Re: [PATCH] Use automake no-dist for libatomic and libitm

2012-09-20 Thread Richard Guenther
On Thu, Sep 20, 2012 at 3:30 PM, Jakub Jelinek wrote: > Hi! > > GCC 4.7.2 upload to ftp.gnu.org has been rejected again similarly to 4.4.4 > upload 2.5 years ago, again on security issues with automake dist/distcheck > stuff that gcc never uses. From what I remember or can read in the > archives,

Re: vector comparisons in C++

2012-09-21 Thread Richard Guenther
On Thu, Sep 20, 2012 at 10:01 PM, Marc Glisse wrote: > On Sat, 1 Sep 2012, Marc Glisse wrote: > >> I have some issues with the vector-compare-2.c torture test. It passes a >> vector by value (argument and return type), which is likely to warn >> (although for some reason it doesn't for me, with to

Re: [PATCH, doc] Separate sections in Chapter Plugins and LTO

2012-09-21 Thread Richard Guenther
On Fri, Sep 21, 2012 at 2:23 AM, Jia Liu wrote: > Hi all, > > Currently the Chapter Plugins and LTO is all in one html page, > the other chapters are separated into sections. > So I separated them to make them easier reading. > > Is this patch OK? +* LTO Overview::Overview of LTO. +* ELF sect

Re: [PATCH, doc] Separate sections in Chapter Plugins and LTO

2012-09-21 Thread Richard Guenther
On Fri, Sep 21, 2012 at 11:21 AM, Jia Liu wrote: > Hi Richard, > > Thank you very much for comment. > > And, is this time OK? Yes. Thanks, Richard. > On Fri, Sep 21, 2012 at 5:11 PM, Richard Guenther > wrote: >> On Fri, Sep 21, 2012 at 2:23 AM, Jia Liu wrote: &g

[PATCH] Fix PR54647

2012-09-21 Thread Richard Guenther
REFERENCE instead. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Btw, this also means they are presenting a VN barrier and do not get simplified if the condition would simplify. Richard. 2012-09-21 Richard Guenther PR tree-optimization/54647 * tree-ssa-pre.c

[PATCH] Fix PR54629

2012-09-21 Thread Richard Guenther
This patch from Jakub should fix issues with my previous patch. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-09-20 Jakub Jelinek PR tree-optimization/54629 * tree-loop-distribution.c (classify_partition): Free loop nest only after free

Re: [patch] split FRAME variables back into pieces

2012-09-21 Thread Richard Guenther
On Fri, Sep 21, 2012 at 12:48 PM, Eric Botcazou wrote: >> You rely on being able to see all FRAME accesses as component refs, >> thus nothing transforms them into just MEM[&FRAME, offset]. That's of >> course something that can be easily "broken" by means of doing >> some pointer arithmetic like

[PATCH] PRE TLC

2012-09-21 Thread Richard Guenther
This removes the no longer required dominating stmt argument from the insertion routines (since the eliminate () reorg) and also reflects that insertion now never can fail (again). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-09-21 Richard Guenther

[PATCH] Fix PR52173

2012-09-21 Thread Richard Guenther
This bug happens because GIMPLE_TRANSACTION is a statement without real but with virtual operands. The short-cut in gimple_copy thus is overly optimistic. Fixed as follows. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2012-09-21 Richard Guenther PR middle

Re: Remove duplicated block of code

2012-09-23 Thread Richard Guenther
On Sat, Sep 22, 2012 at 1:53 PM, Marc Glisse wrote: > Hello, > > this patch removes one copy of a block of code that somehow ended up > duplicated. Richard Henderson apparently already fixed part of the problem > here: > > http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00120.html > > but missed this

Re: Fix PR tree-optimization/54669

2012-09-23 Thread Richard Guenther
On Sat, Sep 22, 2012 at 10:30 PM, Eric Botcazou wrote: > As demonstrated by the testcase, the new propagate_constants_for_unrolling can > change the EH properties of a statement when it turns array accesses with > variable index into array accesses with fixed index if -fnon-call-exception is > ena

Re: [PATCH] Fix PR52173

2012-09-24 Thread Richard Guenther
On Fri, 21 Sep 2012, Aldy Hernandez wrote: > On 09/21/12 08:52, Richard Guenther wrote: > > > > This bug happens because GIMPLE_TRANSACTION is a statement > > without real but with virtual operands. The short-cut in gimple_copy > > thus is overly optimistic. Fixed as

Re: [PATCH] fix gcc.dg/torture/pr53922.c on darwin

2012-09-24 Thread Richard Guenther
On Sat, 22 Sep 2012, Jack Howarth wrote: >The attached patch eliminates the failures in linkage of the new > gcc.dg/torture/pr53922.c testcase on darwin by passing > -Wl,-undefined,dynamic_lookup > to the linker as recommended by the darwin linker developer... > > http://gcc.gnu.org/ml/gcc-b

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

2012-09-24 Thread Richard Guenther
On Sun, Sep 23, 2012 at 2:01 AM, Iyer, Balaji V wrote: > Hello Everyone, > Attached, please find a patch that will implement Cilk Plus Array > Notations for the C compiler. Array notations are indented to allow > programmers to directly express parallelism in their programs. Array > notatio

Re: [patch] Stream TYPE_NONALIASED_COMPONENT in LTO mode

2012-09-24 Thread Richard Guenther
On Mon, Sep 24, 2012 at 12:05 PM, Eric Botcazou wrote: > Hi, > > although the type merging machinery deals with TYPE_NONALIASED_COMPONENT, the > flag is actually not streamed, which can result in strange performance drops > for Ada applications in LTO mode. The attached patch plugs this hole. > >

Re: [RFC] Move ehcleanup pass to before early SRA

2012-09-24 Thread Richard Guenther
On Sun, Sep 23, 2012 at 10:46 AM, Eric Botcazou wrote: > Hi, > > we have run into optimization regressions in Ada caused by the interaction > between the new GIMPLE clobbers and SRA: on the one hand GIMPLE clobbers > create artificial EH handlers for aggregate variables, on the other hand SRA > re

Re: [PATCH] Fix PR54650

2012-09-24 Thread Richard Guenther
On Sat, Sep 22, 2012 at 4:08 AM, Dehao Chen wrote: > Hi, > > The problem is due to a bug when move_block_to_fn. edge->goto_block > should be updated even when its locus is unknown. This patch also > fixes the way to reset block for expr. I think the machinery is much more fragile (which is probab

Re: forwprop: bit_field_ref(constructor)

2012-09-24 Thread Richard Guenther
On Sat, Sep 22, 2012 at 11:17 PM, Marc Glisse wrote: > Hello, > > this patch lets forwprop fold bit_field_refs of constructors. It is > particularly useful in forwprop4, which happens after the pass that lowers > unsupported vector operations. Indeed, that pass keeps breaking vectors into > pieces

[PATCH] Fix PR54632

2012-09-24 Thread Richard Guenther
used in stmt operands). Bootstrap & regtest pending on x86_64-unknown-linux-gnu. Richard. 2012-09-24 Richard Guenther PR middle-end/54632 * tree-ssa-live.c (clear_unused_block_pointer_1): Do not handle DECL_DEBUG_EXPR_IS_FROM here... (clear_unused_block_poi

[PATCH] Fix PR54684

2012-09-24 Thread Richard Guenther
This fixes PR54684 where optimizing __builtin_unreachable () during builtin folding fails to update SSA operands properly. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-09-24 Richard Guenther PR tree-optimization/54684 * tree-ssa-ccp.c

[PATCH] Fix PR53663

2012-09-24 Thread Richard Guenther
This fixes PR53663 - for redundant store removal we may not use VN translation, but the native encode / interpret trick is of such a kind because it looks through type changes. Thus, mark it so. Bootstrap and regtest queued on x86_64-unknown-linux-gnu. Richard. 2012-09-24 Richard Guenther

Re: [PATCH] Fix PR54674

2012-09-25 Thread Richard Guenther
On Mon, 24 Sep 2012, William J. Schmidt wrote: > In cases where pointers and ints are cast back and forth, SLSR can be > tricked into introducing a multiply where one of the operands is of > pointer type. Don't do that! > > Verified that the reduced test case in the PR is fixed with a > cross-co

Re: [patch] PR54645 move location_adhoc_data map into GC

2012-09-25 Thread Richard Guenther
On Mon, Sep 24, 2012 at 10:23 PM, Hans-Peter Nilsson wrote: > On Fri, 21 Sep 2012, Dehao Chen wrote: >> This patch moves location_adhoc_data into GC, and also rebuild the >> hash table when reading in the PCH. After the patch, PCH can work as >> expected. >> >> Bootstrapped and passed gcc regressi

Re: Rewrite lto-symtab to work on symbol table

2012-09-25 Thread Richard Guenther
On Mon, Sep 24, 2012 at 6:10 PM, H.J. Lu wrote: > On Mon, Sep 24, 2012 at 8:50 AM, Martin Jambor wrote: >> Hi, >> >> On Tue, Sep 18, 2012 at 03:35:45PM +0200, Jan Hubicka wrote: >>> Hi, >>> this patch reorganize lto-symtab to work across symtab's symbol table >>> instead >>> of building its own.

[PATCH] Fix lto-bootstrap issue (one of them)

2012-09-25 Thread Richard Guenther
ccXpATTw.ltrans19.o:(.text+0x14b8): undefined reference to `alloca' collect2: error: ld returned 1 exit status I'll try updating binutils (but I don't see how alloca calls should survive!? both of the above is for cp-demangle.c of libiberty). Richard. 2012-09-25 Richard Guenther

Re: [PATCH] Fix up CFLAGS/CXXFLAGS gcc/configure adjustment (PR other/54692)

2012-09-25 Thread Richard Guenther
On Tue, Sep 25, 2012 at 1:19 PM, Jakub Jelinek wrote: > Hi! > > On Thu, Sep 13, 2012 at 06:24:14PM +0200, Paolo Bonzini wrote: >> Il 13/09/2012 17:57, Jakub Jelinek ha scritto: >> >>> > > Can we get this change in? The current state is terribly annoying. >> >> > >> >> > Yes, please go ahead. >> >

Re: [PATCH] Fix VRP single-bit signed precision handling (PR tree-optimization/54676)

2012-09-25 Thread Richard Guenther
On Tue, Sep 25, 2012 at 1:23 PM, Jakub Jelinek wrote: > Hi! > > This patch fixes two spots where signed 1-bit precision isn't handled > properly in VRP. With that type, build_int_cst (TREE_TYPE (min), 1) > will overflow and thus adding it to something or subtracting leads to > ICEs or bad code.

[PATCH] Fix PR54702 and LTO bootstrap (for me)

2012-09-25 Thread Richard Guenther
well. LTO bootstrap running on x86_64-unknown-linux-gnu, regtest pending. Richard. 2012-09-25 Richard Guenther PR middle-end/54702 * symtab.c (insert_to_assembler_name_hash): Do not insert builtins. (verify_symtab_base): Adjust. (unlink_from_assembler_name

Re: [PATCH] Fix PR54702 and LTO bootstrap (for me)

2012-09-25 Thread Richard Guenther
On Tue, 25 Sep 2012, Richard Guenther wrote: > > This fixes PR54702 and LTO bootstrap (well, at least I now survive > stage2 cc1 build). We shouldn't enter builtins into the symtab > asm-name hash, too much code seems to be confused by that (at least > we should at most in

[PATCH] Fix PR54704

2012-09-25 Thread Richard Guenther
I am testing the following patch to fix a typo(?) in the hash function for location ad-hoc data. The current hash function causes 1000 collisions for each search when building tramp3d. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2012-09-25 Richard Guenther

Re: [Patch] catch builtin_bswap16 construct

2012-09-26 Thread Richard Guenther
On Fri, Sep 21, 2012 at 10:04 AM, Christophe Lyon wrote: > On 20 September 2012 09:55, Christophe Lyon > wrote: >> On 20 September 2012 09:12, Eric Botcazou wrote: The attached patch catches C constructs: (A << 8) | (A >> 8) where A is unsigned 16 bits and maps them to built

Re: RFA: update config-list.mk

2012-09-26 Thread Richard Guenther
On Tue, Sep 25, 2012 at 7:10 PM, Joern Rennecke wrote: > A few arm targets were removed from config.gcc, and picochip is only > available with --enable-obsolete. This patch brings config-list.mk > up-to-date in these respects. > > 2012-09-24 Joern Rennecke > > * contrib-list.mk (LIST):

Re: [PATCH] Refactor the code to remove IS_UNKNOWN_LOCATION

2012-09-26 Thread Richard Guenther
On Wed, Sep 26, 2012 at 6:29 AM, Dehao Chen wrote: > IS_UNKNOWN_LOCATION is very misleading. This patch removes this macro > from input.h. For sites when checking LOCUS is intended, we explicit > use LOCATION_LOCUS and compare it to UNKNOWN_LOCATION. > > Bootstrapped and passed all gcc regression

Re: Ping: [Patch] PR54635: Add addr_space_t argument to mode_dependent_address_p

2012-09-26 Thread Richard Guenther
On Wed, Sep 26, 2012 at 10:37 AM, Georg-Johann Lay wrote: > http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01448.html > > Adds an addr_space_t argument to targetm.mode_dependent_address_p. > > Up to now the change is a no-op, but the avr backend needs this. Ok. Thanks, Richard. > Johann

Re: [PATCH] Fix up simplify_binary_operation_1 for vector float AND (PR target/54703)

2012-09-26 Thread Richard Guenther
On Wed, Sep 26, 2012 at 11:29 AM, Jakub Jelinek wrote: > Hi! > > At least i?86 and rs6000 backends use V*[SD]F AND/IOR/XOR/NOT > operations, seems most of the simplify-rtx.c code is properly guarded for > that with INTEGRAL_MODE_P (mode), but the > (x - (x & y)) -> (x & ~y) > optimization was not,

[PATCH] Fix PR54709

2012-09-26 Thread Richard Guenther
of having it magically "fixed" without being analyzed. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-09-26 Richard Guenther PR lto/54709 * tree.h (DECL_IS_BUILTIN): Compare LOCATION_LOCUS. * tree-streamer.h (streamer

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

2012-09-26 Thread Richard Guenther
On Mon, Sep 24, 2012 at 5:05 PM, Iyer, Balaji V wrote: > Hi Richard, > Please see my comments embedded below. > >>-Original Message- >>From: Richard Guenther [mailto:richard.guent...@gmail.com] >>Sent: Monday, September 24, 2012 5:53 AM >>To:

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

2012-09-26 Thread Richard Guenther
On Mon, Sep 24, 2012 at 10:10 PM, Sharad Singhai wrote: > Ping. Some minor issues: * c/c-decl.c (c_write_global_declarations): Use different method to determine if the dump has ben initialized. * cp/decl2.c (cp_write_global_declarations): Ditto. * testsuite/gcc.ta

Re: [PATCH] Fix PR54709

2012-09-26 Thread Richard Guenther
On Wed, 26 Sep 2012, Richard Guenther wrote: > > This fixes PR54709, the location change broke DECL_IS_BUILTIN which > is bogously used by streamer_handle_as_builtin_p. I am reverting > the previous lto-symtab.c change as it is not necessary for fixing > the testcases. LTO boots

Re: [doc] vector extensions

2012-09-26 Thread Richard Guenther
On Wed, Sep 26, 2012 at 4:39 PM, Marc Glisse wrote: > http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01041.html > > Hmm, maybe I shouldn't put "trivial" in a post, that makes it sound like I > am not waiting for comments. > > Comments? Ok. Thanks, Richard. > > On Fri, 14 Sep 2012, Marc Glisse wro

Re: [PATCH] Fix PR54709

2012-09-26 Thread Richard Guenther
On Wed, 26 Sep 2012, Richard Guenther wrote: > On Wed, 26 Sep 2012, Richard Guenther wrote: > > > > > This fixes PR54709, the location change broke DECL_IS_BUILTIN which > > is bogously used by streamer_handle_as_builtin_p. I am reverting > > the previous lt

Re: [C++ PATCH] Nit fix in build_new_1

2012-09-27 Thread Richard Guenther
On Thu, Sep 27, 2012 at 12:44 PM, Jakub Jelinek wrote: > Hi! > > All INTEGER_CSTs are TREE_CONSTANT, I don't see the point > in testing that. Ok for trunk? Ok. Thanks, Richard. > 2012-09-27 Jakub Jelinek > > * init.c (build_new_1): Don't test TREE_CONSTANT > of INTEGER_CST.

[PATCH] Shrink symtab_node_base

2012-09-27 Thread Richard Guenther
The following patch shrinks symtab_node_base from 104 bytes to 88 bytes (on x86_64) by re-ordering and packing fields. Bootstrap & regtest pending. Richard. 2012-09-27 Richard Guenther * cgraph.h (symtab_node_base): Re-order and pack fields. Index: gcc/cgra

Re: [PATCH] Correct handling of gcc-[ar|nm|ranlib] exit codes

2012-09-27 Thread Richard Guenther
On Thu, Sep 27, 2012 at 3:01 PM, Meador Inge wrote: > Hi All, > > The gcc-[ar|nm|ranlib] LTO utils use 'pex_one' to spawn the wrapped binutils > program. However, currently it is blindly returning the value of the 'err' > parameter for the exit code. According the documentation [1] 'err' is only

[PATCH][1/n] VRP and anti-range handling

2012-06-13 Thread Richard Guenther
proves the range primitive vrp_meet (which computes the union of ranges). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-06-13 Richard Guenther * tree-vrp.c (vrp_meet): Properly meet equivalent ranges. Handle meeting two VR_RANGE to an VR_ANTI_RAN

[PATCH][2/n] VRP and anti-range handling

2012-06-13 Thread Richard Guenther
& test scheduled after that patch is in. Richard. 2012-06-13 Richard Guenther * tree-vrp.c (VR_INITIALIZER): New define. (ranges_from_anti_range): New function. (extract_range_from_binary_expr_1): Decompose operations on VR_ANTI_RANGEs to operations on VR_R

Re: [PATCH] Some vector cost model cleanup

2012-06-14 Thread Richard Guenther
ec_info_type: > - case condition_vec_info_type: > - case assignment_vec_info_type: > - case reduc_vec_info_type: > - case induc_vec_info_type: > - case type_promotion_vec_info_type: > - case type_demotion_vec_info_type: > - case type_conversion_vec_info_type: > - case call_

Re: [SH] PR 53568 - Add support for bswap built-ins

2012-06-14 Thread Richard Guenther
On Thu, Jun 14, 2012 at 4:39 AM, Kaz Kojima wrote: > Oleg Endo wrote: >> The attached patch improves code generated for byte swap expressions >> such as ((x & 0xFF) << 8) | ((x >> 8) & 0xFF). >> It seems that currently the tree optimizers only detect bswap32 and >> bswap64 but not bswap16 pattern

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

2012-06-14 Thread Richard Guenther
On Thu, Jun 14, 2012 at 8:58 AM, Sharad Singhai wrote: > Thanks for your comments. Responses inline. > > On Wed, Jun 13, 2012 at 4:48 AM, Richard Guenther > wrote: >> On Fri, Jun 8, 2012 at 7:16 AM, Sharad Singhai wrote: >>> Okay, I have updated the attached pa

[PATCH] Testcase for VRP range-anti-range merging

2012-06-14 Thread Richard Guenther
Tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-06-14 Richard Guenther * gcc.dg/tree-ssa/vrp.h: New testcase. * gcc.dg/tree-ssa/vrp68.c: Likewise. Index: gcc/testsuite/gcc.dg/tree-ssa/vrp.h

GCC 4.7.2 Status Report (2012-06-14)

2012-06-14 Thread Richard Guenther
Status == The GCC 4.7.1 release tarballs have been created and are being uploaded to ftp.gnu.org right now. The GCC 4.7 branch is thus open again for regression and documentation fixes. Quality Data Priority # Change from Last Report --- -

Re: [Patch] Propagate vector constants into VEC_PERM_EXPR while lowering.

2012-06-14 Thread Richard Guenther
On Thu, Jun 14, 2012 at 1:26 PM, Ramana Radhakrishnan wrote: > Hi, > > This patch allows propagation of vector constants into VEC_PERM_EXPRs > in lower_vec_perm, motivation explained in > http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00615.html > > Bootstrapped and regression tested on gcc110.fsffr

Re: RFA: better gimplification of compound literals

2012-06-14 Thread Richard Guenther
On Thu, Jun 14, 2012 at 5:33 PM, Michael Matz wrote: > Hi, > > On Thu, 14 Jun 2012, Michael Matz wrote: > >> In any case, this patch is currently in regstrapping on x86-64.  Okay if >> it passes (modulo changes for the above symtab_get_node() issue)? > > After discussion with Honza, consider the p

Re: Web patch committed: Clarify GCC 4.7.1 and Go 1

2012-06-14 Thread Richard Guenther
On Thu, Jun 14, 2012 at 6:41 PM, Ian Lance Taylor wrote: > I committed this patch to the web site to clarify that GCC 4.7.1 > supports Go 1. Can you move that/add it to the sub-section for changes in 4.7.1? Thanks, Richard. > Ian >

Re: Change the ordering of cdce pass

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 3:40 AM, Easwaran Raman wrote: > ChangeLog entry has a gcc/ prefix that shouldn't be there. Here is the > revised entry: > > 2012-06-14   Easwaran Raman   > >        * passes.c (init_optimization_passes): Remove pass_call_cdce >        from its current position and insert a

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

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 7:47 AM, Sharad Singhai wrote: > On Wed, Jun 13, 2012 at 4:48 AM, Richard Guenther > wrote: >> On Fri, Jun 8, 2012 at 7:16 AM, Sharad Singhai wrote: >>> Okay, I have updated the attached patch so that the output from >>> -ftree-vectorizer-ve

Re: [PATCH] Small tree-vect-pattern.c cleanup

2012-06-15 Thread Richard Guenther
On Thu, Jun 14, 2012 at 11:00 PM, Jakub Jelinek wrote: > Hi! > > While looking at pattern recognizer, I've noticed that we needlessly > allocate a single member array from heap.  An automatic variable for that > would be fine, but BB_VINFO_BB is also addressable. > > Bootstrapped/regtested on x86_

Re: [patch] Fix PR middle-end/53590

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 11:13 AM, Eric Botcazou wrote: >> If we don't do it, we'll get another PR saying "this works in LTO mode with >> other versions of the Ada compiler" (which is true) so I'll proceed. > > Here is what I've installed after bootstrapping/regtesting on > x86_64-suse-linux > and

Re: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 11:27 AM, Duncan Sands wrote: > My plugin is written in C++.  When including headers from gcc-4.6 it wraps > them > in 'extern "C"' to prevent name mangling.  Some of the plugin headers > include > gcc/system.h which includes the C++ header cstring if it detects the use of

[PATCH] New testcase

2012-06-15 Thread Richard Guenther
This adds a testcase I reduced from a genmodes miscompile with one of my pending VRP patches. Committed. Richard. 2012-06-15 Richard Guenther * gcc.c-torture/execute/20120615-1.c: New testcase. Index: gcc/testsuite/gcc.c-torture/execute/20120615-1.c

Re: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 11:59 AM, Duncan Sands wrote: > Hi Richard, > > >> Uh, I don't think we should do that.  Why do we include cstring here >> anyways? >> >> Ian - you added this include in rev. 167764, I don't think that was >> "proper". >> But I'm not sure wrapping a system.h include inside

[PATCH][3/n] VRP and anti-range handling

2012-06-15 Thread Richard Guenther
This makes set_and_canonicalize_value_range more consistent. To be used in further patches. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-06-15 Richard Guenther * tree-vrp.c (set_and_canonicalize_value_range): Use canonical predicates to set

[PATCH][4/n] VRP and anti-range handling

2012-06-15 Thread Richard Guenther
-06-15 Richard Guenther * tree-vrp.c (extract_range_from_assert): Split out range intersecting code. (intersect_ranges): New function. (vrp_intersect_ranges): Likewise. Index: trunk/gcc/tree-vrp.c

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand wrote: > Hello, > > PR tree-optimization/53636 is a crash due to an invalid unaligned access > generated by the vectorizer. > > The problem is that vect_compute_data_ref_alignment uses DR_ALIGNED_TO > as computed by the default data-ref analysis to d

Re: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 2:40 PM, Duncan Sands wrote: > Hi Richard, > > >> As system.h is supposed to only include system headers and do nothing >> else it has to be prepared to be included from C++ already, so no extern >> "C" >> wrapping should be necessary for it. > > > it defines fancy_abort.  

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-17 Thread Richard Guenther
On Fri, Jun 15, 2012 at 5:00 PM, Ulrich Weigand wrote: > Richard Guenther wrote: >> On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand wrote: >> > However, there is a second case where we need to check every pass: if >> > we're not actually vectorizing any loop

Re: [patch] Fix PR middle-end/53590

2012-06-17 Thread Richard Guenther
On Fri, Jun 15, 2012 at 6:48 PM, Eric Botcazou wrote: >> Btw, I think we should enable this flag by default for all languages but >> Java so that if you enable -fnon-call-exceptions for C or C++ you don't get >> too many spurious exceptions from dead code. > > The attached patch enables it for the

Re: [RFC 0/3] Stuff related to pr53533

2012-06-17 Thread Richard Guenther
/i386.c| 126 +++- > gcc/config/i386/predicates.md |7 + > gcc/config/i386/sse.md| 72 ++-- > gcc/expmed.c | 438 > +++-- > gcc/machmode.h|8 +- > 6 files changed, 386 insertions(+), 266 deletions(-) > > -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imend

Re: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'

2012-06-17 Thread Richard Guenther
On Fri, Jun 15, 2012 at 5:18 PM, Gabriel Dos Reis wrote: > On Fri, Jun 15, 2012 at 10:13 AM, Duncan Sands wrote: >> Hi Gabriel, >> > Richard just reminded me that we have two fancy_aborts. > Could you tell which one your code is indirectly using? the one installed as p

Re: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'

2012-06-17 Thread Richard Guenther
On Sat, Jun 16, 2012 at 8:47 PM, Gabriel Dos Reis wrote: > On Sat, Jun 16, 2012 at 3:54 AM, Duncan Sands wrote: >> Hi, >> >> If ENABLE_BUILD_WITH_CXX is defined, then GCC itself is built with C++, and we want a C++ signature for functions.  If it is not defined, then GCC itself is

Re: [PATCH, testsuite]: Fix scan-tree-dump-times argument order in gcc.dg/tree-ssa/vrp68.c.

2012-06-17 Thread Richard Guenther
On Sun, Jun 17, 2012 at 10:41 AM, Uros Bizjak wrote: > Hello! > > The testcase still fails on x86_64-pc-linux-gnu with: > > FAIL: gcc.dg/tree-ssa/vrp68.c scan-tree-dump-times vrp1 "link_error" 1 > > since there are two calls to link_error. Oops. I wonder how I did not see those failures myself .

Re: [PATCH] Fix PR53703

2012-06-18 Thread Richard Guenther
ntinue; > > def1 = SSA_NAME_DEF_STMT (arg1); > @@ -1914,17 +1916,11 @@ hoist_adjacent_loads (basic_block bb0, basic_block > defswap = def1; > def1 = def2; > def2 = defswap; > - /* Don't swap bb1 and bb2 as we may have more than one > - phi to process successfully. */ > - bb_for_def1 = bb2; > - bb_for_def2 = bb1; > } > - else > - { > - bb_for_def1 = bb1; > - bb_for_def2 = bb2; > - } > > + bb_for_def1 = gimple_bb (def1); > + bb_for_def2 = gimple_bb (def2); > + >/* Check for proper alignment of the first field. */ >tree_offset1 = bit_position (field1); >tree_offset2 = bit_position (field2); > > > -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imend

Re: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'

2012-06-18 Thread Richard Guenther
On Sun, Jun 17, 2012 at 2:56 PM, Gabriel Dos Reis wrote: > On Sun, Jun 17, 2012 at 6:55 AM, Richard Guenther > wrote: >> On Fri, Jun 15, 2012 at 5:18 PM, Gabriel Dos Reis >> wrote: >>> On Fri, Jun 15, 2012 at 10:13 AM, Duncan Sands wrote: >>>> Hi Gabriel

Re: PR 53698: missing address conversion in expand_expr_addr_expr_1

2012-06-18 Thread Richard Guenther
On Mon, Jun 18, 2012 at 11:18 AM, Richard Sandiford wrote: > The result of expand_expr_addr_expr_1 is eventually converted to tmode, > and any variable offset is likewise applied in tmode, so tmode also seems > like the natural mode for applying constant offsets.  This patch makes sure > that the

Re: [PATCH][4/n] VRP and anti-range handling

2012-06-18 Thread Richard Guenther
On Fri, 15 Jun 2012, Richard Guenther wrote: > > This tries to completely implement the intersect primitive for > VRP (what extract_range_from_assert does at its end when merging > new and old knowledge). > > Bootstrap and regtest pending on x86_64-unknown-linux-gnu. > &g

[PATCH] Fix PR53693

2012-06-18 Thread Richard Guenther
When the vectorizer detects a widening shift pattern it has to make sure the widening operation is used only once as it will make it part of the recognized pattern. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2012-06-18 Richard Guenther PR tree

Re: RFA: Fix PR53688

2012-06-19 Thread Richard Guenther
On Mon, Jun 18, 2012 at 4:59 PM, Michael Matz wrote: > Hi, > > now that we regard MEM_EXPR as a conservative approximation for MEM_SIZE > (and MEM_OFFSET) we must ensure that this is really the case.  It isn't > currently for the string expanders, as they use the MEM_REF (whose address > was taken

Re: [patch] Fix PR48109 using artificial top-level asm statements (darwin/objc)

2012-06-19 Thread Richard Guenther
On Mon, Jun 18, 2012 at 7:51 PM, Steven Bosscher wrote: > Hello, > > This patch started as an attempt to remove #include "output.h" from > objc/: Instead of writing references directly to asm_out_file, the > references are output as top-level asm statements. It's a bit of a > hack, but it works an

Re: [PATCH] Bad code generation: incorrect folding of TARGET_MEM_REF into a constant

2012-06-19 Thread Richard Guenther
On Mon, Jun 18, 2012 at 9:51 PM, Jiří Hruška wrote: > Hi all, > > I have tracked down a bug which results in invalid code being > generated for indexed TARGET_MEM_REF expressions during dominator > optimization. > > The conditions are: accessing objects adjacent in memory in a loop (in > order to

Re: [PATCH, testsuite]: Fix scan-tree-dump-times argument order in gcc.dg/tree-ssa/vrp68.c.

2012-06-19 Thread Richard Guenther
On Mon, Jun 18, 2012 at 10:01 PM, Janis Johnson wrote: > On 06/17/2012 05:03 AM, Richard Guenther wrote: >> On Sun, Jun 17, 2012 at 10:41 AM, Uros Bizjak wrote: >>> Hello! >>> >>> The testcase still fails on x86_64-pc-linux-gnu with: >>> >>&

[PATCH] Fix PR53708

2012-06-19 Thread Richard Guenther
. Richard. 2012-06-19 Richard Guenther PR tree-optimization/53708 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve user-supplied alignment and alignment of decls with the used attribute. Index: gcc/tree-vect-data-refs.c

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread Richard Guenther
On Mon, 18 Jun 2012, William J. Schmidt wrote: > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > On Fri, 8 Jun 2012, William J. Schmidt wrote: > > > > > > > Hmm. I don't like this patch or its general idea too much. Instead > > I'd

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread Richard Guenther
On Mon, 18 Jun 2012, William J. Schmidt wrote: > On Mon, 2012-06-18 at 13:49 -0500, William J. Schmidt wrote: > > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > > On Fri, 8 Jun 2012, William J. Schmidt wrote: > > > > > > > > > >

Re: [PATCH] Fix PR53708

2012-06-19 Thread Richard Guenther
On Tue, 19 Jun 2012, Richard Sandiford wrote: > Richard Guenther writes: > > We are too eager to bump alignment of some decls when vectorizing. > > The fix is to not bump alignment of decls the user explicitely > > aligned or that are used in an unknown way. > > I tho

Re: RFA: Fix PR53688

2012-06-19 Thread Richard Guenther
On Tue, Jun 19, 2012 at 12:13 PM, Michael Matz wrote: > Hi, > > On Tue, 19 Jun 2012, Richard Guenther wrote: > >> > So, we have to build a memref always and rewrite its type to one >> > representing the real size.  Note that TYPE_MAX_VALUE may be NULL, so we >

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread Richard Guenther
On Tue, 19 Jun 2012, William J. Schmidt wrote: > On Tue, 2012-06-19 at 12:08 +0200, Richard Guenther wrote: > > On Mon, 18 Jun 2012, William J. Schmidt wrote: > > > > > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > > > On Fri,

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread Richard Guenther
On Tue, 19 Jun 2012, William J. Schmidt wrote: > On Tue, 2012-06-19 at 12:10 +0200, Richard Guenther wrote: > > On Mon, 18 Jun 2012, William J. Schmidt wrote: > > > > > On Mon, 2012-06-18 at 13:49 -0500, William J. Schmidt wrote: > > > > On Mon, 2012-06-11 at

[PATCH][5/n] VRP and anti-ranges

2012-06-19 Thread Richard Guenther
This adjusts intersect_ranges to match what will become union_ranges (but in a separate patch). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-06-19 Richard Guenther * tree-vrp.c (intersect_ranges): Handle more cases. (vrp_intersect_ranges

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread Richard Guenther
On Tue, 19 Jun 2012, William J. Schmidt wrote: > On Tue, 2012-06-19 at 14:48 +0200, Richard Guenther wrote: > > On Tue, 19 Jun 2012, William J. Schmidt wrote: > > > > > I remember having this discussion, and I was looking for it to check on > > > the details, b

[PATCH][7/n] VRP and anti-ranges

2012-06-19 Thread Richard Guenther
And here is the union_ranges part. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-06-19 Richard Guenther * tree-vrp.c (union_ranges): New function. (vrp_meet_1): Use union_ranges. (vrp_meet): Dump what we union and call vrp_meet_1

[PATCH] Fix vrp68 testcase

2012-06-19 Thread Richard Guenther
This fixes the testcase to match reality - and update the comments appropriately in it. Tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-06-19 Richard Guenther * gcc.dg/tree-ssa/vrp68.c: Adjust testcase. Index: gcc/testsuite/gcc.dg/tree-ssa/vrp68.c

Re: [PATCH] Fix PR53708

2012-06-20 Thread Richard Guenther
On Tue, 19 Jun 2012, Iain Sandoe wrote: > > On 19 Jun 2012, at 22:41, Mike Stump wrote: > > > On Jun 19, 2012, at 12:22 PM, Iain Sandoe wrote: > >> On 19 Jun 2012, at 13:53, Dominique Dhumieres wrote: > >> > >>> On Tue, 19 Jun 2012, Richard Gue

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-20 Thread Richard Guenther
On Tue, Jun 19, 2012 at 11:36 PM, Mikael Pettersson wrote: > Richard Guenther writes: >  > On Fri, Jun 15, 2012 at 5:00 PM, Ulrich Weigand > wrote: >  > > Richard Guenther wrote: >  > >> On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand > wrote: >  >

Re: [PR49888, VTA] don't keep VALUEs bound to modified MEMs

2012-06-20 Thread Richard Guenther
On Wed, Jun 20, 2012 at 5:52 AM, Alexandre Oliva wrote: > On Jun 16, 2012, "H.J. Lu" wrote: > >> If I understand it correctly, the new approach fails to handle push >> properly. > > It's actually cselib that didn't deal with push properly, so it thinks > incoming stack arguments may be clobbered

Re: RFA: PATCH to Makefile.def/tpl to add libgomp to make check-c++

2012-06-20 Thread Richard Guenther
On Wed, Jun 20, 2012 at 9:26 AM, Jason Merrill wrote: > The recent regression in libgomp leads me to want to add libgomp tests to > the check-c++ target.  OK for trunk? Ok. (what about libitm?) Thanks, Richard.

Re: [patch][RFC] Move the C front end to gcc/c/

2012-06-20 Thread Richard Guenther
On Wed, Jun 20, 2012 at 10:44 AM, Steven Bosscher wrote: > Hello, > > Attached is a concept patch to move the C front end to its own > sub-directory of the main gcc directory. Things like updates of > sourcebuild.texi are not yet included. > > I'm posting this as an RFC: Does this look like the ri

[PATCH] Adjust call stmt cost for tailcalls

2012-06-20 Thread Richard Guenther
Tailcalls have no argument setup cost and no return value cost. This patch adjusts estminate_num_insns to reflect that. Honza, does this look correct? Bootstrapped and tested on x86_64-unknown-linux-gnu. Thanks, Richard. 2012-06-20 Richard Guenther * tree-inline.c

Re: [PATCH] Fix PR53708

2012-06-20 Thread Richard Guenther
On Tue, 19 Jun 2012, Dominique Dhumieres wrote: > On Tue, 19 Jun 2012, Richard Guenther wrote: > > > > > Richard Guenther writes: > > > > We are too eager to bump alignment of some decls when vectorizing. > > > > The fix is to not bump alignment of dec

Re: [Patch] PR 51938: extend ifcombine

2012-06-20 Thread Richard Guenther
On Sun, Jun 10, 2012 at 4:16 PM, Marc Glisse wrote: > Hello, > > currently, tree-ssa-ifcombine handles pairs of imbricated "if"s that share > the same then branch, or the same else branch. There is no particular reason > why it couldn't also handle the case where the then branch of one is the > el

<    2   3   4   5   6   7   8   9   10   11   >