Re: [gimplefe] hacking pass manager

2016-07-29 Thread Prasad Ghangal
Thanks, Prasad On 29 July 2016 at 06:56, Prathamesh Kulkarni wrote: > On 29 July 2016 at 00:01, Prasad Ghangal wrote: >> On 27 July 2016 at 14:22, Richard Biener wrote: >>> On Tue, Jul 26, 2016 at 11:38 PM, Prathamesh Kulkarni >>> wrote: On 27 July 2016 at 00:20, Prasad Ghangal wrote: >

Re: [gimplefe] hacking pass manager

2016-07-29 Thread Richard Biener
On Fri, Jul 29, 2016 at 9:03 AM, Prasad Ghangal wrote: > Thanks, > Prasad > > > On 29 July 2016 at 06:56, Prathamesh Kulkarni > wrote: >> On 29 July 2016 at 00:01, Prasad Ghangal wrote: >>> On 27 July 2016 at 14:22, Richard Biener wrote: On Tue, Jul 26, 2016 at 11:38 PM, Prathamesh Kulkarn

Re: Need help with PR71976 combine.c::get_last_value returns a wrong result

2016-07-29 Thread Segher Boessenkool
Hi Johann, I tested a variant of your patch, building Linux for 32 different (sub-)architectures; surprisingly (to me) there are no regressions at all. Do you want to send it to gcc-patches? Segher diff --git a/gcc/combine.c b/gcc/combine.c index 77e0d2b..750bf83 100644 --- a/gcc/combine.c ++

Question about Cortex bit-banding feature

2016-07-29 Thread Fredrik Hederstierna
Some processor architectures do support bitwise access to memory, eg. ARM Cortex-M and 8051 (by ARM called bit-banding). In these architectures a single bit can somewhat be addressable, but only as an 'aliased' memory region for another memory address. I noticed that Keil ARMCC compiler now seem

Re: Need help with PR71976 combine.c::get_last_value returns a wrong result

2016-07-29 Thread Georg-Johann Lay
On 29.07.2016 09:47, Segher Boessenkool wrote: Hi Johann, I tested a variant of your patch, building Linux for 32 different (sub-)architectures; surprisingly (to me) there are no regressions at all. I am not so surprised because most backends don't make such an intense use of hard-regs like t

Re: [gimplefe] hacking pass manager

2016-07-29 Thread Prasad Ghangal
Thanks, Prasad On 29 July 2016 at 12:55, Richard Biener wrote: > On Fri, Jul 29, 2016 at 9:03 AM, Prasad Ghangal > wrote: >> Thanks, >> Prasad >> >> >> On 29 July 2016 at 06:56, Prathamesh Kulkarni >> wrote: >>> On 29 July 2016 at 00:01, Prasad Ghangal wrote: On 27 July 2016 at 14:22, Ri

Re: Question about Cortex bit-banding feature

2016-07-29 Thread David Brown
On 29/07/16 10:25, Fredrik Hederstierna wrote: > Some processor architectures do support bitwise access to memory, eg. ARM > Cortex-M and 8051 (by ARM called bit-banding). > In these architectures a single bit can somewhat be addressable, but only as > an 'aliased' memory region for another memo

Re: Need help with PR71976 combine.c::get_last_value returns a wrong result

