aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Fasse <justus.fasse@etu.univ-grenoble-alpes.fr>2021-07-29 13:22:57 +0200
committerJustus Fasse <justus.fasse@etu.univ-grenoble-alpes.fr>2021-07-29 13:25:18 +0200
commit963a57be0ce0eb0f6e1aa3d2f0f80fe9fa9e0f67 (patch)
tree5fde05b018ab5db412ebb95166b827c8e908b828
parent3fea40407102f7400b6a8ff25891f63a1e01b9ff (diff)
downloadcompcert-kvx-963a57be0ce0eb0f6e1aa3d2f0f80fe9fa9e0f67.tar.gz
compcert-kvx-963a57be0ce0eb0f6e1aa3d2f0f80fe9fa9e0f67.zip
Do not virtually insert the final restoration code before applying the
code motion past side exits heuristic. Now, that code may be moved past the final Icond, it it is movable, the previous (deleted with this commit) approach is no longer correct. The code-to-be-inserted may contain the imaginary final restoration code which does not exist (yet) outside of this function. Instead, the final restoration code should (optionally?) be inserted before calling this function.
-rw-r--r--scheduling/MyRTLpathScheduleraux.ml18
1 files changed, 0 insertions, 18 deletions
diff --git a/scheduling/MyRTLpathScheduleraux.ml b/scheduling/MyRTLpathScheduleraux.ml
index ebcbfe16..79a6ae64 100644
--- a/scheduling/MyRTLpathScheduleraux.ml
+++ b/scheduling/MyRTLpathScheduleraux.ml
@@ -746,24 +746,6 @@ let downschedule_compensation_code sb code pm live_renames ~next_free_pc ~next_f
* does not propose moving memory writes below side-exits. *)
let old_debug_flag = !debug_flag in
- let orig_sb = sb in
- let orig_sb_length = Array.length orig_sb.instructions in
- let final_restoration_insts =
- let final_restoration = ptree_get_or_default live_renames orig_sb.instructions.(orig_sb_length - 1) [] in
- let insts_map = restoration_instructions (PTree.set orig_sb.instructions.(orig_sb_length - 1) final_restoration PTree.empty) in
- get_some @@ InsertPositionMap.find_opt (InsertPosition.Above orig_sb.instructions.(orig_sb_length - 1)) insts_map
- in
- (* Run the scheduling heuristic with the final restoration code to hopefully get a better estimate
- * This cannot disturb the code to-be-inserted since the restoration code is already in
- * last basic block of the superblock and can therefore not move lower. *)
- (* XXX: THIS IS NO LONGER TRUE *)
- let (sb, code, pm, _next_free_pc) =
- insert_code
- sb code pm
- (InsertPositionMap.add (InsertPosition.Above sb.instructions.(orig_sb_length - 1)) final_restoration_insts InsertPositionMap.empty)
- ~next_free_pc
- in
-
let idealized_schedule_opt = match !Clflags.option_prepass_past_side_exits_sched with
| "move_stores" -> ideal_schedule' sb code ~next_free_reg
| "no_move_stores" -> ideal_schedule sb code