Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 4d5fd5e9f982c94041a12db02748e9a9 > files > 199

llvm-doc-3.1-2.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Llvm_executionengine.GenericValue.html">
<link rel="Up" href="Llvm_executionengine.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Llvm" rel="Chapter" href="Llvm.html">
<link title="Llvm_analysis" rel="Chapter" href="Llvm_analysis.html">
<link title="Llvm_bitreader" rel="Chapter" href="Llvm_bitreader.html">
<link title="Llvm_bitwriter" rel="Chapter" href="Llvm_bitwriter.html">
<link title="Llvm_executionengine" rel="Chapter" href="Llvm_executionengine.html">
<link title="Llvm_ipo" rel="Chapter" href="Llvm_ipo.html">
<link title="Llvm_scalar_opts" rel="Chapter" href="Llvm_scalar_opts.html">
<link title="Llvm_target" rel="Chapter" href="Llvm_target.html"><title>Llvm_executionengine.ExecutionEngine</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Llvm_executionengine.GenericValue.html" title="Llvm_executionengine.GenericValue">Previous</a>
&nbsp;<a class="up" href="Llvm_executionengine.html" title="Llvm_executionengine">Up</a>
&nbsp;</div>
<h1>Module <a href="type_Llvm_executionengine.ExecutionEngine.html">Llvm_executionengine.ExecutionEngine</a></h1>
<pre><span class="keyword">module</span> ExecutionEngine: <code class="code"><span class="keyword">sig</span></code> <a href="Llvm_executionengine.ExecutionEngine.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info">
An execution engine is either a JIT compiler or an interpreter, capable of
      directly loading an LLVM module and executing its functions without first
      invoking a static compiler and generating a native executable.<br>
</div>

<pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type"><a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">create m</code> creates a new execution engine, taking ownership of the
      module <code class="code">m</code> if successful. Creates a JIT if possible, else falls back to an
      interpreter. Raises <code class="code"><span class="constructor">Error</span> msg</code> if an error occurrs. The execution engine
      is not garbage collected and must be destroyed with <code class="code">dispose ee</code>.
      See the function <code class="code">llvm::<span class="constructor">EngineBuilder</span>::create</code>.<br>
</div>
<pre><span id="VALcreate_interpreter"><span class="keyword">val</span> create_interpreter</span> : <code class="type"><a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">create_interpreter m</code> creates a new interpreter, taking ownership of the
      module <code class="code">m</code> if successful. Raises <code class="code"><span class="constructor">Error</span> msg</code> if an error occurrs. The
      execution engine is not garbage collected and must be destroyed with
      <code class="code">dispose ee</code>.
      See the function <code class="code">llvm::<span class="constructor">EngineBuilder</span>::create</code>.<br>
</div>
<pre><span id="VALcreate_jit"><span class="keyword">val</span> create_jit</span> : <code class="type"><a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> int -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">create_jit m optlevel</code> creates a new JIT (just-in-time compiler), taking
      ownership of the module <code class="code">m</code> if successful with the desired optimization
      level <code class="code">optlevel</code>. Raises <code class="code"><span class="constructor">Error</span> msg</code> if an error occurrs. The execution
      engine is not garbage collected and must be destroyed with <code class="code">dispose ee</code>.
      See the function <code class="code">llvm::<span class="constructor">EngineBuilder</span>::create</code>.<br>
</div>
<pre><span id="VALdispose"><span class="keyword">val</span> dispose</span> : <code class="type"><a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">dispose ee</code> releases the memory used by the execution engine and must be
      invoked to avoid memory leaks.<br>
</div>
<pre><span id="VALadd_module"><span class="keyword">val</span> add_module</span> : <code class="type"><a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">add_module m ee</code> adds the module <code class="code">m</code> to the execution engine <code class="code">ee</code>.<br>
</div>
<pre><span id="VALremove_module"><span class="keyword">val</span> remove_module</span> : <code class="type"><a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> <a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a></code></pre><div class="info">
<code class="code">remove_module m ee</code> removes the module <code class="code">m</code> from the execution engine
      <code class="code">ee</code>, disposing of <code class="code">m</code> and the module referenced by <code class="code">mp</code>. Raises
      <code class="code"><span class="constructor">Error</span> msg</code> if an error occurs.<br>
</div>
<pre><span id="VALfind_function"><span class="keyword">val</span> find_function</span> : <code class="type">string -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> <a href="Llvm.html#TYPEllvalue">Llvm.llvalue</a> option</code></pre><div class="info">
<code class="code">find_function n ee</code> finds the function named <code class="code">n</code> defined in any of the
      modules owned by the execution engine <code class="code">ee</code>. Returns <code class="code"><span class="constructor">None</span></code> if the function
      is not found and <code class="code"><span class="constructor">Some</span> f</code> otherwise.<br>
</div>
<pre><span id="VALrun_function"><span class="keyword">val</span> run_function</span> : <code class="type"><a href="Llvm.html#TYPEllvalue">Llvm.llvalue</a> -><br>       <a href="Llvm_executionengine.GenericValue.html#TYPEt">Llvm_executionengine.GenericValue.t</a> array -><br>       <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> <a href="Llvm_executionengine.GenericValue.html#TYPEt">Llvm_executionengine.GenericValue.t</a></code></pre><div class="info">
<code class="code">run_function f args ee</code> synchronously executes the function <code class="code">f</code> with the
      arguments <code class="code">args</code>, which must be compatible with the parameter types.<br>
</div>
<pre><span id="VALrun_static_ctors"><span class="keyword">val</span> run_static_ctors</span> : <code class="type"><a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">run_static_ctors ee</code> executes the static constructors of each module in
      the execution engine <code class="code">ee</code>.<br>
</div>
<pre><span id="VALrun_static_dtors"><span class="keyword">val</span> run_static_dtors</span> : <code class="type"><a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">run_static_dtors ee</code> executes the static destructors of each module in
      the execution engine <code class="code">ee</code>.<br>
</div>
<pre><span id="VALrun_function_as_main"><span class="keyword">val</span> run_function_as_main</span> : <code class="type"><a href="Llvm.html#TYPEllvalue">Llvm.llvalue</a> -><br>       string array -><br>       (string * string) array -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> int</code></pre><div class="info">
<code class="code">run_function_as_main f args env ee</code> executes the function <code class="code">f</code> as a main
      function, passing it <code class="code">argv</code> and <code class="code">argc</code> according to the string array
      <code class="code">args</code>, and <code class="code">envp</code> as specified by the array <code class="code">env</code>. Returns the integer
      return value of the function.<br>
</div>
<pre><span id="VALfree_machine_code"><span class="keyword">val</span> free_machine_code</span> : <code class="type"><a href="Llvm.html#TYPEllvalue">Llvm.llvalue</a> -> <a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">free_machine_code f ee</code> releases the memory in the execution engine <code class="code">ee</code>
      used to store the machine code for the function <code class="code">f</code>.<br>
</div>
<pre><span id="VALtarget_data"><span class="keyword">val</span> target_data</span> : <code class="type"><a href="Llvm_executionengine.ExecutionEngine.html#TYPEt">t</a> -> <a href="Llvm_target.TargetData.html#TYPEt">Llvm_target.TargetData.t</a></code></pre><div class="info">
<code class="code">target_data ee</code> is the target data owned by the execution engine
      <code class="code">ee</code>.<br>
</div>
</body></html>