MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / new

Method new

cranelift/codegen/src/remove_constant_phis.rs:128–150  ·  view source on GitHub ↗
(
        bump: &'a Bump,
        dfg: &ir::DataFlowGraph,
        inst: Inst,
        branch_index: usize,
        block: BlockCall,
    )

Source from the content-addressed store, hash-verified

126 /// means we can ignore it for this analysis's purposes.
127 #[inline]
128 fn new(
129 bump: &'a Bump,
130 dfg: &ir::DataFlowGraph,
131 inst: Inst,
132 branch_index: usize,
133 block: BlockCall,
134 ) -> Option<Self> {
135 let inst_var_args = block.args(&dfg.value_lists);
136
137 // Skip edges without params.
138 if inst_var_args.len() == 0 {
139 return None;
140 }
141
142 Some(OutEdge {
143 inst,
144 branch_index: branch_index as u32,
145 block: block.block(&dfg.value_lists),
146 args: bump.alloc_slice_fill_iter(
147 inst_var_args.map(|arg| arg.map_value(|value| dfg.resolve_aliases(value))),
148 ),
149 })
150 }
151}
152
153/// For some block, a useful bundle of info. The `Block` itself is not stored

Callers

nothing calls this directly

Calls 6

resolve_aliasesMethod · 0.80
argsMethod · 0.45
lenMethod · 0.45
blockMethod · 0.45
mapMethod · 0.45
map_valueMethod · 0.45

Tested by

no test coverage detected