This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Destrictiveness of expansion and tree inlining deadlock?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]