summaryrefslogtreecommitdiff
path: root/backend/CSE.v
diff options
context:
space:
mode:
Diffstat (limited to 'backend/CSE.v')
-rw-r--r--backend/CSE.v19
1 files changed, 5 insertions, 14 deletions
diff --git a/backend/CSE.v b/backend/CSE.v
index dab8fc3..4347c33 100644
--- a/backend/CSE.v
+++ b/backend/CSE.v
@@ -375,23 +375,14 @@ Definition analyze (f: RTL.function): PMap.t numbering :=
(** * Code transformation *)
-(** Some operations are so cheap to compute that it is generally not
- worth reusing their results. These operations are detected by the
- function below. *)
-
-Definition is_trivial_op (op: operation) : bool :=
- match op with
- | Omove => true
- | Ointconst _ => true
- | Oaddrsymbol _ _ => true
- | Oaddrstack _ => true
- | _ => false
- end.
-
(** The code transformation is performed instruction by instruction.
[Iload] instructions and non-trivial [Iop] instructions are turned
into move instructions if their result is already available in a
- register, as indicated by the numbering inferred at that program point. *)
+ register, as indicated by the numbering inferred at that program point.
+
+ Some operations are so cheap to compute that it is generally not
+ worth reusing their results. These operations are detected by the
+ function [is_trivial_op] in module [Op]. *)
Definition transf_instr (n: numbering) (instr: instruction) :=
match instr with