C compile time
Mark Mitchell
mark@codesourcery.com
Thu Jun 19 16:31:00 GMT 2003
> 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
More information about the Gcc
mailing list