2016-07-29 Thread Segher Boessenkool
On Fri, Jul 29, 2016 at 11:05:13AM +0200, Georg-Johann Lay wrote: > There might still problems linger around if hard-regs are used: > > Suppose we set the reg in DImode and then get_last_value is called for the > same reg in SImode. Using the DI value might be wrong, e.g. if it is used > to com

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Aldy Hernandez
On 07/25/2016 06:30 PM, Manuel López-Ibáñez wrote: On 25/07/16 21:16, Joseph Myers wrote: On Mon, 25 Jul 2016, Jeff Law wrote: I'll pre-approve removing those bits. Alternately, you could look to resync with glibc, though that could prove painful after 15 years of divergence. The current gl

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Aldy Hernandez
On 07/29/2016 07:30 AM, Aldy Hernandez wrote: On 07/25/2016 06:30 PM, Manuel López-Ibáñez wrote: On 25/07/16 21:16, Joseph Myers wrote: On Mon, 25 Jul 2016, Jeff Law wrote: I'll pre-approve removing those bits. Alternately, you could look to resync with glibc, though that could prove painful

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Joseph Myers
On Fri, 29 Jul 2016, Aldy Hernandez wrote: > BTW, does this libiberty replacement project also fix binutils and gdb, or > will these other libiberty users require independent patches for their > respective projects? GDB is already making extensive use of gnulib (I don't know to what extent it st

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Jeff Law
On 07/29/2016 05:30 AM, Aldy Hernandez wrote: On 07/25/2016 06:30 PM, Manuel López-Ibáñez wrote: On 25/07/16 21:16, Joseph Myers wrote: On Mon, 25 Jul 2016, Jeff Law wrote: I'll pre-approve removing those bits. Alternately, you could look to resync with glibc, though that could prove painful

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Jeff Law
On 07/29/2016 05:34 AM, Aldy Hernandez wrote: On 07/29/2016 07:30 AM, Aldy Hernandez wrote: On 07/25/2016 06:30 PM, Manuel López-Ibáñez wrote: On 25/07/16 21:16, Joseph Myers wrote: On Mon, 25 Jul 2016, Jeff Law wrote: I'll pre-approve removing those bits. Alternately, you could look to res

Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)

2016-07-29 Thread Warren D Smith
> Booleans are very useful - they turn up all over the place in programming. > > Nibbles, on the other hand, are almost totally useless. There are very, > very few situations where you need to store a number that is within the > range 0 .. 15, and are so tightly constrained for space that you can'

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Manuel López-Ibáñez
On 29 July 2016 at 16:25, Jeff Law wrote: >> Well, if libiberty is going to be replaced en masse by gnulib, then >> there's no sense in me cleaning up libiberty's regex. libiberty cannot be replaced completely, because there are bits that do not even exist in gnulib. And given the time frame, I d

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread Joseph Myers
On Fri, 29 Jul 2016, Manuel López-Ibáñez wrote: > On 29 July 2016 at 16:25, Jeff Law wrote: > >> Well, if libiberty is going to be replaced en masse by gnulib, then > >> there's no sense in me cleaning up libiberty's regex. > > libiberty cannot be replaced completely, because there are bits that

Re: [libiberty] does anyone use regex.c with REGEX_MALLOC?

2016-07-29 Thread David Edelsohn
On Fri, Jul 29, 2016 at 1:44 PM, Joseph Myers wrote: > On Fri, 29 Jul 2016, Manuel López-Ibáñez wrote: > >> On 29 July 2016 at 16:25, Jeff Law wrote: >> >> Well, if libiberty is going to be replaced en masse by gnulib, then >> >> there's no sense in me cleaning up libiberty's regex. >> >> libiber

Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)

2016-07-29 Thread Jonathan Wakely
Let's imagine we have a 4-bit type, called nibble. sizeof(nibble) == 1, because you can't have an object with a smaller size. nibble a[2]; sizeof(a) == 1; Because otherwise there isn't much benefit. So now we have a type which violates one of the core rules of the type system. sizeof(nibble[2 *

Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)

2016-07-29 Thread Warren D Smith
On 7/29/16, Jonathan Wakely wrote: > Let's imagine we have a 4-bit type, called nibble. > > sizeof(nibble) == 1, because you can't have an object with a smaller size. > > nibble a[2]; > sizeof(a) == 1; > > Because otherwise there isn't much benefit. --bitsizeof() is required. > So now we have a

Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)

2016-07-29 Thread Warren D Smith
> Given a pointer to an array of nibbles and a length, how do I iterate > through the array? for(i=0; ihttp://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)

Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)

2016-07-29 Thread Jonathan Wakely
On 29 July 2016 at 20:01, Warren D Smith wrote: >> Given a pointer to an array of nibbles and a length, how do I iterate >> through the array? > > for(i=0; i > --correction, that was for an array of packed bools. For nybbles, > bitsizeof(a)/4. There are various games one can play, and quibbles one