Iterating over RTL in Graphite

2012-02-16 Thread Arnaldo
Hello everyone, I'm working on an extension to the Graphite pass of GCC 4.4.0. My intention is to associate costs to RTL instructions by adding them as RTX attributes to a machine description file, and to read them back during the Graphite pass by iterating through each basic block. Is the RTL a

gcc-4.5-20120216 is now available

2012-02-16 Thread gccadmin
Snapshot gcc-4.5-20120216 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20120216/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.5 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Tom Tromey
> "rth" == Richard Henderson writes: rth> Oh, of course. GDB is seeing the sequence of CFA's: rth>X foo rth>X-4 __mips16_call_stub_df_0 rth>X caller rth> and it is sanity checking the stack is monotonic. rth> Which seems like a fairly reasonable thing to do... Re

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Richard Henderson
On 02/16/2012 11:30 AM, Richard Sandiford wrote: > Seems to be the same: > > #0 0x00400ae2 in foo() () > #1 0x77d793fc in __mips16_call_stub_df_0 () at ... > Backtrace stopped: previous frame inner to this frame (corrupt stack?) > > (this is a gdb built from 7.4 branch FWIW). Oh, of course. G

Re: symbol_refs vs. eq_attr in define_insn_reservations

2012-02-16 Thread Richard Sandiford
Quentin Neill writes: > Hi, > > For readability (and correctness) I'm interested in rewriting a bunch of: > > (define_insn_reservation "insn1" 0 (eq_attr "attr1" "val1,val2")) > > into something like: > > (define attr "consattr1" "val1,val2" > (const (cond [ > (eq_attr "attr1" "val1"

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Richard Sandiford
Richard Henderson writes: > On 02/16/2012 10:58 AM, Richard Sandiford wrote: >>> As a workaround for 4.7, you can try this hack: >>> >>> .cfi_startproc simple >>> .cfi_def_cfa29, -1 # fake cfa one byte below sp >>> .cfi_register 29, 29 # "save" sp in itself so w

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Richard Henderson
On 02/16/2012 10:58 AM, Richard Sandiford wrote: >> As a workaround for 4.7, you can try this hack: >> >> .cfi_startproc simple >> .cfi_def_cfa29, -1 # fake cfa one byte below sp >> .cfi_register 29, 29 # "save" sp in itself so we don't use >> the fake cfa >>

Re: weird impact of lower-subreg on IRA/reload

2012-02-16 Thread Richard Henderson
On 02/15/2012 09:25 AM, Vladimir Makarov wrote: > IRA deals well with subregs of multi-register pseudos but not with subregs of > one-register pseudos. For the record, since it seems you misunderstood, all of the examples in this case are of the former type not the later. r~

[Announce] New vtable-security branch in GCC repository

2012-02-16 Thread Caroline Tice
Hello, I have just created a new branch, off the google/gcc-4_6-mobile branch, for working on improvements to function pointer and vtable security. The new branch is branches/google-4_6-mobile/vtable-security. I will be maintaining the branch. As features on this branch become mature, I hope to

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Richard Sandiford
Richard Henderson writes: > On 02/15/2012 11:53 AM, Richard Sandiford wrote: >> We then trip: >> >> /* Don't let us unwind past the handler context. */ >> gcc_assert (!match_handler); >> >> in _Unwind_RaiseException_Phase2. What's the right thing to do here? >> > > Ug. The Right

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Richard Henderson
On 02/16/2012 07:40 AM, Andreas Krebbel wrote: > On 02/15/2012 08:53 PM, Richard Sandiford wrote: >> This fixes gdb backtraces from a stripped executable, but libgcc's >> unwinder seems to get confused by having a stub in the middle of the >> trace that (a) isn't a signal handler and (b) has no fra

Re: weird optimization in sin+cos, x86 backend

2012-02-16 Thread Andrew Haley
On 02/16/2012 04:21 PM, Joseph S. Myers wrote: On Thu, 16 Feb 2012, Andrew Haley wrote: On 02/16/2012 02:42 PM, Vincent Lefevre wrote: C99 doesn't require directed rounding modes, but as long as they are claimed to be supported by, they should work: Ah, I see. So, we could bring gcc+glibc

Re: weird optimization in sin+cos, x86 backend

2012-02-16 Thread Joseph S. Myers
On Thu, 16 Feb 2012, Andrew Haley wrote: > On 02/16/2012 02:42 PM, Vincent Lefevre wrote: > > On 2012-02-15 15:18:45 +, Andrew Haley wrote: > > > > On 02/15/2012 09:30 AM, Vincent Lefevre wrote: > > > > > > >> But to be absolutely clear, glibc's libm doesn't have a problem > > > > > > > >>

Re: weird optimization in sin+cos, x86 backend

2012-02-16 Thread Joseph S. Myers
On Thu, 16 Feb 2012, Vincent Lefevre wrote: > Note that functions are not required to honor the rounding > direction mode (F.9#10). So, locally resetting the rounding mode to > nearest in these functions would be correct, I think (I don't know > how this can affect signal handlers, when a signal

Re: Help with cfi markup for MIPS16 hard-float stubs

2012-02-16 Thread Andreas Krebbel
On 02/15/2012 08:53 PM, Richard Sandiford wrote: > This fixes gdb backtraces from a stripped executable, but libgcc's > unwinder seems to get confused by having a stub in the middle of the > trace that (a) isn't a signal handler and (b) has no frame of its own. > The CFA at the point of the call to

Re: weird optimization in sin+cos, x86 backend

2012-02-16 Thread Vincent Lefevre
On 2012-02-16 14:51:26 +, Andrew Haley wrote: > Ah, I see. So, we could bring gcc+glibc into compliance by not > defining the rounding mode macros. Yes, but... Directed rounding modes can also be used with the arithmetic operations only, on which there are no problems at the implementation le

Re: weird optimization in sin+cos, x86 backend

2012-02-16 Thread Andrew Haley
On 02/16/2012 02:42 PM, Vincent Lefevre wrote: On 2012-02-15 15:18:45 +, Andrew Haley wrote: > On 02/15/2012 09:30 AM, Vincent Lefevre wrote: > >> But to be absolutely clear, glibc's libm doesn't have a problem > >> meeting C99, AFAIK. > > That's not quite correct. It is completely

Re: weird optimization in sin+cos, x86 backend

2012-02-16 Thread Vincent Lefevre
On 2012-02-15 15:18:45 +, Andrew Haley wrote: > On 02/15/2012 09:30 AM, Vincent Lefevre wrote: > >> But to be absolutely clear, glibc's libm doesn't have a problem > >> > meeting C99, AFAIK. > > That's not quite correct. It is completely broken in directed > > rounding modes (up to crashes). >

Re: weird impact of lower-subreg on IRA/reload

2012-02-16 Thread Georg-Johann Lay
Vladimir Makarov wrote: > On 02/15/2012 09:21 AM, Georg-Johann Lay wrote: >> This is a question on SUBREGs generated by lower-subreg.c and whether >> register >> allocator is supposed to handle them efficiently. >> >> Suppose the following small function compiled for AVR. >> Remember AVR is 8-bit m

GCC meets Guile at its birthday party

2012-02-16 Thread Ludovic Courtès
Hello, Today is the first anniversary of GNU Guile 2.0 [0]. To celebrate it, several Guile users took on the challenge to come up in one week with a neat hack to showcase Guile integration [1]. So I’m happy to announce that this silly challenge gave birth (among other things) to Guile-GCC, Guile