Re: [i386] Scalar DImode instructions on XMM registers

2015-05-20 Thread Vladimir Makarov
On 20/05/15 04:17 AM, Ilya Enkovich wrote: On 19 May 11:22, Vladimir Makarov wrote: On 05/18/2015 08:13 AM, Ilya Enkovich wrote: 2015-05-06 17:18 GMT+03:00 Ilya Enkovich : Hi Vladimir, Could you please comment on this? Ilya, I think that the idea is worth to try but results might be mixed

gcc-4.9-20150520 is now available

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

Re: optimization question

2015-05-20 Thread Martin Uecker
mark maule : > On 5/20/2015 3:27 AM, Richard Biener wrote: > > On Mon, May 18, 2015 at 10:01 PM, mark maule wrote: > > The usual issue with this kind of behavior is out-of-bound accesses of > > arrays in a loop > > or invoking undefined behavior when signed integer operations wrap. > > > > > >

Re: [c++std-parallel-1632] Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 04:54:51PM +0100, Andrew Haley wrote: > On 05/20/2015 04:46 PM, Will Deacon wrote: > > I'm not sure... you'd require the compiler to perform static analysis of > > loops to determine the state of the machine when they exit (if they exit!) > > in order to show whether or not

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 04:46:17PM +0100, Will Deacon wrote: > On Wed, May 20, 2015 at 01:15:22PM +0100, Paul E. McKenney wrote: > > On Wed, May 20, 2015 at 12:47:45PM +0100, Will Deacon wrote: > > > On Wed, May 20, 2015 at 03:41:48AM +0100, Paul E. McKenney wrote: > > > > If a pointer is p

Re: Is there a way to adjust alignment of DImode and DFmode?

2015-05-20 Thread Paul_Koning
> On May 20, 2015, at 1:22 PM, Jakub Jelinek wrote: > > On Wed, May 20, 2015 at 05:19:28PM +, paul_kon...@dell.com wrote: >> >>> On May 20, 2015, at 1:00 PM, H.J. Lu wrote: >>> >>> By default, alignment of DImode and DFmode is set to 8 bytes. >> >> When did that change? I know it was 4

Re: Is there a way to adjust alignment of DImode and DFmode?

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 05:19:28PM +, paul_kon...@dell.com wrote: > > > On May 20, 2015, at 1:00 PM, H.J. Lu wrote: > > > > By default, alignment of DImode and DFmode is set to 8 bytes. > > When did that change? I know it was 4 in the past, unless you specifically > passed a compile switc

Re: Is there a way to adjust alignment of DImode and DFmode?

2015-05-20 Thread Paul_Koning
> On May 20, 2015, at 1:00 PM, H.J. Lu wrote: > > By default, alignment of DImode and DFmode is set to 8 bytes. When did that change? I know it was 4 in the past, unless you specifically passed a compile switch to make it 8. paul

Is there a way to adjust alignment of DImode and DFmode?

2015-05-20 Thread H.J. Lu
By default, alignment of DImode and DFmode is set to 8 bytes. Intel MCU psABI specifies alignment of DImode and DFmode to be 4 bytes. I'd like to make get_mode_alignment to return 32 bits for DImode and DFmode. Is there a way to adjust alignment of DImode and DFmode via ADJUST_ALIGNMENT? -- H.J

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Andrew Haley
On 05/20/2015 04:46 PM, Will Deacon wrote: > I'm not sure... you'd require the compiler to perform static analysis of > loops to determine the state of the machine when they exit (if they exit!) > in order to show whether or not a dependency is carried to subsequent > operations. If it can't prove

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Will Deacon
On Wed, May 20, 2015 at 01:15:22PM +0100, Paul E. McKenney wrote: > On Wed, May 20, 2015 at 12:47:45PM +0100, Will Deacon wrote: > > On Wed, May 20, 2015 at 03:41:48AM +0100, Paul E. McKenney wrote: > > > If a pointer is part of a dependency chain, and if the values > > > added to or subtracted

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread David Howells
Paul E. McKenney wrote: > Ah, I was assuming between x and z. David, what was your intent? ;-) Clarification. David

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 03:15:48PM +0100, Ramana Radhakrishnan wrote: > > > On 20/05/15 15:03, Paul E. McKenney wrote: > >On Wed, May 20, 2015 at 02:44:30PM +0100, Ramana Radhakrishnan wrote: > >> > >> > >>On 20/05/15 14:37, David Howells wrote: > >>>Paul E. McKenney wrote: > >>> > I was thi

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Ramana Radhakrishnan
On 20/05/15 15:03, Paul E. McKenney wrote: On Wed, May 20, 2015 at 02:44:30PM +0100, Ramana Radhakrishnan wrote: On 20/05/15 14:37, David Howells wrote: Paul E. McKenney wrote: I was thinking of "y" as a simple variable, but if it is something more complex, then the compiler could do thi

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 02:44:30PM +0100, Ramana Radhakrishnan wrote: > > > On 20/05/15 14:37, David Howells wrote: > >Paul E. McKenney wrote: > > > >>I was thinking of "y" as a simple variable, but if it is something more > >>complex, then the compiler could do this, right? > >> > >>char *x

