Go patch commited: tuple receives indicate whether channel closed

2011-03-23 Thread Ian Lance Taylor
The Go language has changed the meaning of v, ok := <-c Now ok is set to whether the channel is closed, rather than having this be a nonblocking read in which ok is set to whether the value was received. Nonblocking reads now require a select statement. This patch implements this in gccgo

[patch, ARM] Fix PR48250, adjust DImode reload address legitimizing

2011-03-23 Thread Chung-Lin Tang
Hi, PR48250 happens under TARGET_NEON, where DImode is included within the valid NEON modes. This turns the range of legitimate constant indexes to step-4 (coproc load/store), thus arm_legitimize_reload_address() when trying to decompose the [reg+index] reload address into [(reg+index_high)+index_l

Re: Can't use SImode as Pmode for x32

2011-03-23 Thread H.J. Lu
On Wed, Mar 23, 2011 at 12:06 PM, Richard Henderson wrote: > On 03/19/2011 08:46 AM, H.J. Lu wrote: >> Operations on stack and frame pointers, like push/pop, require stack >> and frame pointers in DImode.  Even if I use word_mode in gen_push >> and gen_pop, I got > > No they don't.  Not really.  A

Go patch committed: if statement condition is not optional

2011-03-23 Thread Ian Lance Taylor
The Go language used to permit omitting the condition from an if statement. This was useless, but was permitted by analogy with a for statement. This useless feature has now been removed. This patch removes it from the gccgo frontend, and adjusts some tests to match. Bootstrapped and ran Go test

Re: [PATCH: ARM] PR 45335 Use ldrd and strd to access two consecutive words

2011-03-23 Thread Mike Stump
On Jan 18, 2011, at 6:59 AM, Carrot Wei wrote: > +(define_insn "*ldrd" > + [(parallel [(set (match_operand:SI 0 "arm_hard_register_operand" "") parallel is implicit, you can safely remove it from all define_insns.

Go patch committed: Change c <- v from an expression to a statement

2011-03-23 Thread Ian Lance Taylor
Go used to have special handling if c <- v (send a value on a channel) were used as an expression rather than as a statement. However, that is no longer true. Now c <- v must always be a statement. This patch implements that in the Go frontend, and adjusts test cases to match. In this patch I a

Go testsuite patch committed: Ignore //// lines in errchk

2011-03-23 Thread Ian Lance Taylor
This patch to the Go testsuite driver ignores lines containing when handling an errchk test (which is similar to a dg-test). This reflects a change to the master errchk driver, which is a perl script. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian

[pph] AST streaming (4/4) (issue4303049)

2011-03-23 Thread Diego Novillo
Ugly LTO hacks. To be nuked. See http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01556.html for details. Diego. * lto-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers): Always read DECL_SAVED_TREE. * lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers):

[pph] AST streaming (3/4) (issue4303049)

2011-03-23 Thread Diego Novillo
LTO cleanups. See http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01556.html for details. * lto-streamer-in.c (input_string_internal): Add clarifying comments. * lto-streamer-out.c (lto_output_string_with_length): Rename from output_string_with_length. Output

[pph] AST streaming (2/4) (issue4303049)

2011-03-23 Thread Diego Novillo
Main streaming support. See http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01556.html for details. cp/ChangeLog.pph 2011-03-23 Diego Novillo * Make-lang.in (cp/pph-streamer.o): Add dependencies on tree-pretty-print.h, CXX_PPH_H, TREE_PASS_H, version.h and cppbuiltin.h

[pph] AST streaming (1/4) (issue4303049)

2011-03-23 Thread Diego Novillo
This set of 4 patches sets up the basic streaming facility for PPH. The idea is to re-use common code in LTO streaming and add streaming hooks for dealing with front end specific data. As we discussed earlier today (http://gcc.gnu.org/ml/gcc/2011-03/msg00354.html), the front end needs to handle m

[doc patch] obvious partial fix for other/48254

2011-03-23 Thread Jonathan Wakely
Committed to 4.4 and 4.5 branches as obvious, will apply to 4.6 after 4.6.0 is released. The option's gone on the trunk so not relevant there. 2011-03-23 Jonathan Wakely PR other/48254 * doc/invoke.texi (-fipa-struct-reorg): Fix typo. Index: doc/invoke.texi ===

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Nathan Froyd
On Wed, Mar 23, 2011 at 01:55:34PM -0700, Richard Henderson wrote: > I can't see how emitting a NULL_RTX should be a Good Thing, ever, > and thus I don't see why we should be doing special things to > handle it. Ah, I thought the same thing and gcc_assert'ed emitting a NULL_RTX. I didn't get ver

[lto] Minor cleanups, export some functions (issue4272068)

2011-03-23 Thread Diego Novillo
This patch has a few cleanups and exports 5 functions from the LTO streamer that we are using from PPH. - When calling output_string_with_length, every caller would first write a 0 to indicate that the string is not NULL before writing the actual string. I moved that into output_string_with_

libgo patch committed: send on a closed channel panics

2011-03-23 Thread Ian Lance Taylor
The Go language spec has been changed to say that sending on a closed channel panics. This patch implements that. Also, there is no longer any limit on the number of times a program may receive a value from a closed channel. Also, calling close on a closed channel panics. Bootstrapped and tested

Re: [MIPS] Hookize FUNCTION_VALUE, LIBCALL_VALUE and FUNCTION_VALUE_REGNO_P

2011-03-23 Thread Richard Sandiford
Anatoly Sokolov writes: > -/* Implement FUNCTION_VALUE and LIBCALL_VALUE. For normal calls, > - VALTYPE is the return type and MODE is VOIDmode. For libcalls, > - VALTYPE is null and MODE is the mode of the return value. */ > +/* Implement TARGET_FUNCTION_VALUE and TERGET_LIBCALL_VALUE. ty

[patch] Fix invalid GIMPLE out of SRA

2011-03-23 Thread Eric Botcazou
Hi, this is a fallout of one of my gimplifier changes. For the attached testcase, the compiler generates invalid GIMPLE at -O1 or above: p.adb: In function 'P.F': p.adb:24:1: error: invalid operand in unary operation D.2361_107 = (integer[1:1] *) &*S15b.16_56[D.2327_91 ...]{lb: 1 sz: 4}; if

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Richard Henderson
On 03/23/2011 01:17 PM, Nathan Froyd wrote: > * emit-rtl.c (emit_pattern_after_setloc): New function. > (emit_insn_after_setloc, emit_jump_insn_after_setloc): Call it. > (emit_call_insn_after_setloc, emit_debug_insn_after_setloc): Likewise. > (emit_pattern_after): New functi

Re: [patch, hpux, testsuite] XFAIL pr47917.c for non-conforming snprintf

2011-03-23 Thread Steve Ellcey
On Wed, 2011-03-23 at 16:34 -0400, John David Anglin wrote: > > This patch moves gcc.c-torture/execute/pr47917.c to > > gcc.dg/torture/pr47917.c so that I can use dg-* directives in the test > > and then adds xfails for HP-UX. On HP-UX 10.* there is no snprintf > > The new gcc.dg/torture/pr47917.

Re: [patch, hpux, testsuite] XFAIL pr47917.c for non-conforming snprintf

2011-03-23 Thread John David Anglin
> This patch moves gcc.c-torture/execute/pr47917.c to > gcc.dg/torture/pr47917.c so that I can use dg-* directives in the test > and then adds xfails for HP-UX. On HP-UX 10.* there is no snprintf The new gcc.dg/torture/pr47917.c lacks some code. > Dave, can you verify this fix on HP-UX 10.*? I

Re: [v3] Regenerate Solaris 2 baselines for GCC 4.6.0 release

2011-03-23 Thread Benjamin Kosnik
> 2011-03-15 Rainer Orth > > * config/abi/post/solaris2.8/baseline_symbols.txt: Regenerate. > * config/abi/post/solaris2.8/sparcv9/baseline_symbols.txt: > Likewise. > * config/abi/post/solaris2.10/baseline_symbols.txt: Likewise. > * config/abi/post/solaris2.10/amd64/bas

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Nathan Froyd
On Wed, Mar 23, 2011 at 11:36:26AM -0700, Richard Henderson wrote: > On 03/23/2011 05:09 AM, Nathan Froyd wrote: > > Did you mean loc == UNKNOWN_LOCATION? Also, it looks like that's > > conflating INSN_LOCATORs and location_ts; it seems like it'd be better > > to keep them separate. > > Ug. Yes

[PATCH] Fix simplify_const_unary_operation (PR debug/48204)

2011-03-23 Thread Jakub Jelinek
Hi! simplify_const_unary_operation assumes it doesn't have to change anything in REAL_VALUE_TYPE for FLOAT_EXTEND, which is wrong when FLOAT_EXTENDing e.g. from SFmode to DDmode or SDmode to DFmode, where the number needs to be converted from binary to decimal or vice versa. Fixed thusly, bootstr

[PATCH] Better .debug_aranges fix (PR debug/48253)

2011-03-23 Thread Jakub Jelinek
Hi! As the testcases in the PR show (I think they are hardly suitable for gcc testsuite though, better for gdb or elfutils testsuite), we still don't cover all code in the CU with .debug_aranges (regression from 4.5) and with -freorder-blocks-and-partition we do even more bad things. The problem

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Ulrich Weigand
Richard Henderson wrote: > Because, really, if we consider the structure truly public, we can't even > change the number of registers for a given port to support new features of > the cpu. Indeed, and I remember we got bitten by that a long time ago, which is why s390.h now has this comment: /* N

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Jakub Jelinek
On Wed, Mar 23, 2011 at 12:01:37PM -0700, Richard Henderson wrote: > Guh. The entire point of making _Unwind_Context opaque, and inventing > libgcc_s, > was so that we didn't have to think about these things. There's one and only > one > copy of the unwind library and all uses of the structure

[RFC PATCH, i386]: ICE: in final_scan_insn due to late split

2011-03-23 Thread Uros Bizjak
Hello! The testcase from the PR triggers a split in *movdf_internal_rex64 move pattern too late in the compilation process. Attached patch fixes this by emitting relevant moves directly, without splitting them to DImode moves at all [it looks to me, that _rex64 pattern was copied directly from 32

[MIPS] Hookize FUNCTION_VALUE, LIBCALL_VALUE and FUNCTION_VALUE_REGNO_P

2011-03-23 Thread Anatoly Sokolov
Hello. This patch removes obsolete FUNCTION_VALUE, LIBCALL_VALUE and FUNCTION_VALUE_REGNO_P macros from MIPS back end in the GCC and introduces equivalent TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE and TARGET_FUNCTION_VALUE_REGNO_P target hooks. Bootstrapped and regression tested on mips64e

Re: Can't use SImode as Pmode for x32

2011-03-23 Thread Richard Henderson
On 03/19/2011 08:46 AM, H.J. Lu wrote: > Operations on stack and frame pointers, like push/pop, require stack > and frame pointers in DImode. Even if I use word_mode in gen_push > and gen_pop, I got No they don't. Not really. Assuming the stack and frame pointer are properly zero extended, and

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Richard Henderson
On 03/23/2011 11:37 AM, Jakub Jelinek wrote: > E.g. for ppc64 that's 1160 bytes, mmix 2104 bytes, ... > But if you think the 6 or so conditionals would be too much burden, just > ignore me. I suppose we could interpret (a part of?) "version" as a bitmap of features, rather than a serial number...

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Jakub Jelinek
On Wed, Mar 23, 2011 at 11:20:24AM -0700, Richard Henderson wrote: > On 03/23/2011 11:04 AM, Jakub Jelinek wrote: > > For several targets that would grow the context significantly, do you think > > we really have to do that for all targets rather than just for the > > sizeof (_Unwind_Word) > sizeof

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Richard Henderson
On 03/23/2011 05:09 AM, Nathan Froyd wrote: > Did you mean loc == UNKNOWN_LOCATION? Also, it looks like that's > conflating INSN_LOCATORs and location_ts; it seems like it'd be better > to keep them separate. Ug. Yes and yes. I'd forgotten that insn_locators are different from line locations.

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Richard Henderson
On 03/23/2011 11:24 AM, H.J. Lu wrote: > FWIW, I ran into this on x32, which is totally new and doesn't have > backward compatibility issue. I don't care. I'm not going to totally destroy maintainability for the sake of one target. There shall be a common solution. r~

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread H.J. Lu
On Wed, Mar 23, 2011 at 11:20 AM, Richard Henderson wrote: > On 03/23/2011 11:04 AM, Jakub Jelinek wrote: >> For several targets that would grow the context significantly, do you think >> we really have to do that for all targets rather than just for the >> sizeof (_Unwind_Word) > sizeof (void *)

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Richard Henderson
On 03/23/2011 11:04 AM, Jakub Jelinek wrote: > For several targets that would grow the context significantly, do you think > we really have to do that for all targets rather than just for the > sizeof (_Unwind_Word) > sizeof (void *) ones? The accessors are wrapped > in inline functions anyway. G

[Patch] get an order number on -fdump-tree-all

2011-03-23 Thread Pierre Vittet
Hello, When we use fdump-tree-all, we get the dump file, however there is no way to know in which order the pass was executed. We can use gdb with a breakpoint at the good position (something like execute_one_pass), however this solution is not satisfiying for plugin devellopers for exemple. T

Re: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Georg-Johann Lay
Weddington, Eric schrieb: Hi Johann, Can we hold off on this patch for just a little bit? I agree it would be good to clean it up, but I would like to get in the attached patch to add some builtin functions that Anatoly and I worked on. The patch was (nominally) for 4.4. I need to see if it wil

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Jakub Jelinek
On Wed, Mar 23, 2011 at 10:50:35AM -0700, Richard Henderson wrote: > >> > >> Sure, that's easy. I think what you are really asking is: will there be > >> a case where we could call functions from one copy and then pass the > >> context to the functions from a different copy. I don't know the answ

Re: Cleaning up expand optabs code

2011-03-23 Thread Anatoly Sokolov
Hi. From: "Richard Henderson" Sent: Tuesday, March 22, 2011 8:48 PM Ok. Watch out for other target problems this week. This patch casue ICE on H8300 target: make[4]: Entering directory `/home/aesok/h83001/build/h8300-elf/h8300h/libgcc' # If this is the top-level multilib, build all t

[PATCH] reload: Avoid superfluous reloads after find_reloads_subreg_address

2011-03-23 Thread Andreas Krebbel
Hi, find_reloads_subreg_address has to get rid of (subreg (mem ...)) RTXs. In order to do so the full address sometimes gets reloaded. E.g. if the resulting address is invalid and gets pushed into the literal pool. Unfortunately that information is not propagated into find_reloads. So find_reloa

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Richard Henderson
On 03/22/2011 10:01 PM, H.J. Lu wrote: >>> Will there be a case where 2 copies of unwind-dw2.c are within the same >>> process? >> >> Sure, that's easy. I think what you are really asking is: will there be >> a case where we could call functions from one copy and then pass the >> context to the fu

[PATCH, 4.7] Add float/double vector reductions to VSX

2011-03-23 Thread Michael Meissner
Pat Haugen noticed we were doing stores in benchmarks where we were doing vector reductions to extract the final float element. So I decided to take a look. This code implements the vector reductions without doing stores for float vectors, and eliminates a vector shift for double vectors. I susp

RE: Fix for PR target/47779

2011-03-23 Thread Henderson, Stuart
Thanks. I don't have write permissions. Could someone apply it to trunk/appropriate branches? Stu -Original Message- From: Bernd Schmidt [mailto:ber...@codesourcery.com] Sent: 22 March 2011 16:03 To: Henderson, Stuart Cc: gcc-patches@gcc.gnu.org Subject: Re: Fix for PR target/47779 On

Re: Fix a few use-after-free issues

2011-03-23 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/23/11 08:25, Jeff Law wrote: > On 03/21/11 11:50, Jakub Jelinek wrote: >> On Mon, Mar 21, 2011 at 11:37:16AM -0600, Jeff Law wrote: >>> Similarly for redirect_edge_succ_nodup in this fragment: >>> >>> ret = redirect_edge_succ_nodup (e, de

Re: [PATCH 3/6] Allow jumps in epilogues

2011-03-23 Thread Richard Henderson
On 03/23/2011 10:22 AM, Bernd Schmidt wrote: > On 03/23/2011 06:19 PM, Richard Henderson wrote: >> body >> body >> restore r1 XXX >> restore r2 XXX >> jmp L2 XXX >> >> L1: bodyYYY >> bodyYYY >> restore r2 >> >> L2: rest

Re: [PATCH 3/6] Allow jumps in epilogues

2011-03-23 Thread Bernd Schmidt
On 03/23/2011 06:19 PM, Richard Henderson wrote: > body > body > restore r1 XXX > restore r2 XXX > jmp L2 XXX > > L1: bodyYYY > bodyYYY > restore r2 > > L2: restore r3 > return > In general, with shrin

[Patch] Ensure libbffastfp overrides libgcc

2011-03-23 Thread Henderson, Stuart
The attached patch ensures libbffastfp overrides libgcc when -mfast-fp is used for bfin-uclinux targets. 2011-03-23 Stuart Henderson From Jie Zhang: * config/bfin/uclinux.h (LINK_GCC_C_SEQUENCE_SPEC): Make sure libbffastfp overrides libgcc when -mfast-fp. I don't have write permi

Re: [PATCH 3/6] Allow jumps in epilogues

2011-03-23 Thread Richard Henderson
On 03/23/2011 09:48 AM, Bernd Schmidt wrote: >> With no more code than this, I cannot believe you're generating correct >> unwind info anymore. > > Why not? Are you worried about the code at the destination of the jump? > That should be preceded by another block falling through into it which > als

Re: [PATCH 3/4] A tweak to fortran -> call graph interface

2011-03-23 Thread Jan Hubicka
> Hi, > > it seems to me that fortran can call cgraph_create_node directly > without checking for its existence first. > > Thanks, > > Martin > > > 2011-03-18 Martin Jambor > > * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node > instead of cgraph_get_create_n

Re: [PATCH 4/4] Tweaks to objc -> call graph interface

2011-03-23 Thread Jan Hubicka
> Hi, > > thi is really only based on successful testing and not much analyzis > of the context but it seems that we don't need lazy node construction > here. It would be nice not to have it after the big patch gets in. > > Thanks, > > Martin > > > 2011-03-18 Martin Jambor > > * obj

Re: [PATCH 2/4] Tweaks to C++ -> call graph interface

2011-03-23 Thread Jan Hubicka
> I concede that my understanding of the C++ front-end inner workings > are quite narrow and so the folling is basically a suggestion. But it > seems to me that at a few places where C++ queries the call graph for > a node, the lazy node creation is not necessary. If a maintainer can > verify and

Re: [PATCH 3/6] Allow jumps in epilogues

2011-03-23 Thread Bernd Schmidt
On 03/23/2011 05:46 PM, Richard Henderson wrote: > On 03/23/2011 07:50 AM, Bernd Schmidt wrote: >> dwarf2out has code that starts scanning from NOTE_INSN_EPILOGUE_BEG >> until it finds the return jump. When there is common code in several >> blocks ending in a return, we might want to share this, a

Re: [PATCH 3/6] Allow jumps in epilogues

2011-03-23 Thread Richard Henderson
On 03/23/2011 07:50 AM, Bernd Schmidt wrote: > dwarf2out has code that starts scanning from NOTE_INSN_EPILOGUE_BEG > until it finds the return jump. When there is common code in several > blocks ending in a return, we might want to share this, and in that case > it would be possible to encounter a

RE: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Weddington, Eric
> -Original Message- > From: Richard Henderson [mailto:r...@redhat.com] > Sent: Wednesday, March 23, 2011 10:24 AM > To: Weddington, Eric > Cc: Georg-Johann Lay; gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly > Sokolov; Joerg Wunsch > Subject: Re: [Patch][AVR]: Use define_c_enum where

Re: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Richard Henderson
> +;; SWAP > +(define_insn "swap" > + [(set (match_operand:QI 0 "register_operand" "=r") > + (unspec:QI [(match_operand:QI 1 "register_operand" "0")] > +UNSPEC_SWAP))] > + "" > + "swap %0" > + [(set_attr "length" "1") > + (set_attr "cc" "none")]) This is already properly

[patch, hpux, testsuite] XFAIL pr47917.c for non-conforming snprintf

2011-03-23 Thread Steve Ellcey
This patch moves gcc.c-torture/execute/pr47917.c to gcc.dg/torture/pr47917.c so that I can use dg-* directives in the test and then adds xfails for HP-UX. On HP-UX 10.* there is no snprintf function so the test does not compile. On HP-UX 11.[012]*, there is a snprintf function but it is not C99 c

RE: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Wednesday, March 23, 2011 9:10 AM > To: Weddington, Eric > Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly Sokolov; Joerg > Wunsch > Subject: Re: [Patch][AVR]: Use define_c_enum where appropriate > > Of co

Problem with ARM longcalls

2011-03-23 Thread Bernd Schmidt
I've discovered a problem with -mlong-calls on ARM. The bug was first reported against a new target, but I'd copied the relevant code from the ARM backend. We use current_function_section in arm_is_long_call_p to decide whether we're calling something that goes into the same section. The problem w

Re: [patch] Enhance conditional store sinking

2011-03-23 Thread Richard Guenther
On Tue, Mar 22, 2011 at 2:28 PM, Ira Rosen wrote: > On 17 March 2011 16:48, Richard Guenther wrote: > >>> +  then_datarefs = VEC_alloc (data_reference_p, heap, 1); >>> +  else_datarefs = VEC_alloc (data_reference_p, heap, 1); >>> +  then_ddrs = VEC_alloc (ddr_p, heap, 1); >>> +  else_ddrs = VEC_a

Re: [PATCH 5/6] Generate more shrink-wrapping opportunities

2011-03-23 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/23/11 09:04, Bernd Schmidt wrote: > On 03/23/2011 04:03 PM, Jeff Law wrote: >> On 03/23/11 08:55, Bernd Schmidt wrote: >>> The first basic block contains insns to move incoming argument registers >>> to pseudos. When these pseudos live across cal

Re: [patch, ARM] Fix PR46934, Thumb-1 ICE

2011-03-23 Thread Richard Earnshaw
On 23 Mar 2011, at 14:52, "Chung-Lin Tang" wrote: > Hi, in the ARM "casesi" expand pattern, when the table base index > constant is 0x800, it is stored sign extended as an rtx (const_int > 0x800) (assuming 64-bit HOST_WIDE_INT). > > Subtraction by adding GEN_INT(-INTVAL(operand

[PATCH] Fix PR48193 and dups

2011-03-23 Thread Richard Guenther
This fixes VOP renaming in IPA split (well, or rather adds to its crudeness). We really need to rename the reaching VDEF of the exit of the SESE region we kill, as that VDEF will be released when removing the definitions basic-block. What we really would want to do is replace that SESE region wi

Re: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Georg-Johann Lay
Weddington, Eric schrieb: > >> -Original Message- From: Georg-Johann Lay >> [mailto:a...@gjlay.de] Sent: Wednesday, March 23, 2011 8:45 AM To: >> gcc-patches@gcc.gnu.org Cc: Denis Chertykov; Anatoly Sokolov; >> Weddington, Eric Subject: [Patch][AVR]: Use define_c_enum where >> appropriate

Re: [PATCH 5/6] Generate more shrink-wrapping opportunities

2011-03-23 Thread Bernd Schmidt
On 03/23/2011 04:03 PM, Jeff Law wrote: > On 03/23/11 08:55, Bernd Schmidt wrote: >> The first basic block contains insns to move incoming argument registers >> to pseudos. When these pseudos live across calls, they get allocated to >> call-saved registers. This in turns disables shrink-wrapping, s

Re: [PATCH 5/6] Generate more shrink-wrapping opportunities

2011-03-23 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/23/11 08:55, Bernd Schmidt wrote: > The first basic block contains insns to move incoming argument registers > to pseudos. When these pseudos live across calls, they get allocated to > call-saved registers. This in turns disables shrink-wrapping,

RE: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Wednesday, March 23, 2011 8:45 AM > To: gcc-patches@gcc.gnu.org > Cc: Denis Chertykov; Anatoly Sokolov; Weddington, Eric > Subject: [Patch][AVR]: Use define_c_enum where appropriate > > Use define_c_enum instead

[PATCH 6/6] A testcase

2011-03-23 Thread Bernd Schmidt
I don't see a good way to scan assembly output for this optimization, so I've just added the following testcase based on scanning the dump file. Better ideas are welcome. Bernd * function.c (thread_prologue_and_epilogue_insns): Emit information about shrink wrapping in the dump f

[PATCH 5/6] Generate more shrink-wrapping opportunities

2011-03-23 Thread Bernd Schmidt
The first basic block contains insns to move incoming argument registers to pseudos. When these pseudos live across calls, they get allocated to call-saved registers. This in turns disables shrink-wrapping, since the move instruction requires the prologue (saving the call-saved reg) to occur before

[patch, ARM] Fix PR46934, Thumb-1 ICE

2011-03-23 Thread Chung-Lin Tang
Hi, in the ARM "casesi" expand pattern, when the table base index constant is 0x800, it is stored sign extended as an rtx (const_int 0x800) (assuming 64-bit HOST_WIDE_INT). Subtraction by adding GEN_INT(-INTVAL(operands[1])) then creates (const_int 0x8000), which is not sign-ex

[PATCH 3/6] Allow jumps in epilogues

2011-03-23 Thread Bernd Schmidt
dwarf2out has code that starts scanning from NOTE_INSN_EPILOGUE_BEG until it finds the return jump. When there is common code in several blocks ending in a return, we might want to share this, and in that case it would be possible to encounter a simplejump rather than a returnjump. This should be s

[PATCH 2/6] Unique return rtx

2011-03-23 Thread Bernd Schmidt
We'll start putting "return" into JUMP_LABELS in a subsequent patch, so I've decided to make it unique as a small cleanup. There's already another macro called "return_rtx", so the new one goes by the name of "ret_rtx". Bernd * gengenrtl.c (special_rtx): PC, CC0 and RETURN are special.

Re: [PATCH] Remove ipa-struct-reorg and ipa-type-escape

2011-03-23 Thread Richard Guenther
On Wed, 23 Mar 2011, Richard Guenther wrote: > > IPA struct reorg has been un-enableable on the 4.6 branch for half > a year now. This completes this disabling by removing it and > IPA type escape analysis which it is the only remaining user of. > > Bootstrap and regtest running on x86_64-unkno

[PATCH 1/6] Disallow predicating the prologue

2011-03-23 Thread Bernd Schmidt
With prologues appearing in blocks other than the entry block, ifcvt can decide to predicate them. This is not a good idea, as dwarf2out will blow up trying to handle predicated frame-related things. Bernd * ifcvt.c (cond_exec_process_insns): Disallow converting a block that conta

[Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Georg-Johann Lay
Use define_c_enum instead of magic numbers to get unspec resp. unspec_volatile constants. 2011-03-23 Georg-Johann Lay * config/avr/avr.md (define_constants): Move UNSPEC_* resp. UNSPECV_* defines to... (define_c_enum "unspec") ...this new enum resp. ... (define_

Shrink-wrapping: Introduction

2011-03-23 Thread Bernd Schmidt
I'll be posting a series of patches that add an implementation of shrink-wrapping to gcc. I've used the algorithm in Muchnick's book as a guideline, but ended up with an implementation that is somewhat more conservative. One of my goals was to reuse the existing prologue/epilogue infrastructure as

Re: Fix a few use-after-free issues

2011-03-23 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/21/11 11:50, Jakub Jelinek wrote: > On Mon, Mar 21, 2011 at 11:37:16AM -0600, Jeff Law wrote: >> Similarly for redirect_edge_succ_nodup in this fragment: >> >> ret = redirect_edge_succ_nodup (e, dest); >> if (dump_file) >> fp

[PATCH] Add FRE pass to the early optimization pipeline

2011-03-23 Thread Richard Guenther
For quite some releases we'd wanted some (memory) CSE optimization during early opts. Currently we rely heavily on SRA which doesn't always fulfill the "make code only smaller" promises which is what early opts should do to improve precision of function size estimates and to improve abstraction r

Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-03-23 Thread Ian Lance Taylor
"H.J. Lu" writes: > On Tue, Mar 22, 2011 at 9:52 PM, Ian Lance Taylor wrote: >> "H.J. Lu" writes: >> This suggests that, at least, when sizeof(_Unwind_Word) > sizeof(void*), we need to extend _Unwind_Context with a new array at the end, and use that new array when by_value[REG] i

Re: [libgo] Provide strerror_r replacement (PR go/47515)

2011-03-23 Thread Rainer Orth
Ian Lance Taylor writes: > I think we should just have Go code that calls strerror anyhow. There's > no reason to drop into C here. I'll get to that at some point if nobody > else does. Fine with me. I've just noticed that not only IRIX 6.5 is affected, but Solaris 8 and 9, too. Rain

Re: [libgo] Provide strerror_r replacement (PR go/47515)

2011-03-23 Thread Ian Lance Taylor
Rainer Orth writes: > Jakub Jelinek writes: > >> On Tue, Mar 22, 2011 at 06:41:25PM +0100, Rainer Orth wrote: >>> Apart from the lack of wait4, libgo on IRIX 6.5 contained an undefined >>> reference to strerror_r. This patch provides a replacement, based on >>> gnulib/lib/strerror_r.c, but mass

[PATCH] Remove ipa-struct-reorg and ipa-type-escape

2011-03-23 Thread Richard Guenther
IPA struct reorg has been un-enableable on the 4.6 branch for half a year now. This completes this disabling by removing it and IPA type escape analysis which it is the only remaining user of. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2011-03-23 Richard Guenther

[PATCH] Fixup stdarg handling with &MEM_REF style pointer bumps

2011-03-23 Thread Richard Guenther
This fixes the fallout of executing forwprop after FRE which runs before stdarg. forwprop transforms series of pointer increments to pointer increments of larger offset and uses &MEM[ptr + CST] as canonical form for ptr + CST (the former is is_gimple_min_invariant). Bootstrapped and tested on x8

Re: [4.7] Avoid global state in s390_handle_option

2011-03-23 Thread Joseph S. Myers
On Wed, 23 Mar 2011, Andreas Krebbel wrote: > Hi Joseph, > > sorry for the late reply to your patch. I would like to propose a few > changes as implemented with the attached patch: These seem reasonable to me. -- Joseph S. Myers jos...@codesourcery.com

Re: [libgo] Provide strerror_r replacement (PR go/47515)

2011-03-23 Thread Rainer Orth
Jakub Jelinek writes: > On Tue, Mar 22, 2011 at 06:41:25PM +0100, Rainer Orth wrote: >> Apart from the lack of wait4, libgo on IRIX 6.5 contained an undefined >> reference to strerror_r. This patch provides a replacement, based on >> gnulib/lib/strerror_r.c, but massively simplified. > > gnulib

Re: [v3] Regenerate Solaris 2 baselines for GCC 4.6.0 release

2011-03-23 Thread Jakub Jelinek
On Wed, Mar 23, 2011 at 01:27:53PM +0100, Rainer Orth wrote: > Ok for mainline (once testing has finished) and 4.6 branch now? Looks ok to me, so if Benjamin is ok with it too... > 2011-03-15 Rainer Orth > > * config/abi/post/solaris2.8/baseline_symbols.txt: Regenerate. > * config

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Nathan Froyd
On Tue, Mar 22, 2011 at 05:06:39PM -0700, Richard Henderson wrote: > On 03/22/2011 04:13 PM, Nathan Froyd wrote: > > rtx > > emit_call_insn_before_setloc (rtx pattern, rtx before, int loc) > > { > > ... > > if (pattern == NULL_RTX) > > return last; > > > > first = NEXT_INSN (first); > >

Re: [PATCH] sparc and alpha baseline_symbols.txt update

2011-03-23 Thread Benjamin Kosnik
> 2011-03-22 Matthias Klose > > * config/abi/post/sparc-linux-gnu/baseline_symbols.txt: > Regenerated. > > 2011-03-22 Uros Bizjak > > * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: > Regenerated. Yay. Jakub I'm deferring to you on this, your analysis seems sound. The

Re: [PATCH] Volatile bitfields vs. inline asm memory constraints

2011-03-23 Thread Julian Brown
On Wed, 9 Feb 2011 09:37:41 -0500 Diego Novillo wrote: > On Mon, Nov 22, 2010 at 08:28, Julian Brown > wrote: > > Hi, > > > > This patch fixes the issue in the (Launchpad, not GCC) bug tracker: > > > > https://bugs.launchpad.net/gcc-linaro/+bug/675347 > > > > The problem was introduced by the pa

Re: [4.7] Avoid global state in s390_handle_option

2011-03-23 Thread Andreas Krebbel
Hi Joseph, sorry for the late reply to your patch. I would like to propose a few changes as implemented with the attached patch: - The options mapped to an enum type seem to always need an initialization value. Otherwise there is a warning when compiling options.c: error: enum conversion i

PING^2: PR 47551: ARM patch for Neon-related spill failure

2011-03-23 Thread Richard Sandiford
Second ping for this ARM-specific reload fix: http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02266.html Thanks, Richard

[testsuite] Skip g++.dg/guality/guality.exp on Tru64 UNIX (PR testsuite/48251)

2011-03-23 Thread Rainer Orth
As reported in the PR, the timeout running the guality_check test in the g++.dg/guality testsuite doesn't work on Tru64 UNIX V5.1B, which hangs the complete bootstrap. Until this is resolved, I'm disabling this testsuite on alpha*-dec-osf*. Tested with the appropriate runtest invocation, installe

[Patch] Update bfin part tests to latest silicon revision

2011-03-23 Thread Henderson, Stuart
The attached testsuite patch updates the blackfin part macro tests to expect the latest silicon revision, as well as fixing up some duplication in the bf51x parts. 2011-03-23 Stuart Henderson * gcc.target/bfin/mcpu-bf542.c: Update to latest silicon revision. * gcc.target/bfin/mcpu-bf

Re: [x32] PATCH: PR middle-end/47725: [x32] error: unable to find a register to spill in class DIREG

2011-03-23 Thread H.J. Lu
On Wed, Mar 23, 2011 at 1:22 AM, Eric Botcazou wrote: >> It is: >> >>       op0 = parmreg; >>       op1 = validated_mem; >>       if (icode != CODE_FOR_nothing >>           && insn_data[icode].operand[0].predicate (op0, >> promoted_nominal_mode) && insn_data[icode].operand[1].predicate (op1, >> da

[Patch] Update bfin parts to latest silicon revisions

2011-03-23 Thread Henderson, Stuart
The attached patch adds support for (and changes defaults to) the latest silicon revisions for Blackfin parts. 2011-03-23 Stuart Henderson * config/bfin/bfin.c (bfin_cpus): Update silicon revisions. I don't have write permissions. Thanks, Stu upstream.patch Description: upstream

[Ada] Fix ICE on call returning variable-sized record type

2011-03-23 Thread Eric Botcazou
The gimplifier doesn't know how to create variable-sized temporaries so this needs to be done in gigi. This case was missed by the machinery. The patch is more than a mere fix as it overhauls the entire machinery. Tested on i586-suse-linux, applied on the mainline. 2011-03-23 Eric Botcazou

[Ada] Small gigi tweaks

2011-03-23 Thread Eric Botcazou
In preparation for a larger change. Tested on i586-suse-linux, applied on the mainline. 2011-03-23 Eric Botcazou * gcc-interface/decl.c (validate_size): Improve comments and tweak error message. (set_rm_size): Likewise. -- Eric Botcazou Index: gcc-interface/decl.c

[Ada] Fix ICE on twin pair of dynamically-sized arrays

2011-03-23 Thread Eric Botcazou
The ICE occurs during RTL expansion but the problem is an incorrect sharing of a tree node between two types. Classical issue with dynamically-sized types. Tested on i586-suse-linux, applied on the mainline. 2011-03-23 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Cre

Re: [doc patch] fix PRs 48179, 48221 and 48234

2011-03-23 Thread Richard Guenther
On Tue, Mar 22, 2011 at 11:28 PM, Jonathan Wakely wrote: > This fixes three bugs reported against the docs generated from the 4.6.0 RC. > > 48179 and 48234 are caused by a @section appearing in a different > order compared to the order they apepar in the @menu, so the order of > sections in the TO

Re: [PATCH 1/4] Remove cgraph_node function and fixup all callers

2011-03-23 Thread Jan Hubicka
> 2011-03-18 Martin Jambor > > * cgraph.h (cgraph_node): Remove function declaration. > (cgraph_create_node): Declare. > (cgraph_get_create_node): Likewise. > (cgraph_do_get_node): New function. > > * cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1.

Re: [testsuite, build] Convert boehm-gc testsuite to DejaGnu (PR boehm-gc/11412)

2011-03-23 Thread Rainer Orth
Hi Paolo, > On Mon, Mar 21, 2011 at 19:27, Mike Stump wrote: >> On Mar 21, 2011, at 5:59 AM, Rainer Orth wrote: >>> I've applied those changes, and also managed to fix the problems I had >>> in Tru64 UNIX testing.  Here's the patch I'd like to commit to 4.7. >> >>> +# Build shared library from LI

  1   2   >