diff --git a/sledge/src/llair/dune.in b/sledge/src/llair/dune.in index 72cc05913..9597a3cef 100644 --- a/sledge/src/llair/dune.in +++ b/sledge/src/llair/dune.in @@ -16,7 +16,7 @@ Jbuild_plugin.V1.send (name llair_) (public_name llair) %s - (libraries ctypes ctypes.foreign llvm llvm.irreader llvm.analysis llvm.scalar_opts llvm.target %s)) + (libraries ctypes ctypes.foreign llvm llvm.irreader llvm.analysis llvm.scalar_opts llvm.target llvm.ipo %s)) |} (flags `lib deps) (libraries deps) diff --git a/sledge/src/llair/frontend.ml b/sledge/src/llair/frontend.ml index fbbd16248..ddc1a29e8 100644 --- a/sledge/src/llair/frontend.ml +++ b/sledge/src/llair/frontend.ml @@ -1335,6 +1335,7 @@ let xlate_function : x -> Llvm.llvalue -> Llair.func = let transform : Llvm.llmodule -> unit = fun llmodule -> let pm = Llvm.PassManager.create () in + Llvm_ipo.add_global_dce pm ; Llvm_scalar_opts.add_lower_atomic pm ; Llvm_scalar_opts.add_scalar_repl_aggregation pm ; Llvm_scalar_opts.add_scalarizer pm ;