Re: [c++std-parallel-1624] Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 02:37:05PM +0100, David Howells wrote: > Paul E. McKenney wrote: > > > I was thinking of "y" as a simple variable, but if it is something more > > complex, then the compiler could do this, right? > > > > char *x; > > > > y; > > x = z; > > Yeah. I presume it

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Ramana Radhakrishnan
On 20/05/15 14:37, David Howells wrote: Paul E. McKenney wrote: I was thinking of "y" as a simple variable, but if it is something more complex, then the compiler could do this, right? char *x; y; x = z; Yeah. I presume it has to maintain the ordering, though.

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread David Howells
Paul E. McKenney wrote: > I was thinking of "y" as a simple variable, but if it is something more > complex, then the compiler could do this, right? > > char *x; > > y; > x = z; Yeah. I presume it has to maintain the ordering, though. David

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 02:18:37PM +0100, David Howells wrote: > Paul E. McKenney wrote: > > > > Additionally, what about the following code? > > > > > > char *x = y ? z : z; > > > > > > Does that extend a dependency chain from z to x? If so, I can imagine a > > > CPU breaking that in practic

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread David Howells
Paul E. McKenney wrote: > > Additionally, what about the following code? > > > > char *x = y ? z : z; > > > > Does that extend a dependency chain from z to x? If so, I can imagine a > > CPU breaking that in practice. > > I am not seeing this. I would expect the compiler to optimize to > som

Re: optimization question

2015-05-20 Thread Andrew Haley
On 05/20/2015 01:04 PM, mark maule wrote: > Is this one of those areas where if > there's a bug in the code all bets are off and your mileage may vary? Yes. Do not access beyond the end of an array: daemons may fly out of your nose. [1] Andrew. [1] https://groups.google.com/forum/?hl=en#!msg/

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 12:47:45PM +0100, Will Deacon wrote: > Hi Paul, > > On Wed, May 20, 2015 at 03:41:48AM +0100, Paul E. McKenney wrote: > > On Tue, May 19, 2015 at 07:10:12PM -0700, Linus Torvalds wrote: > > > On Tue, May 19, 2015 at 6:57 PM, Linus Torvalds > > > wrote: > > > So I think you

Re: optimization question

2015-05-20 Thread mark maule
On 5/20/2015 3:27 AM, Richard Biener wrote: On Mon, May 18, 2015 at 10:01 PM, mark maule wrote: I have a loop which hangs when compiled with -O2, but runs fine when compiled with -O1. Not sure what information is required to get an answer, so starting with the full src code. I have not atte

Re: [c++std-parallel-1614] Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 11:03:00AM +0200, Richard Biener wrote: > On Wed, May 20, 2015 at 9:34 AM, Jens Maurer wrote: > > On 05/20/2015 04:34 AM, Paul E. McKenney wrote: > >> On Tue, May 19, 2015 at 06:57:02PM -0700, Linus Torvalds wrote: > > > >>> - the "you can add/subtract integral values" sti

Re: [c++std-parallel-1616] Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Paul E. McKenney
On Wed, May 20, 2015 at 09:34:10AM +0200, Jens Maurer wrote: > On 05/20/2015 04:34 AM, Paul E. McKenney wrote: > > On Tue, May 19, 2015 at 06:57:02PM -0700, Linus Torvalds wrote: > > >> - the "you can add/subtract integral values" still opens you up to > >> language lawyers claiming "(char *)ptr

Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Will Deacon
Hi Paul, On Wed, May 20, 2015 at 03:41:48AM +0100, Paul E. McKenney wrote: > On Tue, May 19, 2015 at 07:10:12PM -0700, Linus Torvalds wrote: > > On Tue, May 19, 2015 at 6:57 PM, Linus Torvalds > > wrote: > > So I think you're better off just saying that operations designed to > > drop significant

Re: [c++std-parallel-1614] Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Richard Biener
On Wed, May 20, 2015 at 9:34 AM, Jens Maurer wrote: > On 05/20/2015 04:34 AM, Paul E. McKenney wrote: >> On Tue, May 19, 2015 at 06:57:02PM -0700, Linus Torvalds wrote: > >>> - the "you can add/subtract integral values" still opens you up to >>> language lawyers claiming "(char *)ptr - (intptr_t)

Re: optimization question

2015-05-20 Thread Richard Biener
On Mon, May 18, 2015 at 10:01 PM, mark maule wrote: > I have a loop which hangs when compiled with -O2, but runs fine when > compiled with -O1. Not sure what information is required to get an answer, > so starting with the full src code. I have not attempted to reduce to a > simpler test case ye

Re: [i386] Scalar DImode instructions on XMM registers

2015-05-20 Thread Ilya Enkovich
On 19 May 11:22, Vladimir Makarov wrote: > On 05/18/2015 08:13 AM, Ilya Enkovich wrote: > >2015-05-06 17:18 GMT+03:00 Ilya Enkovich : > >Hi Vladimir, > > > >Could you please comment on this? > > > > > Ilya, I think that the idea is worth to try but results might be > mixed. It is hard to say until

Re: [c++std-parallel-1614] Re: Compilers and RCU readers: Once more unto the breach!

2015-05-20 Thread Jens Maurer
On 05/20/2015 04:34 AM, Paul E. McKenney wrote: > On Tue, May 19, 2015 at 06:57:02PM -0700, Linus Torvalds wrote: >> - the "you can add/subtract integral values" still opens you up to >> language lawyers claiming "(char *)ptr - (intptr_t)ptr" preserving the >> dependency, which it clearly doesn't