|Anonymous | Login | Signup for a new account||2016-10-23 18:17 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006389||OCaml||OCaml backend (code generation)||public||2014-05-03 15:31||2014-08-28 23:16|
|Target Version||Fixed in Version||4.02.0+dev|
|Summary||0006389: [github patch] add an -opaque option to produce optimization-empty .cmx file for separate native compilation|
The intent of this option is to enable semi-separate native
compilation. Currently, when a module changes, all the modules that
depend on it need to be recompiled. Activating -opaque disables
cross-module optimization, but should let us change a module without
having to recompile all the others (although to be honest this still
have to be verified).
This would be of practical value for development cycles of project
that have (compile;test) loops: currently compilation is much slower
in native code than in bytecode, but tests can be sensibly faster in
native code. -opaque could bring the best of both worlds, with fast
compiles and rather-fast tests.
|Additional Information||Reviewers noted that the "does not recompile dependencies when implementation changes" aspect only works for build-system that are content-based rather than timestamp-based, as recompiling the .cmx will update its modification time. I think this is fine, and that changing the compilation process to please timestamp-based system is an orthogonal question that should be discussed separately.|
|Attached Files||opaque.patch [^] (4,811 bytes) 2014-08-07 17:55 [Show Content]|
|I'm in favor of accepting the patch, but it would be quite good to at least verify that it fulfills its goal (e.g. with ocamlbuild or with omake default rules).|
I've done a test on LexiFi's code base. For a given source file change and build target, compilation takes 24s without -opaque and 16s with -opaque. The gain is not huge, but we also need to link many executables (and this cannot be avoided!) and omake itself takes some time to parse and evaluate OMakefiles and check timestamp/digests (about 5s).
I assume that for some other scenarios, the gain would be more important.
Gabriel: since nobody else objected to the feature and it seems harmless, I think you can commit your patch on the trunk.
|Thanks a lot! I was busy with other things and kind of left this one by the wayside. I agree that will be a nice addition.|
|Ping? Since the patch cannot break anything, I'd even push for putting it in 4.02.|
I just rebased the patch against the current trunk. I am about to commit it -- only for now, but I'll check with Damien that it can go in 4.02 as well.
Currently the -opaque option is only supported by ocamlopt. Do you think it should be supported (and ignored) by ocamlc as well? I see you did a similar change for -for-pack.
|Merged, with special authorization from our dear release manager, in 4.02@15106.|
|2014-05-03 15:31||gasche||New Issue|
|2014-05-03 15:33||gasche||Tag Attached: github|
|2014-05-03 15:33||gasche||Tag Attached: patch|
|2014-05-04 22:21||frisch||Note Added: 0011343|
|2014-05-06 17:27||frisch||Note Added: 0011363|
|2014-05-06 17:54||gasche||Note Added: 0011364|
|2014-06-02 18:58||frisch||Relationship added||related to 0004454|
|2014-06-04 21:43||doligez||Status||new => confirmed|
|2014-06-17 16:30||frisch||Assigned To||=> gasche|
|2014-06-17 16:30||frisch||Status||confirmed => assigned|
|2014-07-23 16:02||frisch||Note Added: 0011902|
|2014-08-07 17:55||gasche||File Added: opaque.patch|
|2014-08-07 17:57||gasche||Note Added: 0011989|
|2014-08-19 14:23||gasche||Note Added: 0012024|
|2014-08-19 14:23||gasche||Status||assigned => resolved|
|2014-08-19 14:23||gasche||Fixed in Version||=> 4.02.0+dev|
|2014-08-19 14:23||gasche||Resolution||open => fixed|
|2014-08-28 23:16||gasche||Relationship added||related to 0005859|
|Copyright © 2000 - 2011 MantisBT Group|