diff --git a/sledge/src/llair/frontend.ml b/sledge/src/llair/frontend.ml index 2f3064a6e..e2630974b 100644 --- a/sledge/src/llair/frontend.ml +++ b/sledge/src/llair/frontend.ml @@ -1362,6 +1362,12 @@ let transform : Llvm.llmodule -> unit = List.exists entry_points ~f:(String.equal fn) ) ; Llvm_ipo.add_global_dce pm ; Llvm_ipo.add_global_optimizer pm ; + Llvm_ipo.add_constant_merge pm ; + Llvm_ipo.add_argument_promotion pm ; + Llvm_ipo.add_ipsccp pm ; + Llvm_scalar_opts.add_memory_to_register_promotion pm ; + Llvm_ipo.add_global_dce pm ; + Llvm_ipo.add_dead_arg_elimination pm ; Llvm_scalar_opts.add_lower_atomic pm ; Llvm_scalar_opts.add_scalar_repl_aggregation pm ; Llvm_scalar_opts.add_scalarizer pm ; diff --git a/sledge/src/sledge_buck.ml b/sledge/src/sledge_buck.ml index c105af0d0..dbe681442 100644 --- a/sledge/src/sledge_buck.ml +++ b/sledge/src/sledge_buck.ml @@ -146,7 +146,9 @@ let llvm_link_opt ~lib_fuzzer_harness ~output modules = :: "-o=-" :: modules ) |- run (Lazy.force llvm_bin ^ "opt") - ["-o=" ^ output; "-globaldce"; "-globalopt"] ) + [ "-o=" ^ output; "-globaldce"; "-globalopt"; "-mergefunc" + ; "-constmerge"; "-argpromotion"; "-ipsccp"; "-mem2reg"; "-dce" + ; "-globaldce"; "-deadargelim" ] ) (** command line interface *)