From c4d974b84c39f1a8137c6f888a0dd4b21e7c3cad Mon Sep 17 00:00:00 2001 From: Mark Shinwell Date: Tue, 25 Sep 2018 12:33:57 +0100 Subject: [PATCH] GPR#2065 (Add [Proc.destroyed_at_reloadretaddr]) --- Changes | 9 ++++++--- asmcomp/amd64/proc.ml | 2 ++ asmcomp/arm/proc.ml | 4 ++++ asmcomp/arm64/proc.ml | 2 ++ asmcomp/i386/proc.ml | 2 ++ asmcomp/power/proc.ml | 2 ++ asmcomp/proc.mli | 1 + asmcomp/s390x/proc.ml | 4 ++++ 8 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 20e251ed2edf..450577a7c2c2 100644 --- a/Changes +++ b/Changes @@ -428,15 +428,18 @@ Working version use [Backend_var.With_provenance] for variables in binding position. (Mark Shinwell, review by Pierre Chambart) +- GPR#2060: "Phantom let" support for the Clambda language. + (Mark Shinwell, review by Vincent Laviron) + +- GPR#2065: Add [Proc.destroyed_at_reloadretaddr]. + (Mark Shinwell, review by Damien Doligez) + - GPR#2072: Always associate a scope to a type (Thomas Refis, review by Jacques Garrigue and Leo White) - GPR#2074: Correct naming of record field inside [Ialloc] terms. (Mark Shinwell, review by Jérémie Dimino) -- GPR#2060: "Phantom let" support for the Clambda language. - (Mark Shinwell, review by Vincent Laviron) - - GPR#2076: Add [Targetint.print]. (Mark Shinwell) diff --git a/asmcomp/amd64/proc.ml b/asmcomp/amd64/proc.ml index 7948311416bf..db94a476f603 100644 --- a/asmcomp/amd64/proc.ml +++ b/asmcomp/amd64/proc.ml @@ -335,6 +335,8 @@ let destroyed_at_oper = function let destroyed_at_raise = all_phys_regs +let destroyed_at_reloadretaddr = [| |] + (* Maximal register pressure *) diff --git a/asmcomp/arm/proc.ml b/asmcomp/arm/proc.ml index 9884dd643e7d..1622fa49ce3b 100644 --- a/asmcomp/arm/proc.ml +++ b/asmcomp/arm/proc.ml @@ -308,6 +308,10 @@ let destroyed_at_oper = function let destroyed_at_raise = all_phys_regs +(* lr is destroyed at [Lreloadretaddr], but lr is not used for register + allocation, and thus does not need to (and indeed cannot) occur here. *) +let destroyed_at_reloadretaddr = [| |] + (* Maximal register pressure *) let safe_register_pressure = function diff --git a/asmcomp/arm64/proc.ml b/asmcomp/arm64/proc.ml index d87c35a1d624..14ba08d59bca 100644 --- a/asmcomp/arm64/proc.ml +++ b/asmcomp/arm64/proc.ml @@ -223,6 +223,8 @@ let destroyed_at_oper = function let destroyed_at_raise = all_phys_regs +let destroyed_at_reloadretaddr = [| |] + (* Maximal register pressure *) let safe_register_pressure = function diff --git a/asmcomp/i386/proc.ml b/asmcomp/i386/proc.ml index 519b4cf870b8..29290d0d9093 100644 --- a/asmcomp/i386/proc.ml +++ b/asmcomp/i386/proc.ml @@ -212,6 +212,8 @@ let destroyed_at_oper = function let destroyed_at_raise = all_phys_regs +let destroyed_at_reloadretaddr = [| |] + (* Maximal register pressure *) let safe_register_pressure _op = 4 diff --git a/asmcomp/power/proc.ml b/asmcomp/power/proc.ml index cefab4438423..8560d0f988a5 100644 --- a/asmcomp/power/proc.ml +++ b/asmcomp/power/proc.ml @@ -313,6 +313,8 @@ let destroyed_at_oper = function let destroyed_at_raise = all_phys_regs +let destroyed_at_reloadretaddr = [| phys_reg 11 |] + (* Maximal register pressure *) let safe_register_pressure = function diff --git a/asmcomp/proc.mli b/asmcomp/proc.mli index b4acab84b447..2074d619b36e 100644 --- a/asmcomp/proc.mli +++ b/asmcomp/proc.mli @@ -56,6 +56,7 @@ val max_register_pressure: Mach.operation -> int array (* Registers destroyed by operations *) val destroyed_at_oper: Mach.instruction_desc -> Reg.t array val destroyed_at_raise: Reg.t array +val destroyed_at_reloadretaddr : Reg.t array (* Volatile registers: those that change value when read *) val regs_are_volatile: Reg.t array -> bool diff --git a/asmcomp/s390x/proc.ml b/asmcomp/s390x/proc.ml index 7a7ee2ab3fa5..9b359b190545 100644 --- a/asmcomp/s390x/proc.ml +++ b/asmcomp/s390x/proc.ml @@ -199,6 +199,10 @@ let destroyed_at_oper = function let destroyed_at_raise = all_phys_regs +(* %r14 is destroyed at [Lreloadretaddr], but %r14 is not used for register + allocation, and thus does not need to (and indeed cannot) occur here. *) +let destroyed_at_reloadretaddr = [| |] + (* Maximal register pressure *) let safe_register_pressure = function