public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Destrictiveness of expansion and tree inlining deadlock?
@ 2003-02-22 11:25 Jan Hubicka
  2003-02-24  7:41 ` Mark Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Hubicka @ 2003-02-22 11:25 UTC (permalink / raw)
  To: gcc, mark, aoliva, zack, rth

Hi,
I am looking into the reason why enabling unit-at-a-time for bootstrap
causes failure on some architectures.  Apparently it is because I now
emit functions in topological order, so function that is inline and
global is always fir expanded and later inlined.  Expansion is (to my
understanding) destructive and makes later inlining impossible.

I believe that current code gets it wrong as well as it does:
  /* Generate the RTL for this function.  */
  expand_stmt (DECL_SAVED_TREE (fndecl));
  if (uninlinable)
    {
      /* Allow the body of the function to be garbage
	 collected.  */
      DECL_SAVED_TREE (fndecl) = NULL_TREE;
    }

To my understanding it works better just because inline functions are
deffered so they usually appear after the callers in the sequence.
Still they may be inlined into the inline functions expanded later.

Replacing it with unconditional clear would ineed fix the problem I am
seeing but this breaks always_inline attribute as we would miss inlining
oppurtunities.  Any hint where to go from here?

Honza

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Destrictiveness of expansion and tree inlining deadlock?
  2003-02-22 11:25 Destrictiveness of expansion and tree inlining deadlock? Jan Hubicka
@ 2003-02-24  7:41 ` Mark Mitchell
  2003-02-26 19:24   ` Jan Hubicka
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Mitchell @ 2003-02-24  7:41 UTC (permalink / raw)
  To: Jan Hubicka, gcc, aoliva, zack, rth



--On Saturday, February 22, 2003 11:20:31 AM +0100 Jan Hubicka <jh@suse.cz> 
wrote:

>  Expansion is (to my
> understanding) destructive and makes later inlining impossible.

That should not be the case.  It was the case with the RTL inliner, but it 
should not be the case with the tree inliner.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Destrictiveness of expansion and tree inlining deadlock?
  2003-02-24  7:41 ` Mark Mitchell
@ 2003-02-26 19:24   ` Jan Hubicka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Hubicka @ 2003-02-26 19:24 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: Jan Hubicka, gcc, aoliva, zack, rth

> 
> 
> --On Saturday, February 22, 2003 11:20:31 AM +0100 Jan Hubicka <jh@suse.cz> 
> wrote:
> 
> > Expansion is (to my
> >understanding) destructive and makes later inlining impossible.
> 
> That should not be the case.  It was the case with the RTL inliner, but it 
> should not be the case with the tree inliner.

Hmm, my topological sort in unit-at-a-time manages to assemble most of
inline functions before they are inlined and I am hitting one crash in:
  else if (TREE_CODE (*tp) == UNSAVE_EXPR)
    /* UNSAVE_EXPRs should not be generated until expansion time.  */
    abort ();
This made me believe that expansion creates those trees and thus is
destructive.  In the case this is wrong, what happens here?

Honza
> 
> -- 
> Mark Mitchell                mark@codesourcery.com
> CodeSourcery, LLC            http://www.codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-26 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-22 11:25 Destrictiveness of expansion and tree inlining deadlock? Jan Hubicka
2003-02-24  7:41 ` Mark Mitchell
2003-02-26 19:24   ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).