Re: When to do inline expansion

jgmorris+@cs.cmu.edu (Greg Morrisett)
Tue, 21 Sep 1993 15:36:57 GMT

          From comp.compilers

Related articles
When to do inline expansion jhall@whale.WPI.EDU (1993-09-14)
Re: When to do inline expansion zstern@adobe.com (1993-09-20)
Re: When to do inline expansion salomon@silver.cs.umanitoba.ca (1993-09-20)
Re: When to do inline expansion davidm@questor.rational.com (1993-09-20)
Re: When to do inline expansion jfc@athena.mit.edu (1993-09-21)
Re: When to do inline expansion jgmorris+@cs.cmu.edu (1993-09-21)
Re: When to do inline expansion jdean@bergen.cs.washington.edu (1993-09-21)
Re: When to do inline expansion salomon@silver.cs.umanitoba.ca (1993-09-22)
Re: When to do inline expansion preston@dawn.cs.rice.edu (1993-09-22)
Re: When to do inline expansion cliffc@rice.edu (1993-09-22)
Re: When to do inline expansion rfg@netcom.com (1993-09-25)
Re: When to do inline expansion ssimmons@convex.com (1993-09-27)
| List of all articles for this month |
Newsgroups: comp.compilers
From: jgmorris+@cs.cmu.edu (Greg Morrisett)
Keywords: optimize
Organization: School of Computer Science, Carnegie Mellon
References: 93-09-063 93-09-069
Date: Tue, 21 Sep 1993 15:36:57 GMT

John Clinton Hall writes
> How long should a function be (in number of statements) for it to be a
> reasonable speed optimization to perform inline expansion?


These days, it's not so simple to determine what the win of inlining
will be. For instance, inlining a "small" function a number of times
in a loop can make the loop so large that it doesn't fit in the
instruction cache. (See McFarling's SIGPLAN '91 paper). On the other
hand, inlining a "large" function might allow further optimizations
like constant folding and dead code elimination to occur so that the
"large" function is specialized into a "small" function.


-Greg Morrisett
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.