From: whitequark <whitequark@whitequark.org>
To: Raoul Duke <raould@gmail.com>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] whither portability?
Date: Sun, 27 Sep 2015 17:33:00 +0300 [thread overview]
Message-ID: <1acefe77c30ce33c0adba49605bd9325@whitequark.org> (raw)
In-Reply-To: <CAJ7XQb5Xmd0TW_91_8gqeHptFPAuaYpeNCuP4piZx-rsQ2X9yA@mail.gmail.com>
On 2015-09-27 03:55, Raoul Duke wrote:
>> Both ocamlc and ocamlopt work for iOS and Android; there is not really
>> a good reason to use the bytecode compiler for deployment to mobile.
>>
>> There is no such thing as "LLVM bytecode" and LLVM bitcode (sic)
>> is merely an intermediate format for native executable code. Shipping
>> LLVM bitcode offers no conceptual improvement over shipping
>> machine code and in any case, there is neither an LLVM backend
>> for ocamlopt nor much need for such a backend.
>
> Yes, "bitcode" is the right term. It is now the format Apple wants. So
> I dunno why people would actively discount it here.
Right now, LLVM IR (of which the bitcode is a serialization) is not
flexible enough to express the invariants and metadata required
for the OCaml GC to function[1]. Even if someone released the necessary,
highly nontrivial changes to both LLVM and OCaml today, it would take
many months for them to be reviewed, merged & propagated into Apple's
LLVM fork--all for a small improvement in a select few numeric workloads
that can benefit from using the instruction selector tailored for
the particular device, and a substantial reduction in being able to
debug your code[2].
[1]:
https://github.com/whitequark/ocaml-llvm-ng/issues/1#issuecomment-141844579
[2]:
https://medium.com/@FredericJacobs/why-i-m-not-enabling-bitcode-f35cd8fbfcc5
--
whitequark
next prev parent reply other threads:[~2015-09-27 14:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 21:13 Raoul Duke
2015-09-26 9:28 ` Gerd Stolpmann
2015-09-26 12:48 ` Raoul Duke
2015-09-26 15:59 ` whitequark
2015-09-26 16:21 ` Gerd Stolpmann
2015-09-26 23:29 ` Raoul Duke
2015-09-27 0:47 ` Spiros Eliopoulos
2015-09-27 0:51 ` Raoul Duke
2015-09-27 0:20 ` Oliver Bandel
2015-09-27 0:27 ` Yotam Barnoy
2015-09-27 14:10 ` Oliver Bandel
2015-09-27 0:55 ` Raoul Duke
2015-09-27 14:33 ` whitequark [this message]
2015-09-27 17:19 ` Raoul Duke
2015-09-27 17:41 ` whitequark
2015-09-26 17:10 ` Gerd Stolpmann
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=1acefe77c30ce33c0adba49605bd9325@whitequark.org \
--to=whitequark@whitequark.org \
--cc=caml-list@inria.fr \
--cc=raould@gmail.com \
/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