Commit Graph

27 Commits (c4e8117c2bf2b17e60c5d141456a3628d150513c)

Author SHA1 Message Date
Alain Frisch 3d00fc8773 Avoid ambiguous or-pattern. 2016-03-09 18:42:07 +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
Mark Shinwell 05f1746cb5 Rename to max_arguments_for_tailcalls; revise numbers assuming no unboxed floats using the OCaml calling conventions 2016-02-08 15:02:40 +01:00
Mark Shinwell b5618e8642 max_arguments_without_passing_on-stack 2016-01-29 15:57:36 +00:00
Xavier Leroy 098e69aa66 Add notes and pointers to reference documents for each ocamlopt architecture. 2015-12-20 12:48:28 +01:00
Xavier Leroy eef84c432a PR#7037: don't put temporary asm file names into object files.
This way, builds are reproducible.
2015-12-13 18:40:04 +01:00
Rich Neswold 2914b95cbb Add support for NetBSD/arm. 2015-12-05 10:16:48 -06: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
Jérémie Dimino e7593340c1 Split 64-bit integers on 32-bit architectures
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16385 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 16:18:50 +00:00
Xavier Leroy 66e958ef0f Still following up on commit 16278.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16282 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 17:25:17 +00:00
Xavier Leroy 7027b858eb Update "register_class" followign the introduction of the Val machine type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 11:37:52 +00:00
Xavier Leroy 53231bcdc3 Update to trunk r16267.
A change on trunk in cmmgen was causing problems: the use of array_indexing
in bigarray_indexing was constructing derived pointers of Addr type
instead of the correct Int type.  (Because bigarray inner pointers
are outside the heap, and because they are live across allocations.)
Added an optional argument to array_indexing to specify expected
pointer type, and adapted bigarray_indexing to use it with type Int.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cmm-mach-types@16268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 08:18:53 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00: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
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Xavier Leroy cf008f2be3 Reflecting commit 14950 on version/4.02:
PR#6283: increase alignment to work around a linking error.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14951 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-04 15:15:58 +00:00
Xavier Leroy 657ba73021 Liveness & Deadcode: fix i386-specific issue with move instructions accessing
the x87 FP stack, which must not be eliminated.
CSEgen: harden against the same x87-specific issue + against reuse of
  values in fixed hardware registers that were destroyed by a prior
  operation.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-16 14:37:22 +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
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +00:00
Gabriel Scherer d8d7ea94d4 PR#6351: minor arm64 fix (patch by Richard W.M. Jones)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14487 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-25 10:49:24 +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
Xavier Leroy bdb169a04f Follow-up to commit r14254: optimization of immediate division and modulus for ARM64. Completely untested.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-01 18:10:18 +00:00
Alain Frisch 3f3599f0ee Support raise_notrace under arm/arm64 (not tested). Do not distinguish raise/reraise for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14228 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-15 12:03:47 +00:00
Xavier Leroy 055d5c0379 Port to the ARM 64-bits (AArch64) architecture (experimental).
Merge of branch branches/arm64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13909 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-18 16:09:20 +00:00