MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / CostModel

Class CostModel

src/debug_utils/cost_model.rs:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9/// implementation.
10#[derive(Debug, Clone)]
11pub 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
27impl Default for CostModel {
28 fn default() -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected