aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Fasse <justus.fasse@etu.univ-grenoble-alpes.fr>2021-08-03 22:05:18 +0200
committerJustus Fasse <justus.fasse@etu.univ-grenoble-alpes.fr>2021-08-03 22:05:18 +0200
commitecede419bff836a6ceefed2b76913fa773ffbdbc (patch)
tree3dac335c5e7bcdbcab51a0cefda05f35f8b22ff2
parent2a0892228575205d5596224c7d73d03e9a3795c6 (diff)
downloadcompcert-kvx-ecede419bff836a6ceefed2b76913fa773ffbdbc.tar.gz
compcert-kvx-ecede419bff836a6ceefed2b76913fa773ffbdbc.zip
Add explanatory comment why some registers are not renamed
-rw-r--r--scheduling/MyRTLpathScheduleraux.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/scheduling/MyRTLpathScheduleraux.ml b/scheduling/MyRTLpathScheduleraux.ml
index 5663c877..b2892213 100644
--- a/scheduling/MyRTLpathScheduleraux.ml
+++ b/scheduling/MyRTLpathScheduleraux.ml
@@ -92,7 +92,10 @@ let maybe_change_dest_reg ?only_rename inst fwmap ~next_free_reg =
| Ibuiltin _
| Ijumptable _
| Itailcall _
- | Ireturn _ -> do_nothing
+ | Ireturn _ ->
+ (* Do not rename registers if the instructions MUST end a path because we cannot add
+ * restoration code afterwards. *)
+ do_nothing
| _ as i ->
match RTL.instr_defs i with
| None -> do_nothing