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

Method elaborate_eclass_use

cranelift/codegen/src/egraph/elaborate.rs:397–410  ·  view source on GitHub ↗

Elaborate use of an eclass, inserting any needed new instructions before the given inst `before`. Should only be given values corresponding to results of instructions or blockparams.

(&mut self, value: Value, before: Inst)

Source from the content-addressed store, hash-verified

395 /// given values corresponding to results of instructions or
396 /// blockparams.
397 fn elaborate_eclass_use(&mut self, value: Value, before: Inst) -> ElaboratedValue {
398 debug_assert_ne!(value, Value::reserved_value());
399
400 // Kick off the process by requesting this result
401 // value.
402 self.elab_stack
403 .push(ElabStackEntry::Start { value, before });
404
405 // Now run the explicit-stack recursion until we reach
406 // the root.
407 self.process_elab_stack();
408 debug_assert_eq!(self.elab_result_stack.len(), 1);
409 self.elab_result_stack.pop().unwrap()
410 }
411
412 /// Possibly rematerialize the instruction producing the value in
413 /// `arg` and rewrite `arg` to refer to it, if needed. Returns

Callers 1

elaborate_blockMethod · 0.80

Calls 4

process_elab_stackMethod · 0.80
pushMethod · 0.45
unwrapMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected