Skip to content

Commit aeb4669

Browse files
committed
Rename get_range_assignment_operand to get_range_operand_assignment
That way it's actually consistent with the type name.
1 parent c074556 commit aeb4669

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

crates/codegen/src/regalloc/parallel_copy.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,20 +231,15 @@ impl<'s, S: RegScavenger> ResolvedCopyContext<'s, S> {
231231

232232
// Restore the original value of `tmp_reg` from the emergency spill.
233233
self.emit_raw(
234-
OperandAssignment::Spill(
235-
emergency_spill,
236-
).into(),
234+
OperandAssignment::Spill(emergency_spill).into(),
237235
OperandAssignment::Reg(tmp_reg),
238236
);
239237

240238
(tmp_reg, Some(emergency_spill))
241239
}
242240
};
243241

244-
self.emit_raw(
245-
OperandAssignment::Reg(tmp_reg).into(),
246-
to,
247-
);
242+
self.emit_raw(OperandAssignment::Reg(tmp_reg).into(), to);
248243
self.emit_raw(from, OperandAssignment::Reg(tmp_reg));
249244

250245
if let Some(emergency_spill) = emergency_spill {

crates/codegen/src/regalloc/reify.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl<M: MachineRegalloc> RegAllocContext<'_, M> {
146146
let Some(&first_range) = self.vreg_ranges[block_param].first() else {
147147
continue;
148148
};
149-
let assignment = self.get_range_assignment_operand(first_range);
149+
let assignment = self.get_range_operand_assignment(first_range);
150150

151151
record_parallel_copy(
152152
copies,
@@ -526,7 +526,7 @@ impl<M: MachineRegalloc> RegAllocContext<'_, M> {
526526
continue;
527527
}
528528

529-
let range_assignment = self.get_range_assignment_operand(range);
529+
let range_assignment = self.get_range_operand_assignment(range);
530530

531531
// Assign defs based on range data.
532532
for &range_instr in instrs {
@@ -572,7 +572,7 @@ impl<M: MachineRegalloc> RegAllocContext<'_, M> {
572572
continue;
573573
}
574574

575-
let range_assignment = self.get_range_assignment_operand(range);
575+
let range_assignment = self.get_range_operand_assignment(range);
576576

577577
for &range_instr in instrs {
578578
if range_instr.is_def() {
@@ -651,7 +651,7 @@ impl<M: MachineRegalloc> RegAllocContext<'_, M> {
651651
}
652652
}
653653

654-
fn get_range_assignment_operand(&self, range: LiveRange) -> OperandAssignment {
654+
fn get_range_operand_assignment(&self, range: LiveRange) -> OperandAssignment {
655655
self.get_range_assignment(range)
656656
.as_operand()
657657
.expect("expected range assignment to be an operand")
@@ -688,9 +688,8 @@ impl<M: MachineRegalloc> RegAllocContext<'_, M> {
688688
);
689689
}
690690

691-
OperandAssignment::Spill(
692-
self.live_sets[fragment_data.live_set].spill_slot.unwrap(),
693-
).into()
691+
OperandAssignment::Spill(self.live_sets[fragment_data.live_set].spill_slot.unwrap())
692+
.into()
694693
}
695694
}
696695
}

0 commit comments

Comments
 (0)