Commit Graph

57 Commits (master)

Author SHA1 Message Date
Nicolás Ojeda Bär 43883ae4bc Remove labels after calls, checkbound, and GC points 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02:00
Gabriel Scherer 8938886721 -dno-locations: hide source locations (and debug events) from IR dumps
This PR was tested with also the -dsel, -dlinear output (also fixed to
not-print locations), but the output is architecture-dependent so this
part of the test was removed.
2020-01-09 15:25:16 +01:00
Florian Angeletti 91c762a427 Merge dump_live and print_live 2019-09-30 15:56:40 +02:00
KC Sivaramakrishnan c06038a0ee Move backtrace support global variables to domain state.
Since we cannot access backtrace position in cmmgen.ml anymore,
Cmm.raise_kind in removed. Instead, we use Lambda.raise_kind. When
assembly code is generated, we reset the backtrace position to 0 in the
case of regular raise. Importantly, the semantics remains the same.
2019-08-23 09:50:05 +05:30
Vincent Laviron a940f7c371 Fix Mach printer (#8669) 2019-05-16 10:34:11 +02:00
Vincent Laviron 98654c77de Remove loop constructors in Cmm and Mach 2019-02-19 17:00:38 +01:00
Daniel Bünzli a7afd89003 s/string_of_int/Int.to_string/g 2018-11-07 13:52:02 +01:00
Mark Shinwell dae65dacda
Rename Mach.Ialloc record field from _words_ to _bytes_ and fix logic in a couple of places (#2074) 2018-10-02 16:00:03 +01:00
Mark Shinwell 2b5f13c913 GPR#2056 (Backend_var) 2018-09-28 17:59:01 +02:00
Leo White 1671e5a3af Treat negated float comparisons more directly (#1487)
* Add float comparison test

* Treat negated float comparisons more directly

* Add Changes entry
2018-02-28 14:19:46 +01:00
Mark Shinwell b65096678b Register availability analysis (#856) 2017-09-15 11:08:14 +01: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 cadd4c5ba1 Add a recursive flag on the Ccatch construct
When this flag is Nonrecursive, we can avoid iterating on
various passes. This makes exponential time cases more unlikely.
2016-10-28 13:03:59 +02:00
Pierre Chambart c3d056de68 Change Cmm Ccatch construct to allow recursive cases 2016-10-28 13:03:59 +02:00
Mark Shinwell cd0bd8aa73 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
François Bobot bb4a1b4f5d Specialize raise_kind after cmmgen
since the semantic changed. There is no need to check Clflags.debug
   anymore Raise_withtrace, means that traces must be computed (if the
   runtime boolean is true).
2016-07-28 15:29:50 +02:00
Mark Shinwell c843ca0691 Labels after calls, call GC points and checkbound points (again) (#660) 2016-07-06 11:44:00 +01:00
Alain Frisch c3c523109e Revert "Labels after calls, call GC points and checkbound points" 2016-07-01 18:42:51 +02:00
Mark Shinwell 432f87f077 Labels after calls, call GC points and checkbound points (#644) 2016-07-01 15:16:03 +01: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
Xavier Leroy 6cd8656249 PR#7024 and GPR#295: CSE confuses +0.0 and -0.0
The fix consists in representing float literals by their bit patterns (int64) in the Mach and Linear intermediate languages.

A regression test was added to the test suite.
2015-11-19 09:25:02 +01:00
Xavier Leroy ac02f56351 More precise typing at the C-- and Mach level:
- Register type "Addr" is split into
    . "Val" (well-formed OCaml values, appropriate as GC roots)
    . "Addr" (derived pointers within the heap, must not survive a GC)
- memory_chunk "Word" is split into
    . "Word_val" (OCaml value)
    . "Word_int" (native-sized integer, not a pointer into the heap)

Cmmgen was updated to use Word_val or Word_int as appropriate.

Application #1: fail at compile-time if a derived pointer within the heap
survives a GC point (cf. PR#6484).

Application #2: CSE can do a better job across allocation points
(keep factoring expressions of type Int, Val, Float, but not Addr).


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cmm-mach-types@15568 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-06 08:54:14 +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 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Mark Shinwell de489bde2f improved abstractions for register naming in the native code backend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14465 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 14:39:12 +00:00
Mark Shinwell 583bfd46c2 be explicit when constructing integers that are block headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14464 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 14:34:00 +00:00
Benedikt Meurer 3bb161216b Perform constant optimizations for integer division and modulus on the C-- level.
This way we can avoid having to duplicate the same functionality for
every backend, and we may also benefit from other optimizations performed
during C-- generation.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14303 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-19 07:01:54 +00:00
Alain Frisch 164c307ae3 Support for raise variants in ocamlopt. Only amd64 for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14226 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 14:33:27 +00:00
Benedikt Meurer bf6aa158de Fix typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13838 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-26 21:28:05 +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
Xavier Leroy 2eecf2d4c0 PR#5487: addition of CFI directives and a few filename/linenumber info to generated amd64 and i386 assembly files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12179 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-21 17:41:02 +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
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Xavier Leroy 4b5512c74c Stack backtraces on uncaught exceptions in native code (merge of the opt_backtrace branch)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-29 12:11:18 +00:00
Luc Maranget d043fecf18 new or-pat compilation + exhaustiveness used in compilation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3273 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-08-11 19:50:59 +00:00
Xavier Leroy eca79e519a Erreur de formattage
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3215 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-06-29 11:43:46 +00:00
Pierre Weis 9abfff060e Suppression de Formatmsg, réécriture des messages à l'aide de Format.fprintf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-04-21 08:13:22 +00:00
Pierre Weis 39553e9972 Révision de l'impression à l'aide de format: utilisation de printf
pour condenser les programmes et aussi préparer une future (éventuelle)
internationalisation d'Objective Caml.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2796 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-08 20:00:06 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy a048d42b10 Ajout du module Formatmsg pour rediriger les messages du systeme vers stdout ou stderr suivant le contexte
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2486 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-08 17:06:33 +00:00
Xavier Leroy 274f164366 Representer les constantes entieres par le type Nativeint.t
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1311 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-04 10:19:51 +00:00
Pierre Weis a6c6120f14 Changement des boi^tes de pretty-print
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-02-04 08:03:29 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Xavier Leroy 669bf28452 Ajout des instructions negf et absf (negation flottante, valeur
absolue flottante).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@682 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-03-07 13:45:17 +00:00
Xavier Leroy 06c105eff2 Retour en arriere sur les stores initialisants. Completement inefficace.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@546 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-12-17 16:24:34 +00:00
Xavier Leroy f6da05e9ad Scheduling plus agressif des remplissages de blocs alloues
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@545 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-12-17 15:45:28 +00:00
Xavier Leroy e5ef0b6f16 Changement des comparaisons flottantes pour etre conforme a IEEE.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@482 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-11-28 14:25:57 +00:00
Xavier Leroy e4066357b1 Ajout des notices de copyright
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy 4878271adf Suppression de Cmodify / Imodify.
Strength reduction sur les multiplications, divisions, modulo de
puissances de 2.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@147 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-25 13:04:41 +00:00