Cross-module inlining fails
Sylvain Le Gall
sylvain at le-gall.net
Tue Nov 20 09:31:39 GMT 2012
2012/11/19 Valentin Gatien-Baron <vgatien-baron at janestreet.com>
> Not all cmx's should be installed, but I don't see why the packed cmx
> should not be installed. Generally speaking, I think packed cmx's are
> not special and every cmx that was given to ocamlopt to build the cmxa
> should be installed.
>
> cmxs are for dynamic loading, so that's not related.
>
>
Noted, it will be in the next version of OASIS. I'll ping you when it lands
in the github repository.
> On 11/19/12, Sylvain Le Gall <sylvain at le-gall.net> wrote:
> > Hi,
> >
> >
> > 2012/11/19 Markus Mottl <markus.mottl at gmail.com>
> >
> >> Hi,
> >>
> >> I've noticed that cross-module inlining does not work with the
> >> Opam-installed Core library, because the .cmx file is not installed.
> >> Note that it is not enough to install the .cmxa file, because it is
> >> only used during linking. The compiler wouldn't know where to look
> >> for optimization information.
> >>
> >> Looking at the setup.ml file generated by Oasis, it seems that Oasis
> >> is the culprit, but I thought it would be important to know for other
> >> Core users if they experience bad performance.
> >>
> >> Sylvain, is there anything one has to put in the _oasis file to
> >> generate correct installation code? My guess is that all that's
> >> needed is to fix setup.ml by installing the .cmx of packing targets
> >> (e.g. core.cmx), not just .cmx files for constituents of unpacked
> >> libraries, which seem to be handled correctly.
> >>
> >
> > Well, .cmx file should be installed EXCEPT if you are using packed
> > modules...
> >
> > The culprit is:
> > (not lib.lib_pack) && (* Do not install .cmx packed submodules *)
> > in src/oasis/OASISLibrary.ml
> >
> > AFAIK, Core use pack module, so this is the reason why it doesn't install
> > .cmx.
> >
> > You can experiment installing .cmx by commenting this line. But I am
> really
> > not sure this will help that much. I thought that .cmxs was a pack of
> .cmx
> > so that inlining can work using what is inside this archive (contrary to
> > .cmxa).
> >
> > Maybe the inlining using .cmxs doesn't work as excepted ?
> >
> >
> >> Regards,
> >> Markus
> >>
> >> --
> >> Markus Mottl http://www.ocaml.info markus.mottl at gmail.com
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/core/attachments/20121120/7c1035a2/attachment-0001.html>
More information about the core
mailing list