Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-09-06 Thread Jeff Law
On 09/06/2016 04:14 PM, Segher Boessenkool wrote: On Tue, Sep 06, 2016 at 03:24:24PM -0600, Jeff Law wrote: On 08/31/2016 01:08 AM, Eric Botcazou wrote: DSE should really detect this is happening and not do the wrong thing. Maybe add an assert somewhere? Much easier to debug, that way. That

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-09-06 Thread Segher Boessenkool
On Tue, Sep 06, 2016 at 03:24:24PM -0600, Jeff Law wrote: > On 08/31/2016 01:08 AM, Eric Botcazou wrote: > >>DSE should really detect this is happening and not do the wrong thing. > >>Maybe add an assert somewhere? Much easier to debug, that way. > > > >That sounds fragile, functions are allowed t

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-09-06 Thread Jeff Law
On 08/31/2016 01:08 AM, Eric Botcazou wrote: DSE should really detect this is happening and not do the wrong thing. Maybe add an assert somewhere? Much easier to debug, that way. That sounds fragile, functions are allowed to fiddle with the frame pointer in the prologue or epilogue (but of cou

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-31 Thread Bill Schmidt
> On Aug 31, 2016, at 9:00 AM, Bill Schmidt wrote: > > > On 8/31/16 1:19 AM, Segher Boessenkool wrote: >>> >> If (say) base=r1 offset=r0 this will now adjust r1? That cannot be good. > Mm, yeah, that wasn't well-thought. Was thinking 0, not r0. Will have > to avoid > that. Unfortunately th

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-31 Thread Bill Schmidt
> On Aug 31, 2016, at 10:31 AM, Eric Botcazou wrote: > >> I'm not sure I'm the right person to do that, as I don't really have any >> familiarity with the DSE code. I can't even prove to myself that this code >> is alloca-safe; it doesn't look like it. > > No FUD, please ;-) The code is alloc

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-31 Thread Eric Botcazou
> I'm not sure I'm the right person to do that, as I don't really have any > familiarity with the DSE code. I can't even prove to myself that this code > is alloca-safe; it doesn't look like it. No FUD, please ;-) The code is alloca-safe, alloca is about moving the stack pointer, not the frame

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-31 Thread Bill Schmidt
On 8/31/16 1:19 AM, Segher Boessenkool wrote: > Hi Bill, > > On Tue, Aug 30, 2016 at 08:23:46PM -0500, Bill Schmidt wrote: >> The ada bootstrap failure reported in >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72827 >> occurs because of a latent bug in the powerpc back end. The immediate cause

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-31 Thread Segher Boessenkool
On Wed, Aug 31, 2016 at 09:08:37AM +0200, Eric Botcazou wrote: > > DSE should really detect this is happening and not do the wrong thing. > > Maybe add an assert somewhere? Much easier to debug, that way. > > That sounds fragile, functions are allowed to fiddle with the frame pointer > in > the

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-31 Thread Eric Botcazou
> DSE should really detect this is happening and not do the wrong thing. > Maybe add an assert somewhere? Much easier to debug, that way. That sounds fragile, functions are allowed to fiddle with the frame pointer in the prologue or epilogue (but of course not in the body). I think that DSE is

Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-30 Thread Segher Boessenkool
Hi Bill, On Tue, Aug 30, 2016 at 08:23:46PM -0500, Bill Schmidt wrote: > The ada bootstrap failure reported in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72827 > occurs because of a latent bug in the powerpc back end. The immediate cause > is dead store > elimination removing two stores rel

[PATCH, rs6000] Fix PR72827 (ada bootstrap failure)

2016-08-30 Thread Bill Schmidt
Hi, The ada bootstrap failure reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72827 occurs because of a latent bug in the powerpc back end. The immediate cause is dead store elimination removing two stores relative to the frame pointer that are not dead; however, DSE is tricked into d