From c0c3175bda80c25e6a355ced2e470f79d4e2fe70 Mon Sep 17 00:00:00 2001 From: Vijay Shanmugam Date: Thu, 16 May 2024 05:41:46 -0400 Subject: [PATCH 1/6] Add documentation. --- README.md | 2 +- lib/frontend/context.mli | 8 ++++++++ lib/ir/basic_block.mli | 5 +++++ lib/ir/id.mli | 1 + lib/ir/ir_sim.mli | 1 + lib/user/driver.mli | 16 ++++++++++++++-- 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01415e2..b6711ce 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ![CI Status](https://github.com/ethanuppal/cs3110_compiler/actions/workflows/ci.yaml/badge.svg) > "x86 is simple trust me bro" -> Last updated: 2024-05-16 03:05:51.632480 +> Last updated: 2024-05-16 05:39:35.670038 ``` $ ./main -h diff --git a/lib/frontend/context.mli b/lib/frontend/context.mli index 6b29cc9..7016bfd 100644 --- a/lib/frontend/context.mli +++ b/lib/frontend/context.mli @@ -36,6 +36,14 @@ val get_local : 'a t -> string -> 'a option a scope. Scopes that were pushed later are earlier in the result. *) val to_list : 'a t -> (string * 'a) list list +(** [add_namespace ctx name] adds a namespace [name] to the context [ctx]. + The namespace is added to the top of the namespace stack in the context. *) val add_namespace : 'a t -> string -> unit + +(** [pop_namespace ctx] pops the top namespace from the given context [ctx]. + It updates the namespace field of [ctx] by removing the first element. *) val pop_namespace : 'a t -> unit + +(** [in_namespace ctx symbol] returns the list of symbols in the namespace of [ctx] with [symbol] included. + The symbols are returned in reverse order. *) val in_namespace : 'a t -> string -> string list diff --git a/lib/ir/basic_block.mli b/lib/ir/basic_block.mli index 8df7094..f94043f 100644 --- a/lib/ir/basic_block.mli +++ b/lib/ir/basic_block.mli @@ -56,4 +56,9 @@ val equal : t -> t -> bool [bb1 = bb2]. *) val hash : t -> int +(** [to_string bb] returns a string representation of the basic block [bb]. + The string representation includes the label of the basic block, followed + by the string representation of each instruction in the basic block. + If the basic block has a branch condition, it is also included in the + string representation. *) val to_string : t -> string diff --git a/lib/ir/id.mli b/lib/ir/id.mli index 59e703a..8a3abf5 100644 --- a/lib/ir/id.mli +++ b/lib/ir/id.mli @@ -40,5 +40,6 @@ module Gen : sig generator; see [make]. *) val next : t -> id + (** [hard_reset ()] resets the global value to 0. *) val hard_reset : unit -> unit end diff --git a/lib/ir/ir_sim.mli b/lib/ir/ir_sim.mli index ae7cd86..07055d7 100644 --- a/lib/ir/ir_sim.mli +++ b/lib/ir/ir_sim.mli @@ -11,4 +11,5 @@ val run : t -> Cfg.t list -> unit human-readable string. *) val output_of : t -> string +(** [clear_output simulator] clears the output of the simulator. *) val clear_output : t -> unit diff --git a/lib/user/driver.mli b/lib/user/driver.mli index e1180aa..6fa3a9f 100644 --- a/lib/user/driver.mli +++ b/lib/user/driver.mli @@ -1,5 +1,17 @@ -(** [main argv] *) +(** [main argv] is the entry point of the program. + It takes in a string array [argv] and returns [unit]. + The function parses the command line arguments using [Cli.parse], + and then dispatches the appropriate action based on the parsed result. +*) val main : string array -> unit -(** [compile paths flags build_dir_loc] *) + +(** [compile paths flags build_dir_loc] compiles the given list of paths into an executable. + + [paths] is a list of file paths to be compiled. + [flags] is a list of compiler flags. + [build_dir_loc] is an optional build directory location. + + Raises [Failure] if the file extensions are not .x or .x86istmb. +*) val compile : string list -> Cli.flag list -> string option -> unit From abc089f827ee99782ca805654def335797071544 Mon Sep 17 00:00:00 2001 From: Vijay Shanmugam Date: Thu, 16 May 2024 06:11:25 -0400 Subject: [PATCH 2/6] Format code --- lib/frontend/context.mli | 12 ++++++------ lib/ir/basic_block.mli | 10 +++++----- lib/ir/map/variableMap.mli | 3 +-- lib/user/driver.mli | 21 +++++++++------------ 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/lib/frontend/context.mli b/lib/frontend/context.mli index 7016bfd..cd383ac 100644 --- a/lib/frontend/context.mli +++ b/lib/frontend/context.mli @@ -36,14 +36,14 @@ val get_local : 'a t -> string -> 'a option a scope. Scopes that were pushed later are earlier in the result. *) val to_list : 'a t -> (string * 'a) list list -(** [add_namespace ctx name] adds a namespace [name] to the context [ctx]. - The namespace is added to the top of the namespace stack in the context. *) +(** [add_namespace ctx name] adds a namespace [name] to the context [ctx]. The + namespace is added to the top of the namespace stack in the context. *) val add_namespace : 'a t -> string -> unit -(** [pop_namespace ctx] pops the top namespace from the given context [ctx]. - It updates the namespace field of [ctx] by removing the first element. *) +(** [pop_namespace ctx] pops the top namespace from the given context [ctx]. It + updates the namespace field of [ctx] by removing the first element. *) val pop_namespace : 'a t -> unit -(** [in_namespace ctx symbol] returns the list of symbols in the namespace of [ctx] with [symbol] included. - The symbols are returned in reverse order. *) +(** [in_namespace ctx symbol] returns the list of symbols in the namespace of + [ctx] with [symbol] included. The symbols are returned in reverse order. *) val in_namespace : 'a t -> string -> string list diff --git a/lib/ir/basic_block.mli b/lib/ir/basic_block.mli index f94043f..e0d0eac 100644 --- a/lib/ir/basic_block.mli +++ b/lib/ir/basic_block.mli @@ -56,9 +56,9 @@ val equal : t -> t -> bool [bb1 = bb2]. *) val hash : t -> int -(** [to_string bb] returns a string representation of the basic block [bb]. - The string representation includes the label of the basic block, followed - by the string representation of each instruction in the basic block. - If the basic block has a branch condition, it is also included in the - string representation. *) +(** [to_string bb] returns a string representation of the basic block [bb]. The + string representation includes the label of the basic block, followed by the + string representation of each instruction in the basic block. If the basic + block has a branch condition, it is also included in the string + representation. *) val to_string : t -> string diff --git a/lib/ir/map/variableMap.mli b/lib/ir/map/variableMap.mli index 51484f3..3b50d8a 100644 --- a/lib/ir/map/variableMap.mli +++ b/lib/ir/map/variableMap.mli @@ -1,2 +1 @@ - -include Hashtbl.S with type key = Variable.t \ No newline at end of file +include Hashtbl.S with type key = Variable.t diff --git a/lib/user/driver.mli b/lib/user/driver.mli index 6fa3a9f..218934c 100644 --- a/lib/user/driver.mli +++ b/lib/user/driver.mli @@ -1,17 +1,14 @@ -(** [main argv] is the entry point of the program. - It takes in a string array [argv] and returns [unit]. - The function parses the command line arguments using [Cli.parse], - and then dispatches the appropriate action based on the parsed result. -*) +(** [main argv] is the entry point of the program. It takes in a string array + [argv] and returns [unit]. The function parses the command line arguments + using [Cli.parse], and then dispatches the appropriate action based on the + parsed result. *) val main : string array -> unit +(** [compile paths flags build_dir_loc] compiles the given list of paths into an + executable. -(** [compile paths flags build_dir_loc] compiles the given list of paths into an executable. + [paths] is a list of file paths to be compiled. [flags] is a list of + compiler flags. [build_dir_loc] is an optional build directory location. - [paths] is a list of file paths to be compiled. - [flags] is a list of compiler flags. - [build_dir_loc] is an optional build directory location. - - Raises [Failure] if the file extensions are not .x or .x86istmb. -*) + Raises [Failure] if the file extensions are not .x or .x86istmb. *) val compile : string list -> Cli.flag list -> string option -> unit From c5c31002eb420fd47f696353581268483148e29f Mon Sep 17 00:00:00 2001 From: Vijay Shanmugam Date: Thu, 16 May 2024 06:28:10 -0400 Subject: [PATCH 3/6] Add multiplication to constant folding optimization --- README.md | 2 +- lib/ir/passes.ml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6711ce..5e9f235 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ![CI Status](https://github.com/ethanuppal/cs3110_compiler/actions/workflows/ci.yaml/badge.svg) > "x86 is simple trust me bro" -> Last updated: 2024-05-16 05:39:35.670038 +> Last updated: 2024-05-16 06:25:13.784820 ``` $ ./main -h diff --git a/lib/ir/passes.ml b/lib/ir/passes.ml index c3246ec..c316c15 100644 --- a/lib/ir/passes.ml +++ b/lib/ir/passes.ml @@ -8,6 +8,9 @@ module ConstFold : Pass.Sig = struct | Sub (var, Operand.Constant lhs, Operand.Constant rhs) -> Basic_block.set_ir bb i (Ir.Assign (var, Operand.make_const (lhs - rhs))) + | Mul (var, Operand.Constant lhs, Operand.Constant rhs) -> + Basic_block.set_ir bb i + (Ir.Assign (var, Operand.make_const (lhs * rhs))) | _ -> () done From 4752ab0496018cb5dde822aae7956fb60768a0c1 Mon Sep 17 00:00:00 2001 From: Vijay Shanmugam Date: Thu, 16 May 2024 07:10:19 -0400 Subject: [PATCH 4/6] Add integer multiplication optimization --- README.md | 2 +- lib/backend/asm.ml | 9 +++++++++ lib/backend/asm.mli | 3 +++ lib/backend/asm_emit.ml | 18 ++++++++++++++++++ lib/ir/ir.ml | 18 ++++++++++++++++++ lib/ir/ir.mli | 3 +++ lib/ir/ir_sim.ml | 12 ++++++++++++ lib/ir/passes.ml | 25 +++++++++++++++++++++++++ lib/ir/passes.mli | 5 +++++ lib/user/driver.ml | 2 +- 10 files changed, 95 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e9f235..af27b62 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ![CI Status](https://github.com/ethanuppal/cs3110_compiler/actions/workflows/ci.yaml/badge.svg) > "x86 is simple trust me bro" -> Last updated: 2024-05-16 06:25:13.784820 +> Last updated: 2024-05-16 07:02:45.331324 ``` $ ./main -h diff --git a/lib/backend/asm.ml b/lib/backend/asm.ml index 1174c8c..7c95ce9 100644 --- a/lib/backend/asm.ml +++ b/lib/backend/asm.ml @@ -106,6 +106,9 @@ module Instruction = struct | Syscall | Label of Label.t | DataBytes of int list + | Shl of Operand.t * Operand.t + | Shr of Operand.t * Operand.t + | Sar of Operand.t * Operand.t let to_nasm = function | Mov (op1, op2) -> @@ -131,6 +134,12 @@ module Instruction = struct | Label label -> Label.to_nasm label | DataBytes data -> "db " ^ (data |> List.map string_of_int |> String.concat ", ") + | Shl (op1, op2) -> + "shl " ^ Operand.to_nasm op1 ^ ", " ^ Operand.to_nasm op2 + | Shr (op1, op2) -> + "shr " ^ Operand.to_nasm op1 ^ ", " ^ Operand.to_nasm op2 + | Sar (op1, op2) -> + "sar " ^ Operand.to_nasm op1 ^ ", " ^ Operand.to_nasm op2 end module Section = struct diff --git a/lib/backend/asm.mli b/lib/backend/asm.mli index 83efedf..f9ec3b3 100644 --- a/lib/backend/asm.mli +++ b/lib/backend/asm.mli @@ -91,6 +91,9 @@ module Instruction : sig | Syscall | Label of Label.t | DataBytes of int list + | Shl of Operand.t * Operand.t + | Shr of Operand.t * Operand.t + | Sar of Operand.t * Operand.t (** [to_nasm instr] is the NASM representation of [instr]. *) val to_nasm : t -> string diff --git a/lib/backend/asm_emit.ml b/lib/backend/asm_emit.ml index 3c6427e..097c7e7 100644 --- a/lib/backend/asm_emit.ml +++ b/lib/backend/asm_emit.ml @@ -225,6 +225,24 @@ let emit_ir text_section data_section regalloc param_ctx = function Mov (emit_var regalloc var, emit_oper regalloc data_section op); IMul (emit_var regalloc var, emit_oper regalloc data_section op2); ] + | Shl (var, op, op2) -> + Asm.Section.add_all text_section + [ + Mov (emit_var regalloc var, emit_oper regalloc data_section op); + Shl (emit_var regalloc var, emit_oper regalloc data_section op2); + ] + | Shr (var, op, op2) -> + Asm.Section.add_all text_section + [ + Mov (emit_var regalloc var, emit_oper regalloc data_section op); + Shr (emit_var regalloc var, emit_oper regalloc data_section op2); + ] + | Sar (var, op, op2) -> + Asm.Section.add_all text_section + [ + Mov (emit_var regalloc var, emit_oper regalloc data_section op); + Sar (emit_var regalloc var, emit_oper regalloc data_section op2); + ] | Ref _ -> failwith "ref not impl" | Deref _ -> failwith "deref not impl" | DebugPrint op -> diff --git a/lib/ir/ir.ml b/lib/ir/ir.ml index 95c009c..fc24c50 100644 --- a/lib/ir/ir.ml +++ b/lib/ir/ir.ml @@ -3,6 +3,9 @@ type t = | Add of Variable.t * Operand.t * Operand.t | Sub of Variable.t * Operand.t * Operand.t | Mul of Variable.t * Operand.t * Operand.t + | Shl of Variable.t * Operand.t * Operand.t + | Shr of Variable.t * Operand.t * Operand.t + | Sar of Variable.t * Operand.t * Operand.t | Ref of Variable.t * Operand.t | Deref of Variable.t * Operand.t | TestEqual of Variable.t * Operand.t * Operand.t @@ -16,6 +19,9 @@ let kill_of = function | Add (var, _, _) | Sub (var, _, _) | Mul (var, _, _) + | Shl (var, _, _) + | Shr (var, _, _) + | Sar (var, _, _) | Ref (var, _) | Deref (var, _) | TestEqual (var, _, _) @@ -32,6 +38,9 @@ let gen_of = function | Add (_, op1, op2) | Sub (_, op1, op2) | Mul (_, op1, op2) + | Shl (_, op1, op2) + | Shr (_, op1, op2) + | Sar (_, op1, op2) | TestEqual (_, op1, op2) -> [ op1; op2 ] | Call (_, _, ops) -> ops | GetParam _ | Return None -> [] @@ -50,6 +59,15 @@ let to_string = | Mul (r, o1, o2) -> sprintf "%s = %s * %s" (Variable.to_string r) (Operand.to_string o1) (Operand.to_string o2) + | Shl (r, o1, o2) -> + sprintf "%s = %s << %s" (Variable.to_string r) (Operand.to_string o1) + (Operand.to_string o2) + | Shr (r, o1, o2) -> + sprintf "%s = %s >> %s" (Variable.to_string r) (Operand.to_string o1) + (Operand.to_string o2) + | Sar (r, o1, o2) -> + sprintf "%s = %s >> %s" (Variable.to_string r) (Operand.to_string o1) + (Operand.to_string o2) | Ref (r, o) -> sprintf "%s = &%s" (Variable.to_string r) (Operand.to_string o) | Deref (r, o) -> diff --git a/lib/ir/ir.mli b/lib/ir/ir.mli index f0b004e..1bc01fc 100644 --- a/lib/ir/ir.mli +++ b/lib/ir/ir.mli @@ -4,6 +4,9 @@ type t = | Add of Variable.t * Operand.t * Operand.t | Sub of Variable.t * Operand.t * Operand.t | Mul of Variable.t * Operand.t * Operand.t + | Shl of Variable.t * Operand.t * Operand.t + | Shr of Variable.t * Operand.t * Operand.t + | Sar of Variable.t * Operand.t * Operand.t | Ref of Variable.t * Operand.t | Deref of Variable.t * Operand.t | TestEqual of Variable.t * Operand.t * Operand.t diff --git a/lib/ir/ir_sim.ml b/lib/ir/ir_sim.ml index 74e35c3..d2cc788 100644 --- a/lib/ir/ir_sim.ml +++ b/lib/ir/ir_sim.ml @@ -59,6 +59,18 @@ let rec run_cfg simulator cfgs cfg = Context.insert simulator.context (Variable.to_string var) (Left (eval_int oper1 * eval_int oper2)); false + | Ir.Shl (var, oper1, oper2) -> + Context.insert simulator.context (Variable.to_string var) + (Left (eval_int oper1 lsl eval_int oper2)); + false + | Ir.Shr (var, oper1, oper2) -> + Context.insert simulator.context (Variable.to_string var) + (Left (eval_int oper1 lsr eval_int oper2)); + false + | Ir.Sar (var, oper1, oper2) -> + Context.insert simulator.context (Variable.to_string var) + (Left (eval_int oper1 asr eval_int oper2)); + false | Ir.TestEqual (var, oper1, oper2) -> Context.insert simulator.context (Variable.to_string var) (if eval oper1 = eval oper2 then Left 1 else Left 0); diff --git a/lib/ir/passes.ml b/lib/ir/passes.ml index c316c15..778c0a5 100644 --- a/lib/ir/passes.ml +++ b/lib/ir/passes.ml @@ -65,6 +65,31 @@ module DeadCode : Pass.Sig = struct let pass = Pass.make dead_code end +module IntMult : Pass.Sig = struct + let is_power_of_two x = + (x > 0) && (x land (x - 1) = 0) + + let log2 x = + let rec aux n acc = + if acc >= x then n + else aux (n + 1) (acc * 2) + in + aux 0 1 + + let int_mult (bb, _) = + for i = 0 to Basic_block.length_of bb - 1 do + match Basic_block.get_ir bb i with + | Mul (var, Operand.Constant lhs, Operand.Variable rhs) + | Mul (var, Operand.Variable rhs, Operand.Constant lhs) when is_power_of_two lhs -> + let shift_amount = log2 lhs in + Basic_block.set_ir bb i + (Ir.Shl (var, Operand.Variable rhs, Operand.Constant shift_amount)) + | _ -> () + done + + let pass = Pass.make int_mult +end + let apply passes cfg liveliness = let apply_pass pass bb = Pass.execute pass bb (IdMap.find liveliness (Basic_block.id_of bb)) diff --git a/lib/ir/passes.mli b/lib/ir/passes.mli index ce80db3..ca89fbb 100644 --- a/lib/ir/passes.mli +++ b/lib/ir/passes.mli @@ -7,6 +7,11 @@ module CopyProp : Pass.Sig (** Dead code elimination optimization pass. *) module DeadCode : Pass.Sig +(** Integer multiplication optimization pass. *) +module IntMult : Pass.Sig + +(** Liveness analysis pass. *) + (** [apply passes cfg liveliness] applies each pass in [passes] to [cfg] in order, using the liveliness information for [cfg] ([liveliness]). diff --git a/lib/user/driver.ml b/lib/user/driver.ml index 3fe418b..2280033 100644 --- a/lib/user/driver.ml +++ b/lib/user/driver.ml @@ -54,7 +54,7 @@ let compile paths flags build_dir_loc = Passes.apply [ Passes.DeadCode.pass; - Pass.sequence Passes.CopyProp.pass Passes.ConstFold.pass + Pass.combine [Passes.CopyProp.pass; Passes.ConstFold.pass; Passes.IntMult.pass] |> Pass.repeat 10; ] cfg liveliness_analysis; From 68ad3b32639cb3d32badb0884863f539fdf0fed3 Mon Sep 17 00:00:00 2001 From: Vijay Shanmugam Date: Thu, 16 May 2024 09:59:53 -0400 Subject: [PATCH 5/6] Add int_mult opt to test cases --- README.md | 2 +- test/test_passes.ml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af27b62..71cb434 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ![CI Status](https://github.com/ethanuppal/cs3110_compiler/actions/workflows/ci.yaml/badge.svg) > "x86 is simple trust me bro" -> Last updated: 2024-05-16 07:02:45.331324 +> Last updated: 2024-05-16 09:59:47.289578 ``` $ ./main -h diff --git a/test/test_passes.ml b/test/test_passes.ml index ddc605f..2b1fafe 100644 --- a/test/test_passes.ml +++ b/test/test_passes.ml @@ -26,9 +26,10 @@ let fixed_ir_opts_tests = ([ Passes.ConstFold.pass ], "const fold ir opt"); ([ Passes.CopyProp.pass ], "copy prop ir opt"); ([ Passes.DeadCode.pass ], "dead code ir opt"); + ([ Passes.IntMult.pass ], "int mult ir opt"); ( [ Pass.combine - [ Passes.ConstFold.pass; Passes.CopyProp.pass; Passes.DeadCode.pass ]; + [ Passes.ConstFold.pass; Passes.CopyProp.pass; Passes.DeadCode.pass ; Passes.IntMult.pass ]; ], "combined ir opt" ); ( [ From c8e9d08c4b26d4f3b012ceefaf7c1c92163235f9 Mon Sep 17 00:00:00 2001 From: Vijay Shanmugam Date: Thu, 16 May 2024 10:00:28 -0400 Subject: [PATCH 6/6] Format code --- lib/ir/passes.ml | 15 ++++++--------- lib/user/driver.ml | 7 ++++++- test/test_passes.ml | 7 ++++++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/lib/ir/passes.ml b/lib/ir/passes.ml index 778c0a5..042765d 100644 --- a/lib/ir/passes.ml +++ b/lib/ir/passes.ml @@ -9,8 +9,8 @@ module ConstFold : Pass.Sig = struct Basic_block.set_ir bb i (Ir.Assign (var, Operand.make_const (lhs - rhs))) | Mul (var, Operand.Constant lhs, Operand.Constant rhs) -> - Basic_block.set_ir bb i - (Ir.Assign (var, Operand.make_const (lhs * rhs))) + Basic_block.set_ir bb i + (Ir.Assign (var, Operand.make_const (lhs * rhs))) | _ -> () done @@ -66,21 +66,18 @@ module DeadCode : Pass.Sig = struct end module IntMult : Pass.Sig = struct - let is_power_of_two x = - (x > 0) && (x land (x - 1) = 0) + let is_power_of_two x = x > 0 && x land (x - 1) = 0 let log2 x = - let rec aux n acc = - if acc >= x then n - else aux (n + 1) (acc * 2) - in + let rec aux n acc = if acc >= x then n else aux (n + 1) (acc * 2) in aux 0 1 let int_mult (bb, _) = for i = 0 to Basic_block.length_of bb - 1 do match Basic_block.get_ir bb i with | Mul (var, Operand.Constant lhs, Operand.Variable rhs) - | Mul (var, Operand.Variable rhs, Operand.Constant lhs) when is_power_of_two lhs -> + | Mul (var, Operand.Variable rhs, Operand.Constant lhs) + when is_power_of_two lhs -> let shift_amount = log2 lhs in Basic_block.set_ir bb i (Ir.Shl (var, Operand.Variable rhs, Operand.Constant shift_amount)) diff --git a/lib/user/driver.ml b/lib/user/driver.ml index 2280033..bad5970 100644 --- a/lib/user/driver.ml +++ b/lib/user/driver.ml @@ -54,7 +54,12 @@ let compile paths flags build_dir_loc = Passes.apply [ Passes.DeadCode.pass; - Pass.combine [Passes.CopyProp.pass; Passes.ConstFold.pass; Passes.IntMult.pass] + Pass.combine + [ + Passes.CopyProp.pass; + Passes.ConstFold.pass; + Passes.IntMult.pass; + ] |> Pass.repeat 10; ] cfg liveliness_analysis; diff --git a/test/test_passes.ml b/test/test_passes.ml index 2b1fafe..7d2fb84 100644 --- a/test/test_passes.ml +++ b/test/test_passes.ml @@ -29,7 +29,12 @@ let fixed_ir_opts_tests = ([ Passes.IntMult.pass ], "int mult ir opt"); ( [ Pass.combine - [ Passes.ConstFold.pass; Passes.CopyProp.pass; Passes.DeadCode.pass ; Passes.IntMult.pass ]; + [ + Passes.ConstFold.pass; + Passes.CopyProp.pass; + Passes.DeadCode.pass; + Passes.IntMult.pass; + ]; ], "combined ir opt" ); ( [