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]

Re: C compile time


> As I described in the other mail, we can do the inlining decisions first
> and the do the top-down inlining based on these.  It is possible to get
> upper estimate of function body after the inlining, on the other hand we
> can probably do significantly better if we were doing inlining
> step-by-step and optimizing the intermediate results so we have better
> idea about how far the inlined version simplify.

Yes, deciding when to do that is one of the tricky bits.
 
> In unit-at-a-time I already do have analysis to recognize these cases.
> How hard would be to make current tree-inline.c to not do the copy and
> modify trees in place instead?

I'm not sure.  

In theory what you suggest is possible, but it might be pretty tricky.  

(You'd have to walk the whole tree and fix up any DECL_CONTEXT entries;
I'm not sure what else might or might not need to change.)

If eliminated SAVE_EXPR in favor of real variables everywhere, this
might be easier.  In other words, doing this in GIMPLE might be easier. 
But, unfortunately, you may want to inline before that point...

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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