aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aarch64/PrepassSchedulingOracle.ml18
1 files changed, 16 insertions, 2 deletions
diff --git a/aarch64/PrepassSchedulingOracle.ml b/aarch64/PrepassSchedulingOracle.ml
index 49e4870c..db62287d 100644
--- a/aarch64/PrepassSchedulingOracle.ml
+++ b/aarch64/PrepassSchedulingOracle.ml
@@ -455,6 +455,18 @@ let get_fake_deps_liveness (opweights : opweights) (seqa : (instruction*Regset.t
end;
last_mem_reads := i :: !last_mem_reads
end
+ and add_input_mem_formality i =
+ if not (use_alias_analysis ())
+ then
+ begin
+ begin
+ (* Read after write *)
+ match !last_mem_write with
+ | None -> ()
+ | Some j -> add_constraint j i 0
+ end;
+ last_mem_reads := i :: !last_mem_reads
+ end
and add_output_mem i =
if not (use_alias_analysis ())
then
@@ -588,7 +600,7 @@ let get_fake_deps_liveness (opweights : opweights) (seqa : (instruction*Regset.t
failwith "Ibuiltin"
| Icond(cond, inputs, _, _, _) ->
set_branch i;
- add_input_mem i;
+ add_input_mem_formality i;
add_input_regs i inputs
| Ijumptable(input, _) ->
set_branch i;
@@ -647,7 +659,9 @@ let get_fake_deps_liveness_stores (opweights : opweights) (seqa : (instruction*R
if not (use_alias_analysis ())
then
begin
- List.iter (fun j -> add_constraint j i 1) !writes_to_commit;
+ (* cf. add_input_mem_formality *)
+ (* We can compensate for movement across a single branch, but not two. *)
+ List.iter (fun j -> add_constraint j i 0) !writes_to_commit;
writes_to_commit := !last_mem_writes;
last_mem_writes := (match !last_mem_writes with
| [] -> []