Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #240

Re: optimizing

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end
From torbenm@diku.dk (Torben Ægidius Mogensen)
Newsgroups comp.compilers
Subject Re: optimizing
Date Mon, 15 Aug 2011 09:39:47 +0200
Organization SunSITE.dk - Supporting Open source
Lines 26
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <11-08-023@comp.compilers> (permalink)
References <11-08-015@comp.compilers>
NNTP-Posting-Host news.iecc.com
X-Trace gal.iecc.com 1313422589 37742 64.57.183.58 (15 Aug 2011 15:36:29 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Mon, 15 Aug 2011 15:36:29 +0000 (UTC)
Keywords optimize
Posted-Date 15 Aug 2011 11:36:29 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref x330-a1.tempe.blueboxinc.net comp.compilers:240

Show key headers only | View raw


glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:

> A recent post to comp.lang.fortran on optimization reminded me of
> something I thought about some time ago.  Someone was wondering if any
> optimization was done at link time.  In the case of Fortran, the
> answer is usually no.
>
> It seems to me, though, that in the case of RISC, and even more in the
> case of VLIW processors like Itanium, delaying the final optimization
> and code generation pass would be useful.

A variant of this is whole-program compilation: Each module is,
individually, just type-checked and, perhaps, simplified somewhat
(expanding macros and syntactic sugar), but the real code generation
does not happen until you combine the modules into a single
executable.  This allows, for example, inlining across modules and
program-wide dataflow analysys (which can give much better results
for, e.g, alias analysis).

The downside is, of course, much longer compilation times.  But if you
have a sufficiently strong type system, many bugs will be caught
already when you compile individual modules, so you don't compile the
whole program as often.  This is why this approach is more common for
strongly-typed functional languages than for C-like languages.

	Torben

Back to comp.compilers | Previous | NextPrevious in thread | Find similar


Thread

optimizing glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-08-12 04:05 +0000
  Re: optimizing anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-08-13 12:38 +0000
  Re: optimizing Hans Aberg <haberg-news@telia.com> - 2011-08-13 18:12 +0200
    Re: optimizing Volker Birk <bumens@dingens.org> - 2011-08-15 13:16 +0000
      Re: optimizing Hans Aberg <haberg-news@telia.com> - 2011-08-15 18:55 +0200
  Re: optimizing Walter Banks <walter@bytecraft.com> - 2011-08-14 06:29 -0400
    Re: optimizing glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-08-15 18:03 +0000
  Re: optimizing torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-08-15 09:39 +0200

csiph-web