caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Gilles Pirio" <gilles.ocaml@googlemail.com>
To: caml-list@yquem.inria.fr
Subject: Ocaml back-end
Date: Sat, 6 Dec 2008 12:48:27 +0000	[thread overview]
Message-ID: <605bf2750812060448u787862c9xdc2528cb61bc01d7@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

NOTE: sorry for double posting but I've been informed that my initial post
(in google group - I usually read the group from there) would not be
forwarded to the caml list as I naively thought...

---------------

Hi all

I've been busy changing/implementing (new) passes in ocamlopt back-end
for my own target. A collateral of that is that it improves the
generated code for x86 -- ocamlopt is great but isn't exactly an
optimizing compiler :) Simple constant propagation and invariant code
motion sometimes doesn't happen. Below is trivial example -- the if i/
9 >s 201 test may be removed at some stage. I've seen lots of things
like it. This generates inefficient code (on x86 and ARM at least).
I've had up to 30% speed improvement. Of course, the speed can also be
improved by modifying the Ocaml code itself, so I'm not claiming what
I've done is a major improvement at all.

camlA__matchdtree_63(R/0[%eax])
  { + R/0[%eax]}
  a/8 := R/0[%eax]
  {a/8*}
  i/9 := 1
  {a/8* i/9}
  catch
    {a/8* i/9 + i/9}
    if i/9 >s 201 then
       [...]

Short questions --
(1) Any optimizing option I would be unaware of? Inlining option
doesn't help much.
(2) Any way to contribute this work back to Ocaml community (on a
separate cvs branch?) or is this kind of work planned by the core
Ocaml team?
Thanks,
G<>

[-- Attachment #2: Type: text/html, Size: 1606 bytes --]

             reply	other threads:[~2008-12-06 12:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06 12:48 Gilles Pirio [this message]
2008-12-06 20:02 ` [Caml-list] " Edgar Friendly
2008-12-07 21:58 ` Sylvain Le Gall
2008-12-09 15:51   ` [Caml-list] " Gilles Pirio
2008-12-09 19:31     ` Sylvain Le Gall
2009-01-13 19:09       ` [Caml-list] " Gilles Pirio
2009-01-13 20:44         ` Sylvain Le Gall

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=605bf2750812060448u787862c9xdc2528cb61bc01d7@mail.gmail.com \
    --to=gilles.ocaml@googlemail.com \
    --cc=caml-list@yquem.inria.fr \
    /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).