diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /docs/tutorial/OCamlLangImpl5.html | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'docs/tutorial/OCamlLangImpl5.html')
-rw-r--r-- | docs/tutorial/OCamlLangImpl5.html | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/tutorial/OCamlLangImpl5.html b/docs/tutorial/OCamlLangImpl5.html index 594a77d..f19e900 100644 --- a/docs/tutorial/OCamlLangImpl5.html +++ b/docs/tutorial/OCamlLangImpl5.html @@ -271,8 +271,8 @@ into "t.ll" and run "<tt>llvm-as < t.ll | opt -analyze -view-cfg</tt>", <a href="../ProgrammersManual.html#ViewGraph">a window will pop up</a> and you'll see this graph:</p> -<center><img src="LangImpl5-cfg.png" alt="Example CFG" width="423" -height="315"></center> +<div style="text-align: center"><img src="LangImpl5-cfg.png" alt="Example CFG" width="423" +height="315"></div> <p>Another way to get this is to call "<tt>Llvm_analysis.view_function_cfg f</tt>" or "<tt>Llvm_analysis.view_function_cfg_only f</tt>" (where <tt>f</tt> @@ -1200,8 +1200,9 @@ open Llvm exception Error of string -let the_module = create_module "my cool jit" -let builder = builder () +let context = global_context () +let the_module = create_module context "my cool jit" +let builder = builder context let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10 let rec codegen_expr = function @@ -1486,6 +1487,8 @@ open Llvm_target open Llvm_scalar_opts let main () = + ignore (initialize_native_target ()); + (* Install standard binary operators. * 1 is the lowest precedence. *) Hashtbl.add Parser.binop_precedence '<' 10; @@ -1518,6 +1521,8 @@ let main () = (* Simplify the control flow graph (deleting unreachable blocks, etc). *) add_cfg_simplification the_fpm; + ignore (PassManager.initialize the_fpm); + (* Run the main "interpreter loop" now. *) Toplevel.main_loop the_fpm the_execution_engine stream; |