| 9 | /// implementation. |
| 10 | #[derive(Debug, Clone)] |
| 11 | pub struct CostModel { |
| 12 | /// Cost of a load from memory into a register. |
| 13 | pub load_cost: f32, |
| 14 | |
| 15 | /// Cost of a store from a register into memory. |
| 16 | pub store_cost: f32, |
| 17 | |
| 18 | /// Cost of a move from one register to another. |
| 19 | pub move_cost: f32, |
| 20 | |
| 21 | /// Cost of rematerializing a value with [`RematCost::CheaperThanLoad`]. |
| 22 | /// |
| 23 | /// The cost for [`RematCost::CheaperThanMove`] is assumed to be zero. |
| 24 | pub remat_cost: f32, |
| 25 | } |
| 26 | |
| 27 | impl Default for CostModel { |
| 28 | fn default() -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected