llvm.org GIT mirror llvm / 3abdcf6
Merge 81800 from mainline. Expose initializing the native target for the execution engine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@81975 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 9 years ago
7 changed file(s) with 20 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2323 #include
2424 #include
2525
26 /* Force the LLVM interpreter, JIT, and native target to be linked in. */
26 /* Force the LLVM interpreter and JIT to be linked in. */
2727 void llvm_initialize(void) {
2828 LLVMLinkInInterpreter();
2929 LLVMLinkInJIT();
30 LLVMInitializeNativeTarget();
30 }
31
32 /* unit -> bool */
33 CAMLprim value llvm_initialize_native_target(value Unit) {
34 return Val_bool(LLVMInitializeNativeTarget());
3135 }
3236
3337 /* Can't use the recommended caml_named_value mechanism for backwards
108108
109109 *)
110110 end
111
112 external initialize_native_target : unit -> bool
113 = "llvm_initialize_native_target"
160160 [ee]. *)
161161 val target_data: t -> Llvm_target.TargetData.t
162162 end
163
164 external initialize_native_target : unit -> bool
165 = "llvm_initialize_native_target"
961961 open Llvm_scalar_opts
962962
963963 let main () =
964 ignore (initialize_native_target ());
965
964966 (* Install standard binary operators.
965967 * 1 is the lowest precedence. *)
966968 Hashtbl.add Parser.binop_precedence '<' 10;
14861486 open Llvm_scalar_opts
14871487
14881488 let main () =
1489 ignore (initialize_native_target ());
1490
14891491 (* Install standard binary operators.
14901492 * 1 is the lowest precedence. *)
14911493 Hashtbl.add Parser.binop_precedence '<' 10;
14851485 open Llvm_scalar_opts
14861486
14871487 let main () =
1488 ignore (initialize_native_target ());
1489
14881490 (* Install standard binary operators.
14891491 * 1 is the lowest precedence. *)
14901492 Hashtbl.add Parser.binop_precedence '<' 10;
18151815 open Llvm_scalar_opts
18161816
18171817 let main () =
1818 ignore (initialize_native_target ());
1819
18181820 (* Install standard binary operators.
18191821 * 1 is the lowest precedence. *)
18201822 Hashtbl.add Parser.binop_precedence '=' 2;