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

Method inst_values

cranelift/codegen/src/ir/dfg.rs:862–885  ·  view source on GitHub ↗

Construct a read-only visitor context for the values of this instruction.

(
        &'dfg self,
        inst: Inst,
    )

Source from the content-addressed store, hash-verified

860
861 /// Construct a read-only visitor context for the values of this instruction.
862 pub fn inst_values<'dfg>(
863 &'dfg self,
864 inst: Inst,
865 ) -> impl DoubleEndedIterator<Item = Value> + 'dfg {
866 self.inst_args(inst)
867 .iter()
868 .copied()
869 .chain(
870 self.insts[inst]
871 .branch_destination(&self.jump_tables, &self.exception_tables)
872 .into_iter()
873 .flat_map(|branch| {
874 branch
875 .args(&self.value_lists)
876 .filter_map(|arg| arg.as_value())
877 }),
878 )
879 .chain(
880 self.insts[inst]
881 .exception_table()
882 .into_iter()
883 .flat_map(|et| self.exception_tables[et].contexts()),
884 )
885 }
886
887 /// Map a function over the values of the instruction.
888 pub fn map_inst_values<F>(&mut self, inst: Inst, body: F)

Callers 11

process_blockMethod · 0.80
rewriteMethod · 0.80
parse_function_bodyMethod · 0.80
write_operandsFunction · 0.80
compute_use_statesFunction · 0.80
check_post_egraphMethod · 0.80
topo_sorted_valuesMethod · 0.80
compute_best_valuesMethod · 0.80
process_elab_stackMethod · 0.80
elaborate_blockMethod · 0.80

Calls 10

chainMethod · 0.80
copiedMethod · 0.80
inst_argsMethod · 0.80
branch_destinationMethod · 0.80
as_valueMethod · 0.80
contextsMethod · 0.80
iterMethod · 0.45
into_iterMethod · 0.45
argsMethod · 0.45
exception_tableMethod · 0.45

Tested by

no test coverage detected