9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: forsyth@caldo.demon.co.uk
To: 9fans@cse.psu.edu
Subject: Re: [9fans] splitting the compiler
Date: Thu, 28 Feb 2002 09:04:57 +0000	[thread overview]
Message-ID: <20020228090725.EBBF519AB8@mail.cse.psu.edu> (raw)

>>We can make the first and the second not exclusive by having -O flags
>>so while developing (you want fast compiling and no new bugs generated
>>by the compiler) you don't use 2.  The issue here is the 3rd
>>constraint.  If you add a complex optimizer the code is less portable.

many (i'd have said nearly all) of the worthwhile fancier global optimisations are
perfectly portable, however much code they take to implement.   indeed, it's often
much easier to do them in a high-level intermediate representation
than a low-level machine-oriented one because there is much more context available.
arguably, some of the fancier optimisations are often compensating for
the low level of the programming language, and it's sometimes much
better to address that directly.   (very high-level languages can pose their
own different problems for compilation, of course.)

furthermore, the least buggy optimising compilers i've used
have had most of the optimiser on by default.  it's the rarely-invoked
things that tend to introduce bugs (in my experience, and that
of Linux, i've observed, with gcc).

as someone observed, for system implementation languages like C--and
come to think of it, it was even true of less system-y FORTRAN and Pascal, certainly
Ada--what the language definition actually guarantees is often a
significant subset of what programmers simply assume they can rely
upon.  readable language definitions that spell out these points
clearly would help, but that often conflicts with the desire for
(notional) precision or flexibility in implementation.  by contrast
with many users of a language, most compiler writers tend to know the
definition fairly well, except perhaps for enormous langauges,
but authors of compilers that are intended to
offer big code improvements (for particular classes of programs) are
even more like shyster lawyers with an eye for the fine print.



             reply	other threads:[~2002-02-28  9:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-28  9:04 forsyth [this message]
2002-02-28  9:42 ` Matt H
  -- strict thread matches above, loose matches on Subject: below --
2002-02-28 17:21 forsyth
2002-02-27 15:32 paurea
2002-02-28 10:13 ` Thomas Bushnell, BSG
2002-02-28 16:02   ` ozan s yigit
2002-02-28 16:53     ` Thomas Bushnell, BSG
2002-03-04 10:03       ` ozan s. yigit
2002-03-04 17:04         ` Thomas Bushnell, BSG

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020228090725.EBBF519AB8@mail.cse.psu.edu \
    --to=forsyth@caldo.demon.co.uk \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).