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)
| 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 |
no test coverage detected