caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Ocaml back-end
@ 2008-12-06 12:48 Gilles Pirio
  2008-12-06 20:02 ` [Caml-list] " Edgar Friendly
  2008-12-07 21:58 ` Sylvain Le Gall
  0 siblings, 2 replies; 7+ messages in thread
From: Gilles Pirio @ 2008-12-06 12:48 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-13 20:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-06 12:48 Ocaml back-end Gilles Pirio
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

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).