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

Method check_value_def

src/debug_utils/validate_func.rs:159–165  ·  view source on GitHub ↗

Record the definition of a value and check for duplicate definitions.

(&mut self, value: Value, def: ValueDef)

Source from the content-addressed store, hash-verified

157
158 /// Record the definition of a value and check for duplicate definitions.
159 fn check_value_def(&mut self, value: Value, def: ValueDef) -> Result<()> {
160 match self.value_defs[value] {
161 Some(_) => bail!("{value} defined multiple times"),
162 ref mut opt @ None => *opt = Some(def),
163 }
164 Ok(())
165 }
166
167 /// Check for multiple conflicting uses of a fixed register in a single
168 /// constraint scope.

Callers 2

check_instMethod · 0.80
check_blockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected