<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `DataFlowGraph` struct in crate `cranelift_codegen`."><metaname="keywords"content="rust, rustlang, rust-lang, DataFlowGraph"><title>cranelift_codegen::ir::dfg::DataFlowGraph - Rust</title><linkrel="stylesheet"type="text/css"href="../../../normalize.css"><linkrel="stylesheet"type="text/css"href="../../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../../../dark.css"><linkrel="stylesheet"type="text/css"href="../../../light.css"id="themeStyle"><scriptsrc="../../../storage.js"></script><noscript><linkrel="stylesheet"href="../../../noscript.css"></noscript><linkrel="shortcut icon"href="../../../favicon.ico"><styletype="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../../../cranelift_codegen/index.html'><divclass='logo-container'><imgsrc='../../../rust-logo.png'alt='logo'></div></a><pclass='location'>Struct DataFlowGraph</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#fields">Fields</a><divclass="sidebar-links"><ahref="#structfield.value_lists">value_lists</a><ahref="#structfield.signatures">signatures</a><ahref="#structfield.ext_funcs">ext_funcs</a><ahref="#structfield.values_labels">values_labels</a></div><aclass="sidebar-title"href="#methods">Methods</a><divclass="sidebar-links"><ahref="#method.analyze_branch">analyze_branch</a><ahref="#method.append_ebb_param">append_ebb_param</a><ahref="#method.append_ebb_param_for_parser">append_ebb_param_for_parser</a><ahref="#method.append_inst_arg">append_inst_arg</a><ahref="#method.append_result">append_result</a><ahref="#method.attach_ebb_param">attach_ebb_param</a><ahref="#method.attach_result">attach_result</a><ahref="#method.call_signature">call_signature</a><ahref="#method.change_to_alias">change_to_alias</a><ahref="#method.clear">clear</a><ahref="#method.clear_results">clear_results</a><ahref="#method.collect_debug_info">collect_debug_info</a><ahref="#method.compute_result_type">compute_result_type</a><ahref="#method.ctrl_typevar">ctrl_typevar</a><ahref="#method.detach_ebb_params">detach_ebb_params</a><ahref="#method.detach_results">detach_results</a><ahref="#method.display_inst">display_inst</a><ahref="#method.ebb_is_valid">ebb_is_valid</a><ahref="#method.ebb_params">ebb_params</a><ahref="#method.first_result">first_result</a><ahref="#method.has_results">has_results</a><ahref="#method.inst_args">inst_args</a><ahref="#method.inst_args_mut">inst_args_mut</a><ahref="#method.inst_fixed_args">inst_fixed_args</a><ahref="#method.inst_fixed_args_mut">inst_fixed_args_mut</a><ahref="#method.inst_is_valid">inst_is_valid</a><ahref="#method.inst_results">inst_results</a><ahref="#method.inst_variable_args">inst_variable_args</a><ahref="#method.inst_variable_args_mut">inst_variable_args_mut</a><ahref="#method.make_ebb">make_ebb</a><ahref="#method.make_inst">make_inst</a><ahref="#method.make_inst_results">make_inst_results</a><ahref="#method.make_inst_results_for_parser">make_inst_results_for_parser</a><ahref="#method.make_inst_results_reusing">make_inst_results_reusing</a><ahref="#method.make_invalid_value_for_parser">make_invalid_value_for_parser</a><ahref="#method.make_value_alias_for_serialization">make_value_alias_for_serialization</a><ahref="#method.new">new</a><ahref="#method.num_ebb_params">num_ebb_params</a><ahref="#method.num_ebbs">num_ebbs</a><ahref="#method.num_insts">num_insts</a><ahref="#method.num_values">num_values</a><ahref="#method.remove_ebb_param">remove_ebb_param</a><ahref="#method.replace">replace</a><ahref="#method.replace_ebb_p
Fields<ahref='#fields'class='anchor'></a></h2><spanid="structfield.value_lists"class="structfield small-section-header"><ahref="#structfield.value_lists"class="anchor field"></a><codeid="value_lists.v">value_lists: <aclass="type"href="../../../cranelift_codegen/ir/instructions/type.ValueListPool.html"title="type cranelift_codegen::ir::instructions::ValueListPool">ValueListPool</a></code></span><divclass='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><spanid="structfield.signatures"class="structfield small-section-header"><ahref="#structfield.signatures"class="anchor field"></a><codeid="signatures.v">signatures: <aclass="struct"href="../../../cranelift_entity/primary/struct.PrimaryMap.html"title="struct cranelift_entity::primary::PrimaryMap">PrimaryMap</a><<aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.SigRef.html"title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>, <aclass="struct"href="../../../cranelift_codegen/ir/struct.Signature.html"title="struct cranelift_codegen::ir::Signature">Signature</a>></code></span><divclass='docblock'><p>Function signature table. These signatures are referenced by indirect call instructions as
well as the external function references.</p>
</div><spanid="structfield.ext_funcs"class="structfield small-section-header"><ahref="#structfield.ext_funcs"class="anchor field"></a><codeid="ext_funcs.v">ext_funcs: <aclass="struct"href="../../../cranelift_entity/primary/struct.PrimaryMap.html"title="struct cranelift_entity::primary::PrimaryMap">PrimaryMap</a><<aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.FuncRef.html"title="struct cranelift_codegen::ir::entities::FuncRef">FuncRef</a>, <aclass="struct"href="../../../cranelift_codegen/ir/struct.ExtFuncData.html"title="struct cranelift_codegen::ir::ExtFuncData">ExtFuncData</a>></code></span><divclass='docblock'><p>External function references. These are functions that can be called directly.</p>
</div><h4id='method.num_insts'class="method"><codeid='num_insts.v'>pub fn <ahref='#method.num_insts'class='fnname'>num_insts</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#103-105'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.inst_is_valid'class="method"><codeid='inst_is_valid.v'>pub fn <ahref='#method.inst_is_valid'class='fnname'>inst_is_valid</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#108-110'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns <code>true</code> if the given instruction reference is valid.</p>
</div><h4id='method.num_ebbs'class="method"><codeid='num_ebbs.v'>pub fn <ahref='#method.num_ebbs'class='fnname'>num_ebbs</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#116-118'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.ebb_is_valid'class="method"><codeid='ebb_is_valid.v'>pub fn <ahref='#method.ebb_is_valid'class='fnname'>ebb_is_valid</a>(&self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#121-123'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns <code>true</code> if the given ebb reference is valid.</p>
</div><h4id='method.num_values'class="method"><codeid='num_values.v'>pub fn <ahref='#method.num_values'class='fnname'>num_values</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#126-128'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the total number of values.</p>
</div><h4id='method.collect_debug_info'class="method"><codeid='collect_debug_info.v'>pub fn <ahref='#method.collect_debug_info'class='fnname'>collect_debug_info</a>(&mut self)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#131-135'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Starts collection of debug information.</p>
<p>Values are either EBB parameters or instruction results.</p>
</div><divclass='impl-items'><h4id='method.values'class="method"><divclass="important-traits"><divclass='tooltip'>ⓘ<spanclass='tooltiptext'>Important traits for <aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.Values.html"title="struct cranelift_codegen::ir::dfg::Values">Values</a><'a></span></div><divclass="content hidden"><h3class="important">Important traits for <aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.Values.html"title="struct cranelift_codegen::ir::dfg::Values">Values</a><'a></h3><codeclass="content"><spanclass="where fmt-newline">impl<'a><aclass="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 <aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.Values.html"title="struct cranelift_codegen::ir::dfg::Values">Values</a><'a></span><spanclass="where fmt-newline"> type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item'class="type">Item</a> = <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>;</span></code></div></div><codeid='values.v'>pub fn <ahref='#method.values'class='fnname'>values</a><'a>(&'a self) -><aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.Values.html"title="struct cranelift_codegen::ir::dfg::Values">Values</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#208-212'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get an iterator over all values.</p>
</div><h4id='method.value_is_valid'class="method"><codeid='value_is_valid.v'>pub fn <ahref='#method.value_is_valid'class='fnname'>value_is_valid</a>(&self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#215-217'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Check if a value reference is valid.</p>
</div><h4id='method.value_type'class="method"><codeid='value_type.v'>pub fn <ahref='#method.value_type'class='fnname'>value_type</a>(&self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#220-226'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the type of a value.</p>
</div><h4id='method.value_def'class="method"><codeid='value_def.v'>pub fn <ahref='#method.value_def'class='fnname'>value_def</a>(&self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="enum"href="../../../cranelift_codegen/ir/dfg/enum.ValueDef.html"title="enum cranelift_codegen::ir::dfg::ValueDef">ValueDef</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#232-242'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.value_is_attached'class="method"><codeid='value_is_attached.v'>pub fn <ahref='#method.value_is_attached'class='fnname'>value_is_attached</a>(&self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#250-257'title='goto source code'>[src]</a></h4><divclass='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>
<p>Find the original SSA value that <code>value</code> aliases.</p>
</div><h4id='method.resolve_aliases_in_arguments'class="method"><codeid='resolve_aliases_in_arguments.v'>pub fn <ahref='#method.resolve_aliases_in_arguments'class='fnname'>resolve_aliases_in_arguments</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#270-277'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.change_to_alias'class="method"><codeid='change_to_alias.v'>pub fn <ahref='#method.change_to_alias'class='fnname'>change_to_alias</a>(&mut self, dest: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>, src: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#285-308'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.replace_with_aliases'class="method"><codeid='replace_with_aliases.v'>pub fn <ahref='#method.replace_with_aliases'class='fnname'>replace_with_aliases</a>(&mut self, dest_inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, src_inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#319-355'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.inst_args'class="method"><codeid='inst_args.v'>pub fn <ahref='#method.inst_args'class='fnname'>inst_args</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#438-440'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get all value arguments on <code>inst</code> as a slice.</p>
</div><h4id='method.inst_args_mut'class="method"><codeid='inst_args_mut.v'>pub fn <ahref='#method.inst_args_mut'class='fnname'>inst_args_mut</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#443-445'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get all value arguments on <code>inst</code> as a mutable slice.</p>
</div><h4id='method.inst_fixed_args'class="method"><codeid='inst_fixed_args.v'>pub fn <ahref='#method.inst_fixed_args'class='fnname'>inst_fixed_args</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#448-454'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the fixed value arguments on <code>inst</code> as a slice.</p>
</div><h4id='method.inst_fixed_args_mut'class="method"><codeid='inst_fixed_args_mut.v'>pub fn <ahref='#method.inst_fixed_args_mut'class='fnname'>inst_fixed_args_mut</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#457-463'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the fixed value arguments on <code>inst</code> as a mutable slice.</p>
</div><h4id='method.inst_variable_args'class="method"><codeid='inst_variable_args.v'>pub fn <ahref='#method.inst_variable_args'class='fnname'>inst_variable_args</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#466-472'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the variable value arguments on <code>inst</code> as a slice.</p>
</div><h4id='method.inst_variable_args_mut'class="method"><codeid='inst_variable_args_mut.v'>pub fn <ahref='#method.inst_variable_args_mut'class='fnname'>inst_variable_args_mut</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#475-481'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the variable value arguments on <code>inst</code> as a mutable slice.</p>
</div><h4id='method.make_inst_results'class="method"><codeid='make_inst_results.v'>pub fn <ahref='#method.make_inst_results'class='fnname'>make_inst_results</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, ctrl_typevar: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#495-497'title='goto source code'>[src]</a></h4><divclass='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
<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><h4id='method.replace'class="method"><codeid='replace.v'>pub fn <ahref='#method.replace'class='fnname'>replace</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -> ReplaceBuilder</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#553-555'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Create a <code>ReplaceBuilder</code> that will replace <code>inst</code> with a new instruction in place.</p>
</div><h4id='method.detach_results'class="method"><codeid='detach_results.v'>pub fn <ahref='#method.detach_results'class='fnname'>detach_results</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="type"href="../../../cranelift_codegen/ir/instructions/type.ValueList.html"title="type cranelift_codegen::ir::instructions::ValueList">ValueList</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#561-563'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.clear_results'class="method"><codeid='clear_results.v'>pub fn <ahref='#method.clear_results'class='fnname'>clear_results</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#569-571'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.attach_result'class="method"><codeid='attach_result.v'>pub fn <ahref='#method.attach_result'class='fnname'>attach_result</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, res: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#579-589'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.replace_result'class="method"><codeid='replace_result.v'>pub fn <ahref='#method.replace_result'class='fnname'>replace_result</a>(&mut self, old_value: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>, new_type: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#598-623'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.append_result'class="method"><codeid='append_result.v'>pub fn <ahref='#method.append_result'class='fnname'>append_result</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, ty: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#626-635'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append a new instruction result value to <code>inst</code>.</p>
</div><h4id='method.append_inst_arg'class="method"><codeid='append_inst_arg.v'>pub fn <ahref='#method.append_inst_arg'class='fnname'>append_inst_arg</a>(&mut self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, new_arg: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#640-646'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append a new value argument to an instruction.</p>
<p>Panics if the instruction doesn't support arguments.</p>
</div><h4id='method.first_result'class="method"><codeid='first_result.v'>pub fn <ahref='#method.first_result'class='fnname'>first_result</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#651-655'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the first result of an instruction.</p>
<p>This function panics if the instruction doesn't have any result.</p>
</div><h4id='method.has_results'class="method"><codeid='has_results.v'>pub fn <ahref='#method.has_results'class='fnname'>has_results</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#658-660'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Test if <code>inst</code> has any result values currently.</p>
</div><h4id='method.inst_results'class="method"><codeid='inst_results.v'>pub fn <ahref='#method.inst_results'class='fnname'>inst_results</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#663-665'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Return all the results of an instruction.</p>
</div><h4id='method.call_signature'class="method"><codeid='call_signature.v'>pub fn <ahref='#method.call_signature'class='fnname'>call_signature</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.SigRef.html"title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#669-675'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.analyze_branch'class="method"><codeid='analyze_branch.v'>pub fn <ahref='#method.analyze_branch'class='fnname'>analyze_branch</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="enum"href="../../../cranelift_codegen/ir/instructions/enum.BranchInfo.html"title="enum cranelift_codegen::ir::instructions::BranchInfo">BranchInfo</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#678-680'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Check if <code>inst</code> is a branch.</p>
</div><h4id='method.compute_result_type'class="method"><codeid='compute_result_type.v'>pub fn <ahref='#method.compute_result_type'class='fnname'>compute_result_type</a>(<br> &self, <br> inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, <br> result_idx: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> ctrl_typevar: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a><br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#689-709'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.ctrl_typevar'class="method"><codeid='ctrl_typevar.v'>pub fn <ahref='#method.ctrl_typevar'class='fnname'>ctrl_typevar</a>(&self, inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#712-728'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the controlling type variable, or <code>INVALID</code> if <code>inst</code> isn't polymorphic.</p>
</div><divclass='impl-items'><h4id='method.make_ebb'class="method"><codeid='make_ebb.v'>pub fn <ahref='#method.make_ebb'class='fnname'>make_ebb</a>(&mut self) -><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#750-752'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Create a new basic block.</p>
</div><h4id='method.num_ebb_params'class="method"><codeid='num_ebb_params.v'>pub fn <ahref='#method.num_ebb_params'class='fnname'>num_ebb_params</a>(&self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#755-757'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the number of parameters on <code>ebb</code>.</p>
</div><h4id='method.ebb_params'class="method"><codeid='ebb_params.v'>pub fn <ahref='#method.ebb_params'class='fnname'>ebb_params</a>(&self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#760-762'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Get the parameters on <code>ebb</code>.</p>
</div><h4id='method.append_ebb_param'class="method"><codeid='append_ebb_param.v'>pub fn <ahref='#method.append_ebb_param'class='fnname'>append_ebb_param</a>(&mut self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, ty: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#765-774'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append a parameter with type <code>ty</code> to <code>ebb</code>.</p>
</div><h4id='method.swap_remove_ebb_param'class="method"><codeid='swap_remove_ebb_param.v'>pub fn <ahref='#method.swap_remove_ebb_param'class='fnname'>swap_remove_ebb_param</a>(&mut self, val: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#784-806'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.remove_ebb_param'class="method"><codeid='remove_ebb_param.v'>pub fn <ahref='#method.remove_ebb_param'class='fnname'>remove_ebb_param</a>(&mut self, val: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#810-837'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.attach_ebb_param'class="method"><codeid='attach_ebb_param.v'>pub fn <ahref='#method.attach_ebb_param'class='fnname'>attach_ebb_param</a>(&mut self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, param: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#844-854'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.replace_ebb_param'class="method"><codeid='replace_ebb_param.v'>pub fn <ahref='#method.replace_ebb_param'class='fnname'>replace_ebb_param</a>(&mut self, old_value: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>, new_type: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>) -><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#865-880'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.detach_ebb_params'class="method"><codeid='detach_ebb_params.v'>pub fn <ahref='#method.detach_ebb_params'class='fnname'>detach_ebb_params</a>(&mut self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -><aclass="type"href="../../../cranelift_codegen/ir/instructions/type.ValueList.html"title="type cranelift_codegen::ir::instructions::ValueList">ValueList</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#887-889'title='goto source code'>[src]</a></h4><divclass='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><h3id='impl-4'class='impl'><codeclass='in-band'>impl <aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html"title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><ahref='#impl-4'class='anchor'></a><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#939-1077'title='goto source code'>[src]</a></h3><divclass='docblock'><p>Parser routines. These routines should not be used outside the parser.</p>
</div><divclass='impl-items'><h4id='method.make_inst_results_for_parser'class="method"><codeid='make_inst_results_for_parser.v'>pub fn <ahref='#method.make_inst_results_for_parser'class='fnname'>make_inst_results_for_parser</a>(<br> &mut self, <br> inst: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, <br> ctrl_typevar: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>, <br> reuse: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#960-989'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.append_ebb_param_for_parser'class="method"><codeid='append_ebb_param_for_parser.v'>pub fn <ahref='#method.append_ebb_param_for_parser'class='fnname'>append_ebb_param_for_parser</a>(&mut self, ebb: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, ty: <aclass="struct"href="../../../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>, val: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#995-1003'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.make_value_alias_for_serialization'class="method"><codeid='make_value_alias_for_serialization.v'>pub fn <ahref='#method.make_value_alias_for_serialization'class='fnname'>make_value_alias_for_serialization</a>(&mut self, src: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>, dest: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#1008-1021'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.value_alias_dest_for_serialization'class="method"><codeid='value_alias_dest_for_serialization.v'>pub fn <ahref='#method.value_alias_dest_for_serialization'class='fnname'>value_alias_dest_for_serialization</a>(&self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#1027-1033'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.set_alias_type_for_parser'class="method"><codeid='set_alias_type_for_parser.v'>pub fn <ahref='#method.set_alias_type_for_parser'class='fnname'>set_alias_type_for_parser</a>(&mut self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#1038-1051'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.make_invalid_value_for_parser'class="method"><codeid='make_invalid_value_for_parser.v'>pub fn <ahref='#method.make_invalid_value_for_parser'class='fnname'>make_invalid_value_for_parser</a>(&mut self)</code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#1056-1062'title='goto source code'>[src]</a></h4><divclass='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><h4id='method.value_is_valid_for_parser'class="method"><codeid='value_is_valid_for_parser.v'>pub fn <ahref='#method.value_is_valid_for_parser'class='fnname'>value_is_valid_for_parser</a>(&self, v: <aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#1067-1076'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Check if a value reference is valid, while being aware of aliases which
may be unresolved while parsing.</p>
</div></div><h2id='implementations'class='small-section-header'>Trait Implementations<ahref='#implementations'class='anchor'></a></h2><divid='implementations-list'><h3id='impl-Index%3CInst%3E'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html"title="trait core::ops::index::Index">Index</a><<aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>> for <aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html"title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><ahref='#impl-Index%3CInst%3E'class='anchor'></a><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#732-738'title='goto source code'>[src]</a></h3><divclass='docblock'><p>Allow immutable access to instructions via indexing.</p>
</div><divclass='impl-items'><h4id='associatedtype.Output'class="type"><codeid='Output.t'>type <ahref='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output'class="type">Output</a> = <aclass="enum"href="../../../cranelift_codegen/ir/instructions/enum.InstructionData.html"title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a></code></h4><divclass='docblock'><p>The returned type after indexing.</p>
</div></div><h3id='impl-IndexMut%3CInst%3E'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html"title="trait core::ops::index::IndexMut">IndexMut</a><<aclass="struct"href="../../../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>> for <aclass="struct"href="../../../cranelift_codegen/ir/dfg/struct.DataFlowGraph.html"title="struct cranelift_codegen::ir::dfg::DataFlowGraph">DataFlowGraph</a></code><ahref='#impl-IndexMut%3CInst%3E'class='anchor'></a><aclass='srclink'href='../../../src/cranelift_codegen/ir/dfg.rs.html#741-745'title='goto source code'>[src]</a></h3><divclass='docblock'><p>Allow mutable access to instructions via indexing.</p>
</div></div><h3id='impl-TryFrom%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref='#impl-TryFrom%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error'class="type"><codeid='Error.t'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error'class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_from'class="method hidden"><codeid='try_from.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from'class='fnname'>try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-Into%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html"title="trait core::convert::From">From</a><T>, </span></code><ahref='#impl-Into%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-548'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.into'class="method hidden"><codeid='into.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into'class='fnname'>into</a>(self) -> U</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#545-547'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-TryInto%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref='#impl-TryInto%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error-1'class="type"><codeid='Error.t-1'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error'class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="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><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_into'class="method hidden"><codeid='try_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into'class='fnname'>try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-Borrow%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Borrow%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow'class="method hidden"><codeid='borrow.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow'class='fnname'>borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3id='impl-BorrowMut%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-BorrowMut%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow_mut'class="method hidden"><codeid='borrow_mut.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut'class='fnname'>borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3id='impl-Any'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T <spanclass="where fmt-newline">where<br> T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Any'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.type_id'class="method hidden"><codeid='type_id.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id'class='fnname'>type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3id='impl-ToOwned'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>, </span></code><ahref='#impl-ToOwned'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Owned'class="type"><codeid='Owned.t'>type <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned'class="type">Owned</a> = T</code></h4><divclass='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4id='method.to_owned'class="method hidden"><codeid='to_owned.v'>fn <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned'class='fnname'>to_owned</a>(&self) -> T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4id='method.clone_into'class="method hidden"><codeid='clone_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into'class='fnname'>clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91'title='goto source code'>[src]</a></h4><divclass='stability hidden'><divclass='stab unstable'><details><summary><spanclass='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><divclass='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div></div></section><sectionid="search"class="content hidden"></section><sectionclass="footer"></section><asideid="help"class="hidden"><div><h1class="hidden">Help</h1><divclass="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>⏎</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><divclass="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><scriptsrc="../../../aliases.js"></script><scriptsrc="../../../main.js"></script><scriptdefersrc="../../../search-index.js"></script></body></html>