Re: Inlining functions with loops

ball@Eng.Sun.COM (Mike Ball)
9 Dec 1995 19:37:52 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Re: Inlining functions with loops cdg@nullstone.com (1995-12-01)
Re: Inlining functions with loops jeremy@suede.sw.oz.au (1995-12-01)
Inlining functions with loops dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-12-01)
Re: Inlining functions with loops serrano@ardeche.IRO.UMontreal.CA (1995-12-01)
Re: Inlining functions with loops tore@lis.pitt.edu (1995-12-09)
Re: Inlining functions with loops preston@tera.com (1995-12-09)
Re: Inlining functions with loops ball@Eng.Sun.COM (1995-12-09)
Re: Inlining functions with loops ok@cs.rmit.edu.au (1995-12-09)
Re: Inlining functions with loops jsa@organon.com (1995-12-09)
Re: Inlining functions with loops cdg@nullstone.com (1995-12-17)
| List of all articles for this month |

From: ball@Eng.Sun.COM (Mike Ball)
Newsgroups: comp.compilers
Date: 9 Dec 1995 19:37:52 -0500
Organization: Sun Microsystems Inc.
References: 95-12-013
Keywords: optimize, C++

jeremy@suede.sw.oz.au (Jeremy Fitzhardinge) writes:
> "Michael Rice" <mpr@absoft.com> writes:
> Yes, its probably a representation problem. If you have a strictly
> tree-based IR then it may be quite hard to manage. However, a general
> SSA graph style IR can cope with function inlining quite easily.
> Inlining is simply a matter of connecting up the values passed in with
> the arguments used within the function and then running the normal
> optimisations over the complete graph. This gives you all the real
> wins of inlining (constant propagation, etc).


Actually, for C++ it doesn't unless you do your IR at a high level,
and eliminate copy constructors, corresponding destructors, and
similar high-level constructs.


A lot of the "inlining" that goes on in the backends of compilers misses a
lot of the potential gains from inlining C++ functions.


Just thought I'd throw that monkeywrench in the discussion.


-Mike Ball-
SunSoft Developer Products
--


Post a followup to this message

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