Commit Graph

48 Commits (eb2b1f64b17aab853ca16c531bf9c6b99c69503e)

Author SHA1 Message Date
Xavier Leroy 3ce32fba4f Wrong MASM syntax, try again.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14704 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 09:58:51 +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 452390e0ea Follow-up to commit 14673: MASM has its own syntax for hex constants
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14683 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 07:11:11 +00:00
Xavier Leroy 2633ff77ce Follow-up to commit 14673: Iconst_float now takes a float, no longer a string.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14675 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 14:02:43 +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 f16534ef1a Reintegrate raise_variants branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14289 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 13:55:13 +00:00
Alain Frisch 78c2b5b151 #6042: fix Intel syntax.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-04 14:11:40 +00:00
Xavier Leroy ec4b2fc9a6 Follow-up to commit r14254: optimization of division and modulus by constants for the I386. Untested; CI will find out.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14256 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-01 17:29:04 +00:00
Alain Frisch f2597364a2 Support the two variants on i386, intel syntax (i.e. Win32 msvc port).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-15 13:09:01 +00:00
Gabriel Scherer 75b8c0184f PR#5933 type-specialize 'let compare = compare' on ints and strings
According to the reporter 'sliquister', type-specialized comparison
can nearly halve compilation time in some cases. This patch applies
type-specialization throughout the OCaml distribution sources, so not
all changes will have performance utility, but in this case I think
it's best to be consistent, as I see no downside to the change.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 07:22:12 +00:00
Benedikt Meurer 6fad047cc0 PR#5181: Merge common floating point constants in ocamlopt.
Instead of generating a unique quadword constant for each and every
floating point constant use within a function, we now collect the floating
point constants on a per-module basis, and generate only one quadword
per floating point constant.

This affects only the amd64 and i386 ports (both Unix/Linux/OS X and Windows).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-21 18:33:32 +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 b07b3032c0 - PR#5509: misclassification of statically-allocated empty array that
falls exactly at beginning of an otherwise unused data page.
- i386/emit_nt.mlp: add zero word at end of data segment, like in other ports.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12166 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-18 16:56:29 +00:00
Xavier Leroy ca0c236919 PR#4869: rare collisions between assembly labels for code and data
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11887 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-18 10:00:56 +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 c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +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
Damien Doligez ed32f569e3 merge changes from ocaml3110 to ocaml3111rc0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-20 11:52:42 +00:00
Damien Doligez 9ea5edac9a merge changes 3.10.0 -> 3.10.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-01-11 16:13:18 +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
Xavier Leroy b32cd009b8 Dead code eliminated
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7667 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-10-03 11:51:57 +00:00
Xavier Leroy 6fbad77c8a Ajout de pseudo-registres supplementaires pour le passage de plus de 6 arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6596 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-08-12 14:29:25 +00:00
Xavier Leroy 0b9f496f6f Constantes flottantes +0.0 / -0.0 (PR#2480)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6277 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-05-03 12:46:51 +00:00
Damien Doligez 258c929f64 PR#1914,PR#1956, suppression du portage Mac OS 9
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-05 20:26:19 +00:00
Damien Doligez 5a678d29f5 depollution suite (PR#1914 et PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-01 16:42:43 +00:00
Xavier Leroy 8c008a73d1 Introduction/utilisation de caml_array_bound_error
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-06-30 15:39:39 +00:00
Xavier Leroy 2798826120 Petite optimisation pour le Pentium 4
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5637 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-06-30 15:32:45 +00:00
Xavier Leroy 5bc610b3ab Retour en arriere sur l'utilisation de %st(0) comme un registre allouable (c'est incorrect)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5598 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-06-15 09:58:31 +00:00
Xavier Leroy 7abcc8799e Ajout des litteraux de type int32, nativeint, int64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-04-25 12:27:31 +00:00
Xavier Leroy fa97920376 Typo fldl1 -> fld1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5413 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-03 15:58:06 +00:00
Xavier Leroy a78bd53ee7 Erreurs de syntaxe masm dans les dernieres modifs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5406 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-02-25 16:21:15 +00:00
Xavier Leroy 40efd97fe1 Amelioration des flottants x86: utiliser %st(0) comme registre quand c'est possible, evitant ainsi des couples fstp/fld; ajout option -ffast-math
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5404 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-02-25 15:50:13 +00:00
Xavier Leroy 9178881f44 Introduction et utilisation de Cglobal_symbol pour declarer explicitement les symboles de donnees qui doivent etre globaux
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-24 15:55:26 +00:00
Xavier Leroy 71cf31f0e2 Ajout du packaging d'unites de compilation (option -pack)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-02-08 16:55:44 +00:00
Xavier Leroy c02c135946 Introduction de Double_u (doubles alignes sur un mot) par opposition a Double (doubles alignes naturellement). A tester.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2937 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-10 14:31:06 +00:00
Xavier Leroy 1cac403368 Ajout des modules Int32, Int64 et Nativeint
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2807 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-11 15:09:27 +00:00
Xavier Leroy d9fe400f4e Oubli: Cint32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-04 15:08:23 +00:00
Xavier Leroy 81bfeaae69 Traitement plus uniforme des load et des store. Ajout load/store sur int32 et float32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2780 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-04 13:31:04 +00:00
Xavier Leroy e0e7b3015a Rectification constantes flottantes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2585 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-22 18:24:27 +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 52bdeb2bdf Prise en compte du traitement addimm 2 addresses -> lea
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-05-15 17:48:10 +00:00
Xavier Leroy 05b366f105 Istore_int et Ipush_int prennent un Nativeint.t au lieu d'un int
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2275 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-12 16:27:39 +00:00
Xavier Leroy 9893221693 Retour de l'instruction add $imm, mem.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1767 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-11-14 11:02:05 +00:00
Xavier Leroy 5f7de2a000 Plus de labels
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1758 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-11-10 18:22:59 +00:00
Xavier Leroy 88054d9a98 MAJ portage Win32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1698 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-09-02 16:01:39 +00:00
Xavier Leroy 119c8eeb67 Nouvelle architecture pour les fichiers dependant du processeur
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-07-24 11:49:12 +00:00