aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Selectionaux.ml
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-06-06 19:15:37 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-06-06 19:15:37 +0200
commitf73c85e2b18017997c52a0d9478726d31a601669 (patch)
treed383b2f8a0b199f6f311e968063fbbbbc3c88ca3 /backend/Selectionaux.ml
parenteb175007959e7421a783d402bcbe255f456272f3 (diff)
parentddb2c968e6c57d2117434f169471d87f643d831a (diff)
downloadcompcert-kvx-f73c85e2b18017997c52a0d9478726d31a601669.tar.gz
compcert-kvx-f73c85e2b18017997c52a0d9478726d31a601669.zip
Merge branch 'master' of https://github.com/AbsInt/CompCert into mppa-work
Diffstat (limited to 'backend/Selectionaux.ml')
-rw-r--r--backend/Selectionaux.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/backend/Selectionaux.ml b/backend/Selectionaux.ml
index b25f1fa1..818660c1 100644
--- a/backend/Selectionaux.ml
+++ b/backend/Selectionaux.ml
@@ -96,8 +96,17 @@ If-conversion seems beneficial if:
Intuition: on a modern processor, the "then" and the "else" branches
can generally be computed in parallel, there is enough ILP for that.
So, the bad case is if the most taken branch is much cheaper than the
+<<<<<<< HEAD
other branch. Since our cost estimates are very imprecise, the
bound on the total cost acts as a safety guard,
+=======
+other branch. Another bad case is if both branches are big: since the
+code for one branch precedes entirely the code for the other branch,
+if the first branch contains a lot of instructions,
+dynamic reordering of instructions will not look ahead far enough
+to execute instructions from the other branch in parallel with
+instructions from the first branch.
+>>>>>>> ddb2c968e6c57d2117434f169471d87f643d831a
*)
let if_conversion_heuristic cond ifso ifnot ty =
@@ -105,5 +114,9 @@ let if_conversion_heuristic cond ifso ifnot ty =
if !Clflags.option_ffavor_branchless then true else
if not (fast_cmove ty) then false else
let c1 = cost_expr ifso and c2 = cost_expr ifnot in
+<<<<<<< HEAD
c1 + c2 <= 30 && abs (c1 - c2) <= 8
+=======
+ c1 + c2 <= 24 && abs (c1 - c2) <= 8
+>>>>>>> ddb2c968e6c57d2117434f169471d87f643d831a