Commit Graph

73 Commits (master)

Author SHA1 Message Date
Greta Yorsh 855c13cd6e
ability to restart compilation from .cmir-linear IR files 2020-10-13 15:07:13 +02:00
Greta Yorsh 04bceec6cc
Save Linear IR before emit (#8939)
* Save IR before emit

* Update .depend for linear_format

* Test for -save-ir-after command-line option

* Address review comments

* Add Changes entry
2020-10-07 11:32:40 +01:00
Greta Yorsh 7c11fcbdd1 Stop before emit 2019-10-30 15:27:29 +00:00
Vincent Laviron 60f58174ba
Split cmmgen into generic cmm helpers and clambda-specific transformations (#1963) 2019-10-04 17:49:59 +02:00
Greta Yorsh cae89d4e1b Pass num_stack_slots as argument 2019-09-11 18:48:20 +01:00
Mark Shinwell 6cbdfad125 Move some code from Asmgen to the middle end directory etc. (#2288)
Followup to (#2281)
2019-05-10 15:11:22 +02:00
Mark Shinwell 72ea849d2a
Move some middle-end files around (#2281)
* Various file moves in the middle end: this is the first stage of improving separation between the middle end and backend.
* Creation of file_formats/ directory (with associated file moves) to hold the definitions of compilation artifact formats.
* Creation of lambda/ directory (with associated file moves) to hold Lambda language definition files, transformation passes and construction passes from Typedtree.
* Disable (hopefully temporarily) dynlink, debugger and ocamldoc for the dune build.
2019-04-01 17:18:47 +01:00
Mark Shinwell 7cb0da58f1
Don't generate Clambda constants during Cmmgen, etc. (#2280) 2019-03-05 17:09:40 +00:00
Mark Shinwell 0f86fe29a4 Merge pull request #2088 from mshinwell/symbol_provenance
Add Clambda.usymbol_provenance
2019-01-15 14:38:15 +01:00
sliquister ae1317caae Add option to dump the output of e.g. -dlambda in a file (#1913) 2018-07-27 08:51:53 +01:00
Nicolás Ojeda Bär 40bab2d768 Implement reviewer suggestions 2018-07-25 17:58:32 +02:00
François Bobot da3f9f34f5 Use reraise_raw_backtrace in Misc.try_finally
And add labels ~always for previous cleanup function and
    ~exceptionally for new cleanup function in exceptional case
2018-07-25 17:58:32 +02:00
Valentin Gatien-Baron 68e54ea9bf liveness: print fatal errors fully on stderr
instead of half on stderr and half the ppf argument
2018-07-15 15:08:48 -04:00
Xavier Clerc 835cad1686 Further reduce the size of cmx files (flambda) (#1666) 2018-04-09 07:46:50 +01:00
Pierre Chambart f2ab9e299f Avoid generating initialization code for init symbol of constants 2018-01-21 13:47:12 +01:00
Mark Shinwell b65096678b Register availability analysis (#856) 2017-09-15 11:08:14 +01:00
sliquister 3f76c0525b generalize -dtimings to show allocation, top heap size (#1152) 2017-06-09 12:29:21 +01:00
Valentin Gatien-Baron bf96a7ac42 display the output of -dtimings as a hierarchy 2017-03-07 15:43:57 -05:00
Nicolas Ojeda Bar e75c87dc48 Initial import of linear-scan-register-allocator
The code in this commit was written by Marcell Fischbach & Benedikt Meurer.
See [Mantis#5324](http://caml.inria.fr/mantis/view.php?id=5324) for some
context.

The code (which was originally written against 3.12) was ported to trunk by
doing

```bash
git clone https://github.com/bmeurer/ocaml-experimental/
cd ocaml-experimental
git diff master...linear-scan-register-allocator > t.diff
```

and then applying the diff by hand.
2017-02-22 17:09:18 +01:00
Pierre Chambart 1624c8e7a0 Also remove the forced dependency dummy code hack for closure
This also share the result type of transl_implementation_flambda
and transl_store_implementation
2016-07-08 16:02:26 +02:00
Pierre Chambart 7286a4978f Allow to force linking modules without generating dummy code 2016-07-08 16:02:26 +02:00
alainfrisch 3190d6feb8 Restore -dclambda in non flambda mode
Since commit b0b0f6609c, -dclambda was
no longer recognized in non-flambda mode, and one has to use
the new option -drawclambda instead.  With this commit, one gets
the clambda output if one of -dclambda or -drawclambda is enabled (in
non-flambda mode).
2016-04-29 15:35:45 +02:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Mark Shinwell bde2bdd206 Reformatting only (to the standards of tools/check-typo) 2016-02-10 18:28:38 +01:00
Pierre Chambart b0b0f6609c Enable flambda 2016-01-28 15:04:47 +01:00
Pierre Chambart 1e8019e946 Avoid using local open syntax on records 2016-01-14 13:36:41 +01:00
Pierre Chambart 581b2bc020 Add Clambda.preallocated_{block, constants} types
And accept them as argument of Cmmgen.compunit
2016-01-13 18:23:02 +01:00
Thomas Refis cae2a7e53c use Timings.source_provenance in more places 2015-12-31 11:00:39 +00:00
Pierre Chambart c26b3a3188 Intrument more passes 2015-12-18 13:35:44 +00:00
Pierre Chambart 88ea825055 Provides the source file for timings of regalloc 2015-12-18 13:35:44 +00:00
Pierre Chambart 828e78d4a4 Avoid using Timings.start/stop 2015-12-18 13:35:44 +00:00
Pierre Chambart 233e1b1791 Record compiler runtime 2015-12-18 13:33:10 +00:00
Alain Frisch dd90f1b9c5 Avoid creating empty .asm files when using a binary backend.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15866 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-26 14:03:58 +00:00
Alain Frisch 9a414baa96 Allow a binary code emitter to avoid the creation of an assembly source file.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 14:46:53 +00:00
Alain Frisch 0652dda14d Factorize the sequencing of operations for setting up the assembly output, calling the assembler, closing/removing the assembly output.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 12:48:13 +00:00
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 10:40:22 +00:00
Xavier Leroy 9c1d005ebb New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
(Cherry-picked from branch backend-optim.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14686 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:31:18 +00:00
Alain Frisch b92a3ca792 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 15:50:47 +00:00
Fabrice Le Fessant 9b53f8b10d Re-add configure option -with-frame-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:03:59 +00:00
Fabrice Le Fessant 97bc1fa9e2 Reverting -with-frame-pointers
Fails to compile alt-ergo without frame-pointers. No time to debug
before tonight, so I revert and will merge again after fixing the
problem.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 06:29:33 +00:00
Fabrice Le Fessant 1b2667b9f2 Add -with-frame-pointers to ./configure
This option can be used to tell the native compiler that it should
update frame pointers, so that debuggers and profiling tools 
(especially Linux perf) can use them. For now, it is only supported
by the Unix/amd64 port.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 04:42:42 +00:00
Alain Frisch 5e8adcd8df #5784: -dclambda option is ignored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-16 13:40:36 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Fabrice Le Fessant 7b9f2a7ddf Reverting commits 12385 and 12370, while waiting for a decision to be taken to install compiler files for 4.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12389 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-22 16:11:51 +00:00
Fabrice Le Fessant 4c85d29786 Asmgen hooks: call cmm hooks once on all phrases, instead of for every function
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12385 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-19 16:14:06 +00:00
Fabrice Le Fessant 905143bfa2 Add hooks in Asmgen
Add hooks in Asmgen to allow external developers to add
new passes on the typedtree, lambda, clambda and cmm trees.
A library 'ocamlopt.cm{a/xa}' is installed, with optmain.cm{x/o},
so that developers can create new ocamlopt executables containing
these new passes.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 08:50:26 +00:00
Alain Frisch 1fb4007ece #5527: absolute filenames for more error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 17:50:17 +00:00
Alain Frisch 4cfd2fc2a6 Reverting bad commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:23:34 +00:00
Alain Frisch 7fe8c8ce6f Fix #5490.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:21:03 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00