[sledge] Update frontend to upstreamed LLVM OCaml api

Reviewed By: mbouaziz

Differential Revision: D15098818

fbshipit-source-id: da896415e
master
Josh Berdine 6 years ago committed by Facebook Github Bot
parent bf7ce6f117
commit 564bd344fc

@ -31,16 +31,16 @@ let (scan_locs : Llvm.llmodule -> unit), (find_loc : Llvm.llvalue -> Loc.t)
= =
let loc_of_global g = let loc_of_global g =
Loc.mk Loc.mk
?dir:(Llvm.get_global_debug_loc_directory g) ?dir:(Llvm.get_debug_loc_directory g)
?file:(Llvm.get_global_debug_loc_filename g) ?file:(Llvm.get_debug_loc_filename g)
~line:(Llvm.get_global_debug_loc_line g) ~line:(Llvm.get_debug_loc_line g)
?col:None ?col:None
in in
let loc_of_function f = let loc_of_function f =
Loc.mk Loc.mk
?dir:(Llvm.get_function_debug_loc_directory f) ?dir:(Llvm.get_debug_loc_directory f)
?file:(Llvm.get_function_debug_loc_filename f) ?file:(Llvm.get_debug_loc_filename f)
~line:(Llvm.get_function_debug_loc_line f) ~line:(Llvm.get_debug_loc_line f)
?col:None ?col:None
in in
let loc_of_instr i = let loc_of_instr i =
@ -1311,7 +1311,7 @@ let transform : Llvm.llmodule -> unit =
Llvm_scalar_opts.add_lower_atomic pm ; Llvm_scalar_opts.add_lower_atomic pm ;
Llvm_scalar_opts.add_scalar_repl_aggregation pm ; Llvm_scalar_opts.add_scalar_repl_aggregation pm ;
Llvm_scalar_opts.add_scalarizer pm ; Llvm_scalar_opts.add_scalarizer pm ;
Llvm_scalar_opts.add_merge_return pm ; Llvm_scalar_opts.add_unify_function_exit_nodes pm ;
Llvm_scalar_opts.add_cfg_simplification pm ; Llvm_scalar_opts.add_cfg_simplification pm ;
Llvm.PassManager.run_module llmodule pm |> (ignore : bool -> _) ; Llvm.PassManager.run_module llmodule pm |> (ignore : bool -> _) ;
Llvm.PassManager.dispose pm Llvm.PassManager.dispose pm

Loading…
Cancel
Save