moonpool/dev/ocaml/Simplify_common/index.html
2023-08-28 17:11:38 +00:00

28 lines
No EOL
7.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Simplify_common (ocaml.Simplify_common)</title><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../index.html">ocaml</a> &#x00BB; Simplify_common</nav><header class="odoc-preamble"><h1>Module <code><span>Simplify_common</span></code></h1><p><code>const_*_expr expr v annot</code>, where the expression <code>expr</code> is known to evaluate to the value <code>v</code>, attempt to produce a more simple expression together with its approximation and the benefit gained by replacing <code>expr</code> with this new expression. This simplification is only performed if <code>expr</code> is known to have no side effects. Otherwise, <code>expr</code> itself is returned, with an appropriate approximation but zero benefit.</p><p><code>const_boxed_int_expr</code> takes an additional argument specifying the kind of boxed integer to which the given expression evaluates.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-const_int_expr"><a href="#val-const_int_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_int_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span>int <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-const_char_expr"><a href="#val-const_char_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_char_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span>char <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-const_bool_expr"><a href="#val-const_bool_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_bool_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span>bool <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-const_float_expr"><a href="#val-const_float_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_float_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-const_boxed_int_expr"><a href="#val-const_boxed_int_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_boxed_int_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="type-var">'a</span> <a href="../Simple_value_approx/index.html#type-boxed_int">Simple_value_approx.boxed_int</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-const_integer_comparison_expr"><a href="#val-const_integer_comparison_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_integer_comparison_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../Lambda/index.html#type-integer_comparison">Lambda.integer_comparison</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-const_float_comparison_expr"><a href="#val-const_float_comparison_expr" class="anchor"></a><code><span><span class="keyword">val</span> const_float_comparison_expr :
<span><a href="../Flambda/index.html#type-named">Flambda.named</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../Lambda/index.html#type-float_comparison">Lambda.float_comparison</a> <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
<a href="../Flambda/index.html#type-named">Flambda.named</a> * <a href="../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> * <a href="../Inlining_cost/Benefit/index.html#type-t">Inlining_cost.Benefit.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-swap16"><a href="#val-swap16" class="anchor"></a><code><span><span class="keyword">val</span> swap16 : <span>int <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>Functions for transposing the order of bytes within words of various sizes.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-swap32"><a href="#val-swap32" class="anchor"></a><code><span><span class="keyword">val</span> swap32 : <span>int32 <span class="arrow">&#45;&gt;</span></span> int32</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-swap64"><a href="#val-swap64" class="anchor"></a><code><span><span class="keyword">val</span> swap64 : <span>int64 <span class="arrow">&#45;&gt;</span></span> int64</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-swapnative"><a href="#val-swapnative" class="anchor"></a><code><span><span class="keyword">val</span> swapnative : <span>nativeint <span class="arrow">&#45;&gt;</span></span> nativeint</span></code></div></div></div></body></html>