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

Class ArbitraryFunctionConfig

src/debug_utils/generic_function/arbitrary.rs:25–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23/// It's generally fine to just use `Default::default` for this.
24#[derive(Debug, Clone)]
25pub struct ArbitraryFunctionConfig {
26 /// Number of CFG edges. This also implicitly controls the number of blocks
27 /// in a function since all blocks must be reachable from an entry point.
28 pub cfg_edges: RangeInclusive<usize>,
29
30 /// Number of entry points in the function.
31 pub entry_points: RangeInclusive<usize>,
32
33 /// Number of block parameters for each block that is allowed to have them.
34 pub blockparams_per_block: RangeInclusive<usize>,
35
36 /// Number of instructions per block, excluding the terminator instruction.
37 pub insts_per_block: RangeInclusive<usize>,
38
39 /// Number of definition operands (`Def` and `EarlyDef`) per instruction.
40 ///
41 /// Some instructions may exceed this limit due to the way the algorithm
42 /// works. This is because all used values need a definition, which may
43 /// force extra definitions to be added.
44 pub defs_per_inst: RangeInclusive<usize>,
45
46 /// Number of non-definition operands (`Use` and `NonAllocatable`) per
47 /// instruction.
48 pub uses_per_inst: RangeInclusive<usize>,
49
50 /// Number of clobbers per instruction.
51 pub clobbers_per_inst: RangeInclusive<usize>,
52}
53
54impl Default for ArbitraryFunctionConfig {
55 fn default() -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected