Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-02 Thread Richard Guenther
On Fri, 2 Dec 2011, Jan Hubicka wrote: > > > > Sure, but then you can still have the issue of an inconsistency. > > Thus, would you then remove the remaining asserts? > > > > I believe in the end the proper fix is to _not_ throw away > > cgraph edges all the time, but keep them up-to-date and th

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Jan Hubicka
Sure, but then you can still have the issue of an inconsistency. Thus, would you then remove the remaining asserts? I believe in the end the proper fix is to _not_ throw away cgraph edges all the time, but keep them up-to-date and thus make the stmt flag not necessary. (we can define "up-to-dat

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Richard Guenther
On Thu, 1 Dec 2011, Diego Novillo wrote: > On Thu, Dec 1, 2011 at 09:04, Richard Guenther wrote: > > > The above looks ok to me, but I don't want the > > gimple_call_set_cannot_inline change (if it is in the tree - I have > > not yet recovered from three weeks of vacation).  The edge attribute >

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Diego Novillo
On Thu, Dec 1, 2011 at 09:04, Richard Guenther wrote: > The above looks ok to me, but I don't want the > gimple_call_set_cannot_inline change (if it is in the tree - I have > not yet recovered from three weeks of vacation).  The edge attribute > is "recomputed" when necessary. The original patch

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Richard Guenther
On Thu, 1 Dec 2011, Diego Novillo wrote: > On Thu, Dec 1, 2011 at 07:08, Richard Guenther wrote: > > Sure, but then you can still have the issue of an inconsistency. > > Not if we make the edge attribute secondary to the statement > attribute. Given that can_inline_edge_p() is the *only* tester

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Diego Novillo
On Thu, Dec 1, 2011 at 07:08, Richard Guenther wrote: > Sure, but then you can still have the issue of an inconsistency. Not if we make the edge attribute secondary to the statement attribute. Given that can_inline_edge_p() is the *only* tester for this attribute, what I was thinking was to chan

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Richard Guenther
On Thu, 1 Dec 2011, Diego Novillo wrote: > On Thu, Dec 1, 2011 at 05:59, Richard Guenther wrote: > > On Tue, 29 Nov 2011, Diego Novillo wrote: > > > >> On Tue, Nov 29, 2011 at 12:49, H.J. Lu wrote: > >> > >> > This caused: > >> > > >> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346 > >> > >>

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Diego Novillo
On Thu, Dec 1, 2011 at 05:59, Richard Guenther wrote: > On Tue, 29 Nov 2011, Diego Novillo wrote: > >> On Tue, Nov 29, 2011 at 12:49, H.J. Lu wrote: >> >> > This caused: >> > >> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346 >> >> Thanks.  I'm on it. > > The patch was wrong, please revert it

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Richard Guenther
On Tue, 29 Nov 2011, Diego Novillo wrote: > On Tue, Nov 29, 2011 at 12:49, H.J. Lu wrote: > > > This caused: > > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346 > > Thanks. I'm on it. The patch was wrong, please revert it. At the gimple stmt modification level we shouldn't modify the c

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Richard Guenther
On Tue, 29 Nov 2011, Diego Novillo wrote: > Iain, could you let me know if the attached patch fixes your problem? > The patch changes gimple_call_set_cannot_inline to update the > corresponding callgraph edge, if needed. I did not touch any of the > other calls, because sometimes we are calling t

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-12-01 Thread Richard Guenther
On Wed, 23 Nov 2011, Diego Novillo wrote: > On Sat, Nov 5, 2011 at 07:02, Iain Sandoe > wrote: > > > > On 28 Oct 2011, at 13:57, Richard Guenther wrote: > > > >> > >> We fail to keep the cannot-inline flag up-to-date when turning > >> indirect to direct calls.  The following patch arranges to do

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-29 Thread Diego Novillo
On Tue, Nov 29, 2011 at 12:49, H.J. Lu wrote: > This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346 Thanks. I'm on it. Diego.

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-29 Thread H.J. Lu
On Tue, Nov 29, 2011 at 5:44 AM, Diego Novillo wrote: > Iain, could you let me know if the attached patch fixes your problem? > The patch changes gimple_call_set_cannot_inline to update the > corresponding callgraph edge, if needed.  I did not touch any of the > other calls, because sometimes we a

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-29 Thread Diego Novillo
On Tue, Nov 29, 2011 at 08:50, Iain Sandoe wrote: > > On 29 Nov 2011, at 13:44, Diego Novillo wrote: > >> Iain, could you let me know if the attached patch fixes your problem? > > apologies for not responding to the last message - > - Richi has already resolved the Ada issue as far as it affected

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-29 Thread Iain Sandoe
On 29 Nov 2011, at 13:44, Diego Novillo wrote: Iain, could you let me know if the attached patch fixes your problem? apologies for not responding to the last message - - Richi has already resolved the Ada issue as far as it affected x86-64/darwin. I assumed your message was addressed more

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-29 Thread Diego Novillo
Iain, could you let me know if the attached patch fixes your problem? The patch changes gimple_call_set_cannot_inline to update the corresponding callgraph edge, if needed. I did not touch any of the other calls, because sometimes we are calling this function in IPA mode, and so we don't know what

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-23 Thread Diego Novillo
On Sat, Nov 5, 2011 at 07:02, Iain Sandoe wrote: > > On 28 Oct 2011, at 13:57, Richard Guenther wrote: > >> >> We fail to keep the cannot-inline flag up-to-date when turning >> indirect to direct calls.  The following patch arranges to do >> this during statement folding (which should always be ca

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-11-05 Thread Iain Sandoe
On 28 Oct 2011, at 13:57, Richard Guenther wrote: We fail to keep the cannot-inline flag up-to-date when turning indirect to direct calls. The following patch arranges to do this during statement folding (which should always be called when that happens). It also makes sure to copy the update

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-10-30 Thread Richard Guenther
On Sat, Oct 29, 2011 at 2:36 AM, Maxim Kuvyrkov wrote: > On 29/10/2011, at 1:57 AM, Richard Guenther wrote: > >> >> We fail to keep the cannot-inline flag up-to-date when turning >> indirect to direct calls.  The following patch arranges to do >> this during statement folding (which should always

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-10-28 Thread Maxim Kuvyrkov
On 29/10/2011, at 1:57 AM, Richard Guenther wrote: > > We fail to keep the cannot-inline flag up-to-date when turning > indirect to direct calls. The following patch arranges to do > this during statement folding (which should always be called > when that happens). It also makes sure to copy th