Copy immediates from the callee into the caller.
(func: &mut ir::Function, callee: &ir::Function)
| 1612 | |
| 1613 | /// Copy immediates from the callee into the caller. |
| 1614 | fn create_immediates(func: &mut ir::Function, callee: &ir::Function) -> u32 { |
| 1615 | let offset = func.dfg.immediates.len(); |
| 1616 | let offset = u32::try_from(offset).unwrap(); |
| 1617 | |
| 1618 | func.dfg.immediates.reserve(callee.dfg.immediates.len()); |
| 1619 | for imm in callee.dfg.immediates.values() { |
| 1620 | func.dfg.immediates.push(imm.clone()); |
| 1621 | } |
| 1622 | |
| 1623 | offset |
| 1624 | } |
| 1625 | |
| 1626 | /// Copy constants from the callee into the caller. |
| 1627 | fn create_constants(allocs: &mut InliningAllocs, func: &mut ir::Function, callee: &ir::Function) { |