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

Method check_fixed_conflict

src/debug_utils/generic_function/arbitrary.rs:440–453  ·  view source on GitHub ↗

Checks if the given register can be used as an early/late fixed-register constraint, and if successful, marks all of the register's sub-units as in-use for the current instruction.

(&mut self, reg: PhysReg, early: bool, late: bool)

Source from the content-addressed store, hash-verified

438 /// constraint, and if successful, marks all of the register's sub-units as
439 /// in-use for the current instruction.
440 fn check_fixed_conflict(&mut self, reg: PhysReg, early: bool, late: bool) -> bool {
441 if self.reginfo.reg_units(reg).any(|unit| {
442 (early && self.early_fixed.contains(unit)) || (late && self.late_fixed.contains(unit))
443 }) {
444 return false;
445 }
446 if early {
447 self.early_fixed.extend(self.reginfo.reg_units(reg));
448 }
449 if late {
450 self.late_fixed.extend(self.reginfo.reg_units(reg));
451 }
452 true
453 }
454
455 /// Returns a value for use as an `OperandKind::Use` in the given block.
456 ///

Callers 3

gen_useMethod · 0.80
add_indirect_rematMethod · 0.80
gen_defMethod · 0.80

Calls 3

reg_unitsMethod · 0.80
containsMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected