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

Method input_as_value

cranelift/codegen/src/machinst/lower.rs:1499–1503  ·  view source on GitHub ↗

Get the input as one of two options other than a direct register: - An instruction, given that it is effect-free or able to sink its effect to the current instruction being lowered, and given it has only one output, and if effect-ful, given that this is the only use; - A constant, if the value is a constant. The instruction input may be available in either of these forms. It may be available in

(&self, ir_inst: Inst, idx: usize)

Source from the content-addressed store, hash-verified

1497 /// instruction's result(s) must have *no* uses remaining, because it will
1498 /// not be codegen'd (it has been integrated into the current instruction).
1499 pub fn input_as_value(&self, ir_inst: Inst, idx: usize) -> Value {
1500 let val = self.f.dfg.inst_args(ir_inst)[idx];
1501 debug_assert!(self.f.dfg.value_is_real(val));
1502 val
1503 }
1504
1505 /// Resolves a particular input of an instruction to the `Value` that it is
1506 /// represented with.

Callers 3

input_tyMethod · 0.80
get_as_extended_valueFunction · 0.80

Calls 1

inst_argsMethod · 0.80

Tested by

no test coverage detected