Commit Graph

47 Commits (bfd3d7deb057372162026c5d50b4c2782e4cdd25)

Author SHA1 Message Date
Stephen Dolan 768dcce48f Use allocation-size info on more than just amd64.
Moves the alloc_dbginfo type to Debuginfo, to avoid a circular
dependency on architectures that use Branch_relaxation.

This commit generates frame tables with allocation sizes on all
architectures, but does not yet update the allocation code for
non-amd64 backends.
2019-10-22 11:47:31 +01:00
Stephen Dolan 34f97941ec Retain debug information about allocation sizes, for statmemprof.
This code is adapted from jhjourdan's 2c93ca1e711. Comballoc is
extended to keep track of allocation sizes and debug info for each
allocation, and the frame table format is modified to store them.

The native code GC-entry logic is changed to match bytecode, by
calling the garbage collector at most once per allocation.

amd64 only, for now.
2019-10-22 11:47:31 +01:00
Greta Yorsh aeebb62e9b Move contains_calls and num_stack_slots from Proc to Mach.fundecl 2019-09-09 11:33:03 +01: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 98654c77de Remove loop constructors in Cmm and Mach 2019-02-19 17:00:38 +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
Pierre Chambart 69fb40bb55 Disable CSE for the initialization function (#1455) 2018-03-15 12:59:51 +00: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
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
Mark Shinwell 2e3b6ba249 code review 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 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 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
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 f2a2bf7d8b Nativeint.t -> nativeint.
Debug des entiers alloues sur 64 bits


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2840 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-21 19:38:09 +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 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
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
Xavier Leroy b826ff65bc Ajout des tests Ieventest et Ioddtest dans Mach.operation
Meilleure traduction lambda -> C-- pour les definitions de structures
toplevel.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@109 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-17 16:10:15 +00:00
Xavier Leroy c226d5efeb Branchement du GC de la version bytecode sur le compilateur natif
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@72 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-10 09:48:27 +00:00
Xavier Leroy bbbf6d0164 Ajout construction "checkbounds" dans C--.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@71 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-07 16:42:05 +00:00
Xavier Leroy 48514aaca8 Integration du generateur de code et du compilateur.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@51 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-02 16:41:48 +00:00
Xavier Leroy ba79d4bd1f Iloop est maintenant une boucle infinie, on en sort par catch...exit.
Ca supprime Ilooptest, Ialwaystrue, Ialwaysfalse.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@36 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-06-15 16:08:53 +00:00
Xavier Leroy 3ceaa85c72 Premiere version.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@34 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-06-15 08:17:29 +00:00