summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Meurer <benedikt.meurer@googlemail.com>2012-12-28 23:27:56 +0000
committerBenedikt Meurer <benedikt.meurer@googlemail.com>2012-12-28 23:27:56 +0000
commit9ae458499eafce974cee2ae6331fdd7060f35c36 (patch)
tree265d133e1caa530a9fcf5640adaeb6685902518c
parent655cf17e4edfe46e94a62f24f6b7b0ed4e98ae42 (diff)
[arm] Improve register pressure for interval splitting.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--asmcomp/arm/proc.ml18
1 files changed, 12 insertions, 6 deletions
diff --git a/asmcomp/arm/proc.ml b/asmcomp/arm/proc.ml
index 58f1c722d..dfd028f94 100644
--- a/asmcomp/arm/proc.ml
+++ b/asmcomp/arm/proc.ml
@@ -192,17 +192,17 @@ let destroyed_at_c_call =
124;125;126;127;128;129;130;131]))
let destroyed_at_oper = function
- Iop(Icall_ind | Icall_imm _ )
+ Iop(Icall_ind | Icall_imm _)
| Iop(Iextcall(_, true)) ->
all_phys_regs
| Iop(Iextcall(_, false)) ->
destroyed_at_c_call
- | Iop(Ialloc n) ->
+ | Iop(Ialloc _) ->
destroyed_at_alloc
| Iop(Iconst_symbol _) when !pic_code ->
- [|phys_reg 3; phys_reg 8|] (* r3 and r12 destroyed *)
+ [| phys_reg 3; phys_reg 8 |] (* r3 and r12 destroyed *)
| Iop(Iintoffloat | Ifloatofint | Iload(Single, _) | Istore(Single, _)) ->
- [|phys_reg 107|] (* d7 (s14-s15) destroyed *)
+ [| phys_reg 107 |] (* d7 (s14-s15) destroyed *)
| _ -> [||]
let destroyed_at_raise = all_phys_regs
@@ -210,11 +210,17 @@ let destroyed_at_raise = all_phys_regs
(* Maximal register pressure *)
let safe_register_pressure = function
- Iextcall(_, _) -> 5
+ Iextcall(_, _) -> if abi = EABI then 0 else 4
+ | Ialloc _ -> if abi = EABI then 0 else 7
+ | Iconst_symbol _ when !pic_code -> 7
| _ -> 9
let max_register_pressure = function
- Iextcall(_, _) -> [| 5; 9; 9 |]
+ Iextcall(_, _) -> if abi = EABI then [| 4; 0; 0 |] else [| 4; 8; 8 |]
+ | Ialloc _ -> if abi = EABI then [| 7; 0; 0 |] else [| 7; 8; 8 |]
+ | Iconst_symbol _ when !pic_code -> [| 7; 16; 32 |]
+ | Iintoffloat | Ifloatofint
+ | Iload(Single, _) | Istore(Single, _) -> [| 9; 15; 31 |]
| _ -> [| 9; 16; 32 |]
(* Layout of the stack *)