wasmer/rustdoc/cranelift_codegen/ir/dfg/struct.DataFlowGraph.html

182 lines
84 KiB
HTML
Raw Normal View History

2019-09-06 15:57:44 -07:00
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `DataFlowGraph` struct in crate `cranelift_codegen`."><meta name="keywords" content="rust, rustlang, rust-lang, DataFlowGraph"><title>cranelift_codegen::ir::dfg::DataFlowGraph - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../cranelift_codegen/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct DataFlowGraph</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.value_lists">value_lists</a><a href="#structfield.signatures">signatures</a><a href="#structfield.ext_funcs">ext_funcs</a><a href="#structfield.values_labels">values_labels</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.analyze_branch">analyze_branch</a><a href="#method.append_ebb_param">append_ebb_param</a><a href="#method.append_ebb_param_for_parser">append_ebb_param_for_parser</a><a href="#method.append_inst_arg">append_inst_arg</a><a href="#method.append_result">append_result</a><a href="#method.attach_ebb_param">attach_ebb_param</a><a href="#method.attach_result">attach_result</a><a href="#method.call_signature">call_signature</a><a href="#method.change_to_alias">change_to_alias</a><a href="#method.clear">clear</a><a href="#method.clear_results">clear_results</a><a href="#method.collect_debug_info">collect_debug_info</a><a href="#method.compute_result_type">compute_result_type</a><a href="#method.ctrl_typevar">ctrl_typevar</a><a href="#method.detach_ebb_params">detach_ebb_params</a><a href="#method.detach_results">detach_results</a><a href="#method.display_inst">display_inst</a><a href="#method.ebb_is_valid">ebb_is_valid</a><a href="#method.ebb_params">ebb_params</a><a href="#method.first_result">first_result</a><a href="#method.has_results">has_results</a><a href="#method.inst_args">inst_args</a><a href="#method.inst_args_mut">inst_args_mut</a><a href="#method.inst_fixed_args">inst_fixed_args</a><a href="#method.inst_fixed_args_mut">inst_fixed_args_mut</a><a href="#method.inst_is_valid">inst_is_valid</a><a href="#method.inst_results">inst_results</a><a href="#method.inst_variable_args">inst_variable_args</a><a href="#method.inst_variable_args_mut">inst_variable_args_mut</a><a href="#method.make_ebb">make_ebb</a><a href="#method.make_inst">make_inst</a><a href="#method.make_inst_results">make_inst_results</a><a href="#method.make_inst_results_for_parser">make_inst_results_for_parser</a><a href="#method.make_inst_results_reusing">make_inst_results_reusing</a><a href="#method.make_invalid_value_for_parser">make_invalid_value_for_parser</a><a href="#method.make_value_alias_for_serialization">make_value_alias_for_serialization</a><a href="#method.new">new</a><a href="#method.num_ebb_params">num_ebb_params</a><a href="#method.num_ebbs">num_ebbs</a><a href="#method.num_insts">num_insts</a><a href="#method.num_values">num_values</a><a href="#method.remove_ebb_param">remove_ebb_param</a><a href="#method.replace">replace</a><a href="#method.replace_ebb_p
pub value_lists: <a class="type" href="../../../cranelift_codegen/ir/instructions/type.ValueListPool.html" title="type cranelift_codegen::ir::instructions::ValueListPool">ValueListPool</a>,
pub signatures: <a class="struct" href="../../../cranelift_entity/primary/struct.PrimaryMap.html" title="struct cranelift_entity::primary::PrimaryMap">PrimaryMap</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.SigRef.html" title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>, <a class="struct" href="../../../cranelift_codegen/ir/struct.Signature.html" title="struct cranelift_codegen::ir::Signature">Signature</a>&gt;,
pub ext_funcs: <a class="struct" href="../../../cranelift_entity/primary/struct.PrimaryMap.html" title="struct cranelift_entity::primary::PrimaryMap">PrimaryMap</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.FuncRef.html" title="struct cranelift_codegen::ir::entities::FuncRef">FuncRef</a>, <a class="struct" href="../../../cranelift_codegen/ir/struct.ExtFuncData.html" title="struct cranelift_codegen::ir::ExtFuncData">ExtFuncData</a>&gt;,
pub values_labels: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <a class="enum" href="../../../cranelift_codegen/ir/enum.ValueLabelAssignments.html" title="enum cranelift_codegen::ir::ValueLabelAssignments">ValueLabelAssignments</a>&gt;&gt;,
// some fields omitted
}</pre></div><div class='docblock'><p>A data flow graph defines all instructions and extended basic blocks in a function as well as
the data flow dependencies between them. The DFG also tracks values which can be either
instruction results or EBB parameters.</p>
<p>The layout of EBBs in the function and of instructions in each EBB is recorded by the
<code>FunctionLayout</code> data structure which form the other half of the function representation.</p>
</div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.value_lists" class="structfield small-section-header"><a href="#structfield.value_lists" class="anchor field"></a><code id="value_lists.v">value_lists: <a class="type" href="../../../cranelift_codegen/ir/instructions/type.ValueListPool.html" title="type cranelift_codegen::ir::instructions::ValueListPool">ValueListPool</a></code></span><div class='docblock'><p>Memory pool of value lists.</p>
<p>The <code>ValueList</code> references into this pool appear in many places:</p>
<ul>
<li>Instructions in <code>insts</code> that don't have room for their entire argument list inline.</li>
<li>Instruction result values in <code>results</code>.</li>
<li>EBB parameters in <code>ebbs</code>.</li>
</ul>
</div><span id="structfield.signatures" class="structfield small-section-header"><a href="#structfield.signatures" class="anchor field"></a><code id="signatures.v">signatures: <a class="struct" href="../../../cranelift_entity/primary/struct.PrimaryMap.html" title="struct cranelift_entity::primary::PrimaryMap">PrimaryMap</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.SigRef.html" title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>, <a class="struct" href="../../../cranelift_codegen/ir/struct.Signature.html" title="struct cranelift_codegen::ir::Signature">Signature</a>&gt;</code></span><div class='docblock'><p>Function signature table. These signatures are referenced by indirect call instructions as
well as the external function references.</p>
</div><span id="structfield.ext_funcs" class="structfield small-section-header"><a href="#structfield.ext_funcs" class="anchor field"></a><code id="ext_funcs.v">ext_funcs: <a class="struct" href="../../../cranelift_entity/primary/struct.PrimaryMap.html" title="struct cranelift_entity::primary::PrimaryMap">PrimaryMap</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.FuncRef.html" title="struct cranelift_codegen::ir::entities::FuncRef">FuncRef</a>, <a class="struct" href="../../../cranelift_codegen/ir/struct.ExtFuncData.html" title="struct cranelift_codegen::ir::ExtFuncData">ExtFuncData</a>&gt;</code></span><div class='docblock'><p>External function references. These are functions that can be called directly.</p>
</div><span id="structfield.values_labels" class="structfield small-section-header"><a href="#structfield.values_labels" class="anchor field"></a><code id="values_labels.v">values_labels: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <a class="enum" href="../../../cranelift_codegen/ir/enum.ValueLabelAssignments.html" title="enum cranelift_codegen::ir::ValueLabelAssignments">ValueLabelAssignments</a>&gt;&gt;</code></span><div class='docblock'><p>Saves Value labels.</p>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#72-136' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; Self</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#74-85' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new empty <code>DataFlowGraph</code>.</p>
</div><h4 id='method.clear' class="method"><code id='clear.v'>pub fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#88-97' title='goto source code'>[src]</a></h4><div class='docblock'><p>Clear everything.</p>
</div><h4 id='method.num_insts' class="method"><code id='num_insts.v'>pub fn <a href='#method.num_insts' class='fnname'>num_insts</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#103-105' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the total number of instructions created in this function, whether they are currently
inserted in the layout or not.</p>
<p>This is intended for use with <code>SecondaryMap::with_capacity</code>.</p>
</div><h4 id='method.inst_is_valid' class="method"><code id='inst_is_valid.v'>pub fn <a href='#method.inst_is_valid' class='fnname'>inst_is_valid</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#108-110' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the given instruction reference is valid.</p>
</div><h4 id='method.num_ebbs' class="method"><code id='num_ebbs.v'>pub fn <a href='#method.num_ebbs' class='fnname'>num_ebbs</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#116-118' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the total number of extended basic blocks created in this function, whether they are
currently inserted in the layout or not.</p>
<p>This is intended for use with <code>SecondaryMap::with_capacity</code>.</p>
</div><h4 id='method.ebb_is_valid' class="method"><code id='ebb_is_valid.v'>pub fn <a href='#method.ebb_is_valid' class='fnname'>ebb_is_valid</a>(&amp;self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#121-123' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the given ebb reference is valid.</p>
</div><h4 id='method.num_values' class="method"><code id='num_values.v'>pub fn <a href='#method.num_values' class='fnname'>num_values</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the total number of values.</p>
</div><h4 id='method.collect_debug_info' class="method"><code id='collect_debug_info.v'>pub fn <a href='#method.collect_debug_info' class='fnname'>collect_debug_info</a>(&amp;mut self)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#131-135' title='goto source code'>[src]</a></h4><div class='docblock'><p>Starts collection of debug information.</p>
</div></div><h3 id='impl-1' class='impl'><code class='in-band'>impl <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-1' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#201-356' title='goto source code'>[src]</a></h3><div class='docblock'><p>Handling values.</p>
<p>Values are either EBB parameters or instruction results.</p>
</div><div class='impl-items'><h4 id='method.values' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.Values.html" title="struct cranelift_codegen::ir::dfg::Values">Values</a>&lt;'a&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.Values.html" title="struct cranelift_codegen::ir::dfg::Values">Values</a>&lt;'a&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.Values.html" title="struct cranelift_codegen::ir::dfg::Values">Values</a>&lt;'a&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>;</span></code></div></div><code id='values.v'>pub fn <a href='#method.values' class='fnname'>values</a>&lt;'a&gt;(&amp;'a self) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.Values.html" title="struct cranelift_codegen::ir::dfg::Values">Values</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#208-212' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get an iterator over all values.</p>
</div><h4 id='method.value_is_valid' class="method"><code id='value_is_valid.v'>pub fn <a href='#method.value_is_valid' class='fnname'>value_is_valid</a>(&amp;self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#215-217' title='goto source code'>[src]</a></h4><div class='docblock'><p>Check if a value reference is valid.</p>
</div><h4 id='method.value_type' class="method"><code id='value_type.v'>pub fn <a href='#method.value_type' class='fnname'>value_type</a>(&amp;self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#220-226' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the type of a value.</p>
</div><h4 id='method.value_def' class="method"><code id='value_def.v'>pub fn <a href='#method.value_def' class='fnname'>value_def</a>(&amp;self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="enum" href="../../../cranelift_codegen/ir/dfg/enum.ValueDef.html" title="enum cranelift_codegen::ir::dfg::ValueDef">ValueDef</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#232-242' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the definition of a value.</p>
<p>This is either the instruction that defined it or the Ebb that has the value as an
parameter.</p>
</div><h4 id='method.value_is_attached' class="method"><code id='value_is_attached.v'>pub fn <a href='#method.value_is_attached' class='fnname'>value_is_attached</a>(&amp;self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#250-257' title='goto source code'>[src]</a></h4><div class='docblock'><p>Determine if <code>v</code> is an attached instruction result / EBB parameter.</p>
<p>An attached value can't be attached to something else without first being detached.</p>
<p>Value aliases are not considered to be attached to anything. Use <code>resolve_aliases()</code> to
determine if the original aliased value is attached.</p>
</div><h4 id='method.resolve_aliases' class="method"><code id='resolve_aliases.v'>pub fn <a href='#method.resolve_aliases' class='fnname'>resolve_aliases</a>(&amp;self, value: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#262-264' title='goto source code'>[src]</a></h4><div class='docblock'><p>Resolve value aliases.</p>
<p>Find the original SSA value that <code>value</code> aliases.</p>
</div><h4 id='method.resolve_aliases_in_arguments' class="method"><code id='resolve_aliases_in_arguments.v'>pub fn <a href='#method.resolve_aliases_in_arguments' class='fnname'>resolve_aliases_in_arguments</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#270-277' title='goto source code'>[src]</a></h4><div class='docblock'><p>Resolve all aliases among inst's arguments.</p>
<p>For each argument of inst which is defined by an alias, replace the
alias with the aliased value.</p>
</div><h4 id='method.change_to_alias' class="method"><code id='change_to_alias.v'>pub fn <a href='#method.change_to_alias' class='fnname'>change_to_alias</a>(&amp;mut self, dest: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, src: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#285-308' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn a value into an alias of another.</p>
<p>Change the <code>dest</code> value to behave as an alias of <code>src</code>. This means that all uses of <code>dest</code>
will behave as if they used that value <code>src</code>.</p>
<p>The <code>dest</code> value can't be attached to an instruction or EBB.</p>
</div><h4 id='method.replace_with_aliases' class="method"><code id='replace_with_aliases.v'>pub fn <a href='#method.replace_with_aliases' class='fnname'>replace_with_aliases</a>(&amp;mut self, dest_inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, src_inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#319-355' title='goto source code'>[src]</a></h4><div class='docblock'><p>Replace the results of one instruction with aliases to the results of another.</p>
<p>Change all the results of <code>dest_inst</code> to behave as aliases of
corresponding results of <code>src_inst</code>, as if calling change_to_alias for
each.</p>
<p>After calling this instruction, <code>dest_inst</code> will have had its results
cleared, so it likely needs to be removed from the graph.</p>
</div></div><h3 id='impl-2' class='impl'><code class='in-band'>impl <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-2' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#417-729' title='goto source code'>[src]</a></h3><div class='docblock'><p>Instructions.</p>
</div><div class='impl-items'><h4 id='method.make_inst' class="method"><code id='make_inst.v'>pub fn <a href='#method.make_inst' class='fnname'>make_inst</a>(&amp;mut self, data: <a class="enum" href="../../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#422-426' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new instruction.</p>
<p>The type of the first result is indicated by <code>data.ty</code>. If the instruction produces
multiple results, also call <code>make_inst_results</code> to allocate value table entries.</p>
</div><h4 id='method.display_inst' class="method"><code id='display_inst.v'>pub fn <a href='#method.display_inst' class='fnname'>display_inst</a>&lt;'a, I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a dyn <a class="trait" href="../../../cranelift_codegen/isa/trait.TargetIsa.html" title="trait cranelift_codegen::isa::TargetIsa">TargetIsa</a>&gt;&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;isa: I<br>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DisplayInst.html" title="struct cranelift_codegen::ir::dfg::DisplayInst">DisplayInst</a>&lt;'a&gt;</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#429-435' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns an object that displays <code>inst</code>.</p>
</div><h4 id='method.inst_args' class="method"><code id='inst_args.v'>pub fn <a href='#method.inst_args' class='fnname'>inst_args</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#438-440' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get all value arguments on <code>inst</code> as a slice.</p>
</div><h4 id='method.inst_args_mut' class="method"><code id='inst_args_mut.v'>pub fn <a href='#method.inst_args_mut' class='fnname'>inst_args_mut</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#443-445' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get all value arguments on <code>inst</code> as a mutable slice.</p>
</div><h4 id='method.inst_fixed_args' class="method"><code id='inst_fixed_args.v'>pub fn <a href='#method.inst_fixed_args' class='fnname'>inst_fixed_args</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#448-454' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the fixed value arguments on <code>inst</code> as a slice.</p>
</div><h4 id='method.inst_fixed_args_mut' class="method"><code id='inst_fixed_args_mut.v'>pub fn <a href='#method.inst_fixed_args_mut' class='fnname'>inst_fixed_args_mut</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#457-463' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the fixed value arguments on <code>inst</code> as a mutable slice.</p>
</div><h4 id='method.inst_variable_args' class="method"><code id='inst_variable_args.v'>pub fn <a href='#method.inst_variable_args' class='fnname'>inst_variable_args</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#466-472' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the variable value arguments on <code>inst</code> as a slice.</p>
</div><h4 id='method.inst_variable_args_mut' class="method"><code id='inst_variable_args_mut.v'>pub fn <a href='#method.inst_variable_args_mut' class='fnname'>inst_variable_args_mut</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#475-481' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the variable value arguments on <code>inst</code> as a mutable slice.</p>
</div><h4 id='method.make_inst_results' class="method"><code id='make_inst_results.v'>pub fn <a href='#method.make_inst_results' class='fnname'>make_inst_results</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, ctrl_typevar: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#495-497' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create result values for an instruction that produces multiple results.</p>
<p>Instructions that produce no result values only need to be created with <code>make_inst</code>,
otherwise call <code>make_inst_results</code> to allocate value table entries for the results.</p>
<p>The result value types are determined from the instruction's value type constraints and the
provided <code>ctrl_typevar</code> type for polymorphic instructions. For non-polymorphic
instructions, <code>ctrl_typevar</code> is ignored, and <code>INVALID</code> can be used.</p>
<p>The type of the first result value is also set, even if it was already set in the
<code>InstructionData</code> passed to <code>make_inst</code>. If this function is called with a single-result
instruction, that is the only effect.</p>
</div><h4 id='method.make_inst_results_reusing' class="method"><code id='make_inst_results_reusing.v'>pub fn <a href='#method.make_inst_results_reusing' class='fnname'>make_inst_results_reusing</a>&lt;I&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;reuse: I<br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>&gt;&gt;,&nbsp;</span></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#504-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create result values for <code>inst</code>, reusing the provided detached values.</p>
<p>Create a new set of result values for <code>inst</code> using <code>ctrl_typevar</code> to determine the result
types. Any values provided by <code>reuse</code> will be reused. When <code>reuse</code> is exhausted or when it
produces <code>None</code>, a new value is created.</p>
</div><h4 id='method.replace' class="method"><code id='replace.v'>pub fn <a href='#method.replace' class='fnname'>replace</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; ReplaceBuilder</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#553-555' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a <code>ReplaceBuilder</code> that will replace <code>inst</code> with a new instruction in place.</p>
</div><h4 id='method.detach_results' class="method"><code id='detach_results.v'>pub fn <a href='#method.detach_results' class='fnname'>detach_results</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="type" href="../../../cranelift_codegen/ir/instructions/type.ValueList.html" title="type cranelift_codegen::ir::instructions::ValueList">ValueList</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock'><p>Detach the list of result values from <code>inst</code> and return it.</p>
<p>This leaves <code>inst</code> without any result values. New result values can be created by calling
<code>make_inst_results</code> or by using a <code>replace(inst)</code> builder.</p>
</div><h4 id='method.clear_results' class="method"><code id='clear_results.v'>pub fn <a href='#method.clear_results' class='fnname'>clear_results</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#569-571' title='goto source code'>[src]</a></h4><div class='docblock'><p>Clear the list of result values from <code>inst</code>.</p>
<p>This leaves <code>inst</code> without any result values. New result values can be created by calling
<code>make_inst_results</code> or by using a <code>replace(inst)</code> builder.</p>
</div><h4 id='method.attach_result' class="method"><code id='attach_result.v'>pub fn <a href='#method.attach_result' class='fnname'>attach_result</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, res: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#579-589' title='goto source code'>[src]</a></h4><div class='docblock'><p>Attach an existing value to the result value list for <code>inst</code>.</p>
<p>The <code>res</code> value is appended to the end of the result list.</p>
<p>This is a very low-level operation. Usually, instruction results with the correct types are
created automatically. The <code>res</code> value must not be attached to anything else.</p>
</div><h4 id='method.replace_result' class="method"><code id='replace_result.v'>pub fn <a href='#method.replace_result' class='fnname'>replace_result</a>(&amp;mut self, old_value: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, new_type: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#598-623' title='goto source code'>[src]</a></h4><div class='docblock'><p>Replace an instruction result with a new value of type <code>new_type</code>.</p>
<p>The <code>old_value</code> must be an attached instruction result.</p>
<p>The old value is left detached, so it should probably be changed into something else.</p>
<p>Returns the new value.</p>
</div><h4 id='method.append_result' class="method"><code id='append_result.v'>pub fn <a href='#method.append_result' class='fnname'>append_result</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, ty: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#626-635' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append a new instruction result value to <code>inst</code>.</p>
</div><h4 id='method.append_inst_arg' class="method"><code id='append_inst_arg.v'>pub fn <a href='#method.append_inst_arg' class='fnname'>append_inst_arg</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, new_arg: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#640-646' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append a new value argument to an instruction.</p>
<p>Panics if the instruction doesn't support arguments.</p>
</div><h4 id='method.first_result' class="method"><code id='first_result.v'>pub fn <a href='#method.first_result' class='fnname'>first_result</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#651-655' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the first result of an instruction.</p>
<p>This function panics if the instruction doesn't have any result.</p>
</div><h4 id='method.has_results' class="method"><code id='has_results.v'>pub fn <a href='#method.has_results' class='fnname'>has_results</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#658-660' title='goto source code'>[src]</a></h4><div class='docblock'><p>Test if <code>inst</code> has any result values currently.</p>
</div><h4 id='method.inst_results' class="method"><code id='inst_results.v'>pub fn <a href='#method.inst_results' class='fnname'>inst_results</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#663-665' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return all the results of an instruction.</p>
</div><h4 id='method.call_signature' class="method"><code id='call_signature.v'>pub fn <a href='#method.call_signature' class='fnname'>call_signature</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.SigRef.html" title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>&gt;</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#669-675' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the call signature of a direct or indirect call instruction.
Returns <code>None</code> if <code>inst</code> is not a call instruction.</p>
</div><h4 id='method.analyze_branch' class="method"><code id='analyze_branch.v'>pub fn <a href='#method.analyze_branch' class='fnname'>analyze_branch</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="enum" href="../../../cranelift_codegen/ir/instructions/enum.BranchInfo.html" title="enum cranelift_codegen::ir::instructions::BranchInfo">BranchInfo</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#678-680' title='goto source code'>[src]</a></h4><div class='docblock'><p>Check if <code>inst</code> is a branch.</p>
</div><h4 id='method.compute_result_type' class="method"><code id='compute_result_type.v'>pub fn <a href='#method.compute_result_type' class='fnname'>compute_result_type</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;result_idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>&gt;</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#689-709' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the type of an instruction result from opcode constraints and call signatures.</p>
<p>This computes the same sequence of result types that <code>make_inst_results()</code> above would
assign to the created result values, but it does not depend on <code>make_inst_results()</code> being
called first.</p>
<p>Returns <code>None</code> if asked about a result index that is too large.</p>
</div><h4 id='method.ctrl_typevar' class="method"><code id='ctrl_typevar.v'>pub fn <a href='#method.ctrl_typevar' class='fnname'>ctrl_typevar</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#712-728' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the controlling type variable, or <code>INVALID</code> if <code>inst</code> isn't polymorphic.</p>
</div></div><h3 id='impl-3' class='impl'><code class='in-band'>impl <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-3' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#748-890' title='goto source code'>[src]</a></h3><div class='docblock'><p>Extended basic blocks.</p>
</div><div class='impl-items'><h4 id='method.make_ebb' class="method"><code id='make_ebb.v'>pub fn <a href='#method.make_ebb' class='fnname'>make_ebb</a>(&amp;mut self) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#750-752' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new basic block.</p>
</div><h4 id='method.num_ebb_params' class="method"><code id='num_ebb_params.v'>pub fn <a href='#method.num_ebb_params' class='fnname'>num_ebb_params</a>(&amp;self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#755-757' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the number of parameters on <code>ebb</code>.</p>
</div><h4 id='method.ebb_params' class="method"><code id='ebb_params.v'>pub fn <a href='#method.ebb_params' class='fnname'>ebb_params</a>(&amp;self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#760-762' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the parameters on <code>ebb</code>.</p>
</div><h4 id='method.append_ebb_param' class="method"><code id='append_ebb_param.v'>pub fn <a href='#method.append_ebb_param' class='fnname'>append_ebb_param</a>(&amp;mut self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, ty: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#765-774' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append a parameter with type <code>ty</code> to <code>ebb</code>.</p>
</div><h4 id='method.swap_remove_ebb_param' class="method"><code id='swap_remove_ebb_param.v'>pub fn <a href='#method.swap_remove_ebb_param' class='fnname'>swap_remove_ebb_param</a>(&amp;mut self, val: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#784-806' title='goto source code'>[src]</a></h4><div class='docblock'><p>Removes <code>val</code> from <code>ebb</code>'s parameters by swapping it with the last parameter on <code>ebb</code>.
Returns the position of <code>val</code> before removal.</p>
<p><em>Important</em>: to ensure O(1) deletion, this method swaps the removed parameter with the
last <code>ebb</code> parameter. This can disrupt all the branch instructions jumping to this
<code>ebb</code> for which you have to change the branch argument order if necessary.</p>
<p>Panics if <code>val</code> is not an EBB parameter.</p>
</div><h4 id='method.remove_ebb_param' class="method"><code id='remove_ebb_param.v'>pub fn <a href='#method.remove_ebb_param' class='fnname'>remove_ebb_param</a>(&amp;mut self, val: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#810-837' title='goto source code'>[src]</a></h4><div class='docblock'><p>Removes <code>val</code> from <code>ebb</code>'s parameters by a standard linear time list removal which
preserves ordering. Also updates the values' data.</p>
</div><h4 id='method.attach_ebb_param' class="method"><code id='attach_ebb_param.v'>pub fn <a href='#method.attach_ebb_param' class='fnname'>attach_ebb_param</a>(&amp;mut self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, param: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#844-854' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append an existing value to <code>ebb</code>'s parameters.</p>
<p>The appended value can't already be attached to something else.</p>
<p>In almost all cases, you should be using <code>append_ebb_param()</code> instead of this method.</p>
</div><h4 id='method.replace_ebb_param' class="method"><code id='replace_ebb_param.v'>pub fn <a href='#method.replace_ebb_param' class='fnname'>replace_ebb_param</a>(&amp;mut self, old_value: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, new_type: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#865-880' title='goto source code'>[src]</a></h4><div class='docblock'><p>Replace an EBB parameter with a new value of type <code>ty</code>.</p>
<p>The <code>old_value</code> must be an attached EBB parameter. It is removed from its place in the list
of parameters and replaced by a new value of type <code>new_type</code>. The new value gets the same
position in the list, and other parameters are not disturbed.</p>
<p>The old value is left detached, so it should probably be changed into something else.</p>
<p>Returns the new value.</p>
</div><h4 id='method.detach_ebb_params' class="method"><code id='detach_ebb_params.v'>pub fn <a href='#method.detach_ebb_params' class='fnname'>detach_ebb_params</a>(&amp;mut self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -&gt; <a class="type" href="../../../cranelift_codegen/ir/instructions/type.ValueList.html" title="type cranelift_codegen::ir::instructions::ValueList">ValueList</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#887-889' title='goto source code'>[src]</a></h4><div class='docblock'><p>Detach all the parameters from <code>ebb</code> and return them as a <code>ValueList</code>.</p>
<p>This is a quite low-level operation. Sensible things to do with the detached EBB parameters
is to put them back on the same EBB with <code>attach_ebb_param()</code> or change them into aliases
with <code>change_to_alias()</code>.</p>
</div></div><h3 id='impl-4' class='impl'><code class='in-band'>impl <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-4' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#939-1077' title='goto source code'>[src]</a></h3><div class='docblock'><p>Parser routines. These routines should not be used outside the parser.</p>
</div><div class='impl-items'><h4 id='method.make_inst_results_for_parser' class="method"><code id='make_inst_results_for_parser.v'>pub fn <a href='#method.make_inst_results_for_parser' class='fnname'>make_inst_results_for_parser</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;reuse: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#960-989' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create result values for <code>inst</code>, reusing the provided detached values.
This is similar to <code>make_inst_results_reusing</code> except it's only for use
in the parser, which needs to reuse previously invalid values.</p>
</div><h4 id='method.append_ebb_param_for_parser' class="method"><code id='append_ebb_param_for_parser.v'>pub fn <a href='#method.append_ebb_param_for_parser' class='fnname'>append_ebb_param_for_parser</a>(&amp;mut self, ebb: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, ty: <a class="struct" href="../../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>, val: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#995-1003' title='goto source code'>[src]</a></h4><div class='docblock'><p>Similar to <code>append_ebb_param</code>, append a parameter with type <code>ty</code> to
<code>ebb</code>, but using value <code>val</code>. This is only for use by the parser to
create parameters with specific values.</p>
</div><h4 id='method.make_value_alias_for_serialization' class="method"><code id='make_value_alias_for_serialization.v'>pub fn <a href='#method.make_value_alias_for_serialization' class='fnname'>make_value_alias_for_serialization</a>(&amp;mut self, src: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, dest: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#1008-1021' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new value alias. This is only for use by the parser to create
aliases with specific values, and the printer for testing.</p>
</div><h4 id='method.value_alias_dest_for_serialization' class="method"><code id='value_alias_dest_for_serialization.v'>pub fn <a href='#method.value_alias_dest_for_serialization' class='fnname'>value_alias_dest_for_serialization</a>(&amp;self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>&gt;</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#1027-1033' title='goto source code'>[src]</a></h4><div class='docblock'><p>If <code>v</code> is already defined as an alias, return its destination value.
Otherwise return None. This allows the parser to coalesce identical
alias definitions, and the printer to identify an alias's immediate target.</p>
</div><h4 id='method.set_alias_type_for_parser' class="method"><code id='set_alias_type_for_parser.v'>pub fn <a href='#method.set_alias_type_for_parser' class='fnname'>set_alias_type_for_parser</a>(&amp;mut self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#1038-1051' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the type of an alias. This is only for use in the parser.
Returns false if an alias cycle was encountered.</p>
</div><h4 id='method.make_invalid_value_for_parser' class="method"><code id='make_invalid_value_for_parser.v'>pub fn <a href='#method.make_invalid_value_for_parser' class='fnname'>make_invalid_value_for_parser</a>(&amp;mut self)</code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#1056-1062' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create an invalid value, to pad the index space. This is only for use by
the parser to pad out the value index space.</p>
</div><h4 id='method.value_is_valid_for_parser' class="method"><code id='value_is_valid_for_parser.v'>pub fn <a href='#method.value_is_valid_for_parser' class='fnname'>value_is_valid_for_parser</a>(&amp;self, v: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#1067-1076' title='goto source code'>[src]</a></h4><div class='docblock'><p>Check if a value reference is valid, while being aware of aliases which
may be unresolved while parsing.</p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Index%3CInst%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>&gt; for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-Index%3CInst%3E' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#732-738' title='goto source code'>[src]</a></h3><div class='docblock'><p>Allow immutable access to instructions via indexing.</p>
</div><div class='impl-items'><h4 id='associatedtype.Output' class="type"><code id='Output.t'>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = <a class="enum" href="../../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a></code></h4><div class='docblock'><p>The returned type after indexing.</p>
</div><h4 id='method.index' class="method hidden"><code id='index.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&amp;self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; &amp;<a class="enum" href="../../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#735-737' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id='impl-IndexMut%3CInst%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>&gt; for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-IndexMut%3CInst%3E' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#741-745' title='goto source code'>[src]</a></h3><div class='docblock'><p>Allow mutable access to instructions via indexing.</p>
</div><div class='impl-items'><h4 id='method.index_mut' class="method hidden"><code id='index_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&amp;mut self, inst: <a class="struct" href="../../../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -&gt; &amp;mut <a class="enum" href="../../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#742-744' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a class='srclink' href='../../../src/cranelift_codegen/ir/dfg.rs.html#30' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
2019-09-16 15:53:39 -07:00
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html" title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#552-554' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
2019-09-06 15:57:44 -07:00
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#545-547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&amp;self) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../../";window.currentCrate = "cranelift_codegen";</script><script src="../../../aliases.js"></script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>