Disable CSE optimization which is broken on aarch64.

This commit is contained in:
Richard W.M. Jones 2014-07-15 13:07:54 +01:00
parent 7335bbf1f3
commit e575a86d45
2 changed files with 48 additions and 1 deletions

38
0001-Disable-CSE.patch Normal file
View File

@ -0,0 +1,38 @@
From 99cb8f909ad25bcfa674216f5140b6cf1e72aeca Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 15 Jul 2014 11:52:26 +0000
Subject: [PATCH] Disable CSE.
This disables the common subexpression elimination (CSE) optimization.
This is broken on aarch64:
http://caml.inria.fr/mantis/view.php?id=6486
---
asmcomp/CSEgen.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/asmcomp/CSEgen.ml b/asmcomp/CSEgen.ml
index 19019e1..260e4fa 100644
--- a/asmcomp/CSEgen.ml
+++ b/asmcomp/CSEgen.ml
@@ -180,7 +180,8 @@ method private keep_checkbounds n =
(* Perform CSE on the given instruction [i] and its successors.
[n] is the value numbering current at the beginning of [i]. *)
-method private cse n i =
+method private cse n i = i
+(*
match i.desc with
| Iend | Ireturn | Iop(Itailcall_ind) | Iop(Itailcall_imm _)
| Iexit _ | Iraise _ ->
@@ -262,6 +263,7 @@ method private cse n i =
{i with desc = Itrywith(self#cse n body,
self#cse empty_numbering handler);
next = self#cse empty_numbering i.next}
+*)
method fundecl f =
{f with fun_body = self#cse empty_numbering f.fun_body}
--
2.0.1

View File

@ -20,7 +20,7 @@
Name: ocaml
Version: 4.02.0
Release: 0.1.git%{shortcommit}%{?dist}
Release: 0.2.git%{shortcommit}%{?dist}
Summary: OCaml compiler and programming environment
@ -59,6 +59,12 @@ Patch0008: 0008-arm-arm64-Mark-stack-as-non-executable.patch
Patch0009: 0009-arg-Add-no_arg-and-get_arg-helper-functions.patch
Patch0010: 0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch
# On aarch64 only, the CSE optimization is broken. See:
# http://caml.inria.fr/mantis/view.php?id=6486
%ifarch aarch64
Patch9999: 0001-Disable-CSE.patch
%endif
# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
BuildRequires: binutils-devel
@ -415,6 +421,9 @@ fi
%changelog
* Tue Jul 15 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.2
- Disable CSE optimization which is broken on aarch64.
* Sat Jul 12 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.1
- Update to 4.02.0-beta1 + patches from the upstream 4.02 branch.
- REMOVED labltk and camlp4 packages, since these are now packaged