Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml on IA-64 (was "About Ocaml and Sourceforge").
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: OCaml on IA-64
> By the way, are there any aspects of Caml, like the functionnal part of
> the language, that allows more easy optimizations specific to IA-64
> architecture (for example definition and use of predicates, use of
> speculation, etc.) compared to usual imperative language like C? And at
> the opposite, are there any Caml features that are difficult to compile
> on such an architecture?

Tricky question.  Nowadays, both OCaml and gcc fail to exploit any of
the advanced features of the IA64, and treat it basically like a
conventional RISC with lots of registers and rather picky scheduling
constraints in basic blocks.

Also, many of the IA64 innovations seem to have been designed with
Fortran in mind (e.g. the loop scheduling support), so it's unclear
whether other languages can really take advantage of them.

This said, I'll venture a guess: it could be that loads and stores can be
scheduled more aggressively in OCaml than in C, because the OCaml type
system offers more non-aliasing information (e.g. stores into
immutable data types are always initializing loads and are guaranteed
not to interfere).  On the other hand, OCaml programs tend to perform
more loads than C programs...

Another guess: for lazy languages like Haskell, predication could
prove very useful to handle the two cases "evaluated already" and "not
evaluated yet" without any branch penalty.

Lots of issues to explore...

- Xavier Leroy