Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Amanieu/regalloc3
/ functions
Functions
705 in github.com/Amanieu/regalloc3
⨍
Functions
705
◇
Types & classes
175
↓ 1 callers
Method
advance_left
( &mut self, gap_idx: usize, interference_weight: &mut f32,
src/internal/allocator/split.rs:608
↓ 1 callers
Method
all_value_sets
Returns all value sets and their associated `ValueSegment`s.
src/internal/value_live_ranges.rs:189
↓ 1 callers
Method
alloc_emergency_spillslot
Allocates a logical `SpillSlot` of the given size after regular spill slot allocation has already finished. This is used in the move resolver when a
src/internal/spill_allocator.rs:162
↓ 1 callers
Method
allocate
Assigns a `SpillSlot` to each `ValueSet` that has segments spilled into it. The basic algorithm here is based on linear scan allocation from <https:/
src/internal/spill_allocator.rs:175
↓ 1 callers
Method
allocate_registers
Runs the register allocator on the given function.
src/lib.rs:207
↓ 1 callers
Method
allocations
Returns all operand allocations in the function.
src/internal/allocations.rs:86
↓ 1 callers
Method
arbitrary
(u: &mut Unstructured)
fuzz/fuzz_targets/parallel_moves.rs:117
↓ 1 callers
Method
as_mut_vec
(&mut self)
src/entity/sparse.rs:227
↓ 1 callers
Method
assert_all_assigned
Asserts that all allocations have been assigned.
src/internal/allocations.rs:91
↓ 1 callers
Method
block_dominates
Returns whether block `a` dominates block `b`. This should return true if `a == b`.
src/function.rs:650
↓ 1 callers
Method
build_gap_segments
Builds the `GapSegments` by splitting the vreg's segments at gap boundaries. The new `GapSegments` only cover the parts of a gap where the vreg is act
src/internal/allocator/split.rs:491
↓ 1 callers
Method
build_initial_vregs
Builds virtual registers from value live ranges.
src/internal/virt_regs/mod.rs:188
↓ 1 callers
Method
build_segments
Computes the live range for the given value.
src/internal/value_live_ranges.rs:866
↓ 1 callers
Method
calc_block_live_in_out
Calculates the live-in/live-out bitsets for each block of the value's live range. This returns the highest numbered block found by the search.
src/internal/value_live_ranges.rs:799
↓ 1 callers
Method
check_bank
Check a register bank.
src/debug_utils/validate_reginfo.rs:96
↓ 1 callers
Method
check_block
Check a basic block.
src/debug_utils/validate_func.rs:417
↓ 1 callers
Method
check_block
Checks the allocation result for a block and then propagates the end state to any successor blocks.
src/debug_utils/checker.rs:239
↓ 1 callers
Method
check_class
Check a register class.
src/debug_utils/validate_reginfo.rs:157
↓ 1 callers
Method
check_function
Main entry point for `Function` validation.
src/debug_utils/validate_func.rs:828
↓ 1 callers
Method
check_function
Top-level function for the checker.
src/debug_utils/checker.rs:191
↓ 1 callers
Method
check_inst
Check an instruction.
src/debug_utils/validate_func.rs:346
↓ 1 callers
Method
check_inst
Checks an `OutputInst` and updates the checker state to reflect that instruction.
src/debug_utils/checker.rs:319
↓ 1 callers
Method
check_inst_range
Checks a range of instructions.
src/debug_utils/validate_func.rs:131
↓ 1 callers
Method
check_limits
Check the limits on the number of entities.
src/debug_utils/validate_func.rs:139
↓ 1 callers
Method
check_limits
Check the limits on the number of entities.
src/debug_utils/validate_reginfo.rs:71
↓ 1 callers
Method
check_operand
Checks the allocation assigned to an instruction operand. Also updates the checker state for def operands. `pass` indicates which set of operands to
src/debug_utils/checker.rs:727
↓ 1 callers
Function
check_output
Verifies the output of the register allocator. If this fails then it indicates a bug in the register allocator, assuming the `Function` and `RegInfo`
src/debug_utils/checker.rs:911
↓ 1 callers
Method
check_reg
Check a register.
src/debug_utils/validate_reginfo.rs:320
↓ 1 callers
Method
check_reg_group
Check a register group.
src/debug_utils/validate_reginfo.rs:348
↓ 1 callers
Method
check_reginfo
Main entry point for `RegInfo` validation.
src/debug_utils/validate_reginfo.rs:380
↓ 1 callers
Method
check_remat_input
Checks an indirect-remat input allocation.
src/debug_utils/checker.rs:607
↓ 1 callers
Method
check_ssa_dominance
Check that defs dominate uses. At this point the dominator tree should be valid and all values should have a `ValueDef`.
src/debug_utils/validate_func.rs:604
↓ 1 callers
Method
check_stack
Checks the stack layout and spill slot definitions.
src/debug_utils/checker.rs:217
↓ 1 callers
Method
check_value
(&mut self, value: Value)
src/debug_utils/validate_func.rs:715
↓ 1 callers
Method
clear
(&mut self)
src/internal/virt_regs/builder.rs:106
↓ 1 callers
Method
coalesce_in_block
Find pairs of values to merge in the given block. We merge pairs where allocating both values to the same register would eliminate the need for a mov
src/internal/coalescing.rs:145
↓ 1 callers
Method
collect_fixed_preferences
Scans the uses of the given virtual register to find any preferences for a particular register due to fixed-register constraints.
src/internal/allocator/order.rs:186
↓ 1 callers
Method
collect_gaps
Buids gaps between `SplitUse`s, also splitting at block frequency transitions so that we can extend splits to include an entire loop. Returns the ind
src/internal/allocator/split.rs:314
↓ 1 callers
Method
collect_used_spillslots
Removes spill slots that are no longer referenced after optimization.
src/internal/spill_allocator.rs:235
↓ 1 callers
Method
collect_uses
Iterate over all blocks and instructions to collect value uses.
src/internal/value_live_ranges.rs:289
↓ 1 callers
Method
collect_uses
Collects all instructions where the given virtual register is used.
src/internal/allocator/split.rs:174
↓ 1 callers
Method
components
Iterates over all components of this value segment in order. This will indicate live-in/out, block boundaries and uses.
src/internal/live_range.rs:370
↓ 1 callers
Method
compute
Computes the allocation order for the given virtual register.
src/internal/allocator/order.rs:66
↓ 1 callers
Method
compute_alloc_offsets
Computes the offsets for each instruction's operands in the allocation vector.
src/internal/allocations.rs:36
↓ 1 callers
Method
compute_block_order
Computes an ordering of blocks sorted by priority. Each merge eliminates the need for one move instruction in the final program. However a successful
src/internal/coalescing.rs:109
↓ 1 callers
Method
compute_common_dominator
Computes the common dominator of two basic blocks using only the parent links in the tree.
src/debug_utils/dominator_tree.rs:187
↓ 1 callers
Method
compute_constraints
Computes register class constraints for the live range uses in the current set of segments. If a conflict is found, the segments are split and the no
src/internal/virt_regs/builder.rs:457
↓ 1 callers
Method
compute_entry_states
Computes the entry state for all blocks in the function.
src/internal/move_optimizer.rs:187
↓ 1 callers
Method
compute_idoms
Computes the immediate dominator of each basic block. The algorithm is based on https://www.cs.rice.edu/~keith/EMBED/dom.pdf.
src/debug_utils/dominator_tree.rs:133
↓ 1 callers
Function
compute_preds_and_dominators
(func: &mut GenericFunction)
src/debug_utils/generic_function/parse.rs:360
↓ 1 callers
Method
contains_key
(&self, key: K)
src/entity/sparse.rs:146
↓ 1 callers
Method
count_live_insts
Counts the number of instructions in each gap. This is needed to correctly estimate the spill weight of a vreg covering this gap.
src/internal/allocator/split.rs:440
↓ 1 callers
Method
dequeue
Dequeues the entry with the highest priority from the queue.
src/internal/allocator/queue.rs:157
↓ 1 callers
Method
divert
Diverts the given value to a scratch register to resolve cyclic conflicts in the parallel moves. A scratch register is selected and returned.
src/internal/parallel_moves.rs:353
↓ 1 callers
Method
do_split
Actually perform the split at the given split points. `hint` is applied to the middle portion between `left` and `right`.
src/internal/allocator/split.rs:842
↓ 1 callers
Method
dump
(&self)
src/internal/reg_matrix.rs:475
↓ 1 callers
Method
dump
Dumps the virtual registers to the log.
src/internal/virt_regs/mod.rs:248
↓ 1 callers
Method
edits_from_mut
Returns the mutable list of edits starting from the given instruction.
src/internal/move_resolver.rs:545
↓ 1 callers
Method
edits_to_mut
Returns the mutable list of edits ending at the given instruction.
src/internal/move_resolver.rs:551
↓ 1 callers
Method
emit
Writes the register definition to the given sink.
regalloc3-tool/src/example_reginfo/mod.rs:100
↓ 1 callers
Method
emit_vregs_for_conflicts
Emits a set of vregs containing single `Use`s which were removed from another vreg due to a constraint conflict on the same instruction.
src/internal/virt_regs/builder.rs:609
↓ 1 callers
Method
end_point
Returns the live range point at which this use ends. For a use, this is the point at which the value is used. For a definition, this is the next ins
src/internal/uses.rs:92
↓ 1 callers
Method
extend
(&mut self, iter: I)
src/entity/small_set.rs:266
↓ 1 callers
Method
extend
(&mut self, iter: I)
src/entity/set.rs:257
↓ 1 callers
Method
finalize
Finalizes the function by assigning instruction numbers to each instruction, in block order.
src/debug_utils/generic_function/arbitrary.rs:838
↓ 1 callers
Method
finalize_stack_layout
Assigns final stack offsets to all active spill slots.
src/internal/spill_allocator.rs:278
↓ 1 callers
Method
find_available_reg
Searches for a register that has no interference with the given virtual register.
src/internal/allocator/mod.rs:659
↓ 1 callers
Method
find_best_use
Finds the "best" use with the highest weight that we should build a split region around. Even if we can't build a region for it, we can isolate it an
src/internal/allocator/split.rs:276
↓ 1 callers
Method
find_conflict_start_point
Starting from the `Use` that caused a conflict, scan backwards to find the corresponding `Use` that actually conflicts with the other `Use`. This wil
src/internal/virt_regs/builder.rs:697
↓ 1 callers
Method
find_optimal_split_point
Finds an optimal split point which is between the two instuctions given, based on basic block frequencies. `prefer_early` indicates whether to prefer
src/internal/split_placement.rs:96
↓ 1 callers
Method
find_reused_values
Scans the operand list of an instruction to find input values whose register is reused for an output.
src/internal/value_live_ranges.rs:344
↓ 1 callers
Method
gen_bank
Creates a new register bank.
src/debug_utils/generic_reginfo/arbitrary.rs:106
↓ 1 callers
Method
gen_block_insts
Generate the contents of a basic block. This should be called in CFG post-order so that uses come before definitions.
src/debug_utils/generic_function/arbitrary.rs:371
↓ 1 callers
Method
gen_block_start_defs
Generates instructions containing the remaining defs in a block after other instructions have been emitted.
src/debug_utils/generic_function/arbitrary.rs:697
↓ 1 callers
Method
gen_cfg_skeleton
Generates a function skeleton with a randomly generated CFG. These blocks do not contain any instructions yet.
src/debug_utils/generic_function/arbitrary.rs:225
↓ 1 callers
Method
gen_groups
Creates register groups from the given registers.
src/debug_utils/generic_reginfo/arbitrary.rs:262
↓ 1 callers
Method
gen_reg
Creates a new register in a bank, making sure it doesn't share a unit with an existing register in the bank.
src/debug_utils/generic_reginfo/arbitrary.rs:295
↓ 1 callers
Method
gen_reginfo
(self, num_fixed_stack: usize)
regalloc3-tool/src/example_reginfo/mod.rs:22
↓ 1 callers
Method
generate_moves
Processes all virtual register segments to assign allocations to the output vector and generates move instruction that connect live ranges together.
src/internal/move_resolver.rs:232
↓ 1 callers
Method
grow_to
(&mut self, max_index: usize)
src/entity/sparse.rs:82
↓ 1 callers
Method
grow_to
(&mut self, max_index: usize)
src/entity/secondary_map.rs:90
↓ 1 callers
Method
handle_use
(&mut self, u: &Use, segment: &ValueSegment, alloc: Option<Allocation>)
src/internal/move_resolver.rs:827
↓ 1 callers
Method
has_fixed_hint
Quickly checks whether the given value has a fixed-register hint.
src/internal/hints.rs:174
↓ 1 callers
Method
highest_preferrence_weight
Returns the highest preferrence weight in the available candidates.
src/internal/allocator/order.rs:177
↓ 1 callers
Method
hinted_order
Returns the subset of the allocation order that comes from hints rather than the class allocation order.
src/internal/allocator/order.rs:149
↓ 1 callers
Method
hints_for_split
Given a live range split, returns whether the left and right sides of the split still have a fixed register hint.
src/internal/hints.rs:195
↓ 1 callers
Method
index
(&self, set: ValueSet)
src/internal/value_live_ranges.rs:164
↓ 1 callers
Method
indirect_remat_inputs
Finds the concrete input allocations needed for a shallow indirect rematerialization of `value` into `dest`.
src/internal/move_optimizer.rs:717
↓ 1 callers
Method
init
Initializes the allocation queue from the set of existing virtual register and virtual register groups.
src/internal/allocator/queue.rs:132
↓ 1 callers
Method
insert_iter_at
(&self, index: usize, iter: I, pool: &mut CompactListPool<T>)
src/entity/compact_list.rs:77
↓ 1 callers
Method
inst_allocations_mut
Returns a mutable slice of allocations for an instruction's operands.
src/internal/allocations.rs:79
↓ 1 callers
Method
into_iter
(self)
src/entity/primary_map.rs:262
↓ 1 callers
Method
into_iter
(self)
src/entity/sparse.rs:322
↓ 1 callers
Method
into_iter
(self)
src/entity/secondary_map.rs:216
↓ 1 callers
Method
invalidate_value_group_mapping
Invalidates the mapping of a group operand to a `VirtRegGroup`. This is used when a virtual register is split or spilled into a new set of virtual re
src/internal/virt_regs/builder.rs:114
↓ 1 callers
Method
is_def
Whether this `UseKind` represents the definition of a `Value`.
src/internal/uses.rs:262
↓ 1 callers
Method
is_late
Whether this is a late move on a jump instruction.
src/internal/move_resolver.rs:96
↓ 1 callers
Method
is_memory
(self, reginfo: &impl RegInfo)
src/output.rs:146
↓ 1 callers
Method
is_reachable
Returns whether a basic block is reachable from any entry point.
src/debug_utils/postorder.rs:69
↓ 1 callers
Method
is_unit_free
Checks whether the given register unit is free for the given live range segment.
src/internal/reg_matrix.rs:331
← previous
next →
301–400 of 705, ranked by callers