caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: Markus Mottl <markus@oefai.at>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] native code optimization priorities
Date: Thu, 8 Nov 2001 10:45:44 +0100	[thread overview]
Message-ID: <20011108104544.B9260@pauillac.inria.fr> (raw)
In-Reply-To: <20011106154533.D27723@chopin.ai.univie.ac.at>; from markus@oefai.at on Tue, Nov 06, 2001 at 03:45:33PM +0100

> Just out of curiosity: what do you as a compiler developer dislike
> about the IA64-architecture so much that you said "heavens forbid"? Not
> that I have any opinion on this - it's only interesting to learn about
> shortcomings of the new architecture. Do you think its features are not
> useful for getting even more efficient code out of ocamlopt? Is it just
> too complicated a design?

This is getting off-topic for this list, but briefly: the IA64
architecture is baroque.  It is very complex, provides lots of dubious
features (register windows, hardware support for software pipelining,
several kinds of load-store speculation), yet lacks some very basic
things (such as indirect addressing with immediate displacement).  We
are very far from the elegance and minimality of classic RISCs such as
the Alpha.  All these fancy features seem targeted to high-performance
Fortran; it is unclear how to exploit them for C, let alone for Caml.

Moreover, it relies on the compiler to make instruction parallelism
explicit.  I believe this is a bad idea compared with what everyone
else is doing these days, i.e. discovers instruction parallelism at
run-time, in the chip (out-of-order execution).

Finally, the first silicon implementation (Itanium) is very late, very
expensive, and slower than a $150 Pentium or Athlon for integer code
(floating-point performance is excellent, though).  Future
implementation will probably be better, but still this might indicate
something wrong in the design of the architecture.

As for using the IA64 features in ocamlopt-generated code, it might be
possible to make good use of predication (conditional instructions)
for short conditional sequences, and of load speculation (exploiting
the fact that a load from an immutable OCaml block cannot interfere
with any store).  However, both features need new optimization passes
that include quite sophisticated heuristics (neither predication nor
load speculation are always a win, both can also swamp processor
resources with useless instructions).

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-11-08  9:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-31  3:08 Chris Hecker
2001-10-31  7:50 ` Fabrice Le Fessant
2001-11-06 14:20   ` [Caml-list] compiler patches in the CDK Xavier Leroy
2001-11-06 13:49     ` Fabrice Le Fessant
2001-11-06 14:06 ` [Caml-list] native code optimization priorities Xavier Leroy
     [not found]   ` <20011106154533.D27723@chopin.ai.univie.ac.at>
2001-11-08  9:45     ` Xavier Leroy [this message]
     [not found]   ` <Pine.SOL.4.20.0111061141330.10389-100000@godzilla.ics.uci.edu>
2001-11-08  9:59     ` Xavier Leroy

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=20011108104544.B9260@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=markus@oefai.at \
    /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).