This is the mail archive of the gcc-patches@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]

Re: [Patch, fortran] PR40011 - Problems with -fwhole-file


On Fri, 24 Jul 2009, Tobias Burnus wrote:

> Paul Richard Thomas wrote:
> > This patch bootstraps and regtests without -fwhole-file.  When
> > regtested with -fwhole-file it fails on legacy features or wrong code
> > in the tests.  I will eliminate the latter as the next step. I have
> > yet to go through it with a fine toothed comb to be sure that clean up
> > is OK nor have I prepared the ChangeLogs.
> >   
> I think it would be interesting to see how it performs with SPEC and
> with -lto. -- And whether we can break -fwhole-file with any other code ;-)
> 
> > The following fails at any level of optimization [...]
> >   
> As written, I think the behaviour is OK as the local variable is no
> longer available after returning from the procedure. However, it would
> be interesting to know why it fails. Richard, do you understand why the
> condition is no longer optimized away?

I'll have a look.

> > +
> > +  /* Code with static variables must not be inlined.  */
> > +  if (TREE_STATIC (decl) && DECL_CONTEXT (decl))
> > +    DECL_UNINLINABLE(DECL_CONTEXT (decl)) = 1;
> >  }
> >   
> My understanding is that inlining should work in principle. I think one
> can leave it for the beginning, but one should think about this spot.
> (Potential missed optimization.) Richard, do you see a reason why one
> needs to set this?

No.  In fact this check looks bogus to me - it may of course hide
bugs, but that's not a good idea at this stage I think.

Richard.


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