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

Method queue_new_vregs

src/internal/allocator/split.rs:1398–1422  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1396 }
1397
1398 fn queue_new_vregs(&mut self) {
1399 // Then queue the newly created virtual registers. This needs to be done
1400 // after all split products are created so that virtual register groups
1401 // are complete.
1402 for &vreg in &self.allocator.splitter.new_vregs {
1403 trace!("Created split product {vreg}");
1404
1405 // If the virtual register is part of a group, enqueue the whole
1406 // group instead.
1407 let vreg_or_group = if let Some(group) = self.virt_regs[vreg].group.expand() {
1408 // Only do this once for the group leader.
1409 if self.virt_regs[vreg].group_index != 0 {
1410 continue;
1411 }
1412 VirtRegOrGroup::Group(group)
1413 } else {
1414 VirtRegOrGroup::Reg(vreg)
1415 };
1416
1417 trace!("Queuing split product {vreg_or_group}");
1418 self.allocator
1419 .queue
1420 .enqueue(vreg_or_group, Stage::Evict, self.virt_regs);
1421 }
1422 }
1423}

Callers 3

do_splitMethod · 0.80
isolate_group_usesMethod · 0.80
spillMethod · 0.80

Calls 2

expandMethod · 0.80
enqueueMethod · 0.80

Tested by

no test coverage detected