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

Method check_fixed

src/debug_utils/validate_func.rs:169–180  ·  view source on GitHub ↗

Check for multiple conflicting uses of a fixed register in a single constraint scope.

(&mut self, source: ConstraintSource, reg: PhysReg, early: bool)

Source from the content-addressed store, hash-verified

167 /// Check for multiple conflicting uses of a fixed register in a single
168 /// constraint scope.
169 fn check_fixed(&mut self, source: ConstraintSource, reg: PhysReg, early: bool) -> Result<()> {
170 let set = if early {
171 &mut self.early_fixed
172 } else {
173 &mut self.late_fixed
174 };
175 for unit in self.reginfo.reg_units(reg) {
176 ensure!(!set.contains(unit), "{source}: Conflicting uses of {reg}");
177 set.insert(unit);
178 }
179 Ok(())
180 }
181
182 /// Check an operand with a constraint.
183 fn check_constraint(

Callers 1

check_constraintMethod · 0.80

Calls 2

reg_unitsMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected