| 418 | } |
| 419 | |
| 420 | fn verify_alias_regions(&self, errors: &mut VerifierErrors) -> VerifierStepResult { |
| 421 | let mut seen_user_ids = crate::HashMap::new(); |
| 422 | for (ar, ar_data) in self.func.dfg.alias_regions.iter() { |
| 423 | if let Some(&prev) = seen_user_ids.get(&ar_data.user_id) { |
| 424 | errors.report(( |
| 425 | ar, |
| 426 | format!( |
| 427 | "duplicate alias region user_id {}: {} and {}", |
| 428 | ar_data.user_id, prev, ar |
| 429 | ), |
| 430 | )); |
| 431 | } else { |
| 432 | seen_user_ids.insert(ar_data.user_id, ar); |
| 433 | } |
| 434 | } |
| 435 | Ok(()) |
| 436 | } |
| 437 | |
| 438 | /// Check that the given block can be encoded as a BB, by checking that only |
| 439 | /// branching instructions are ending the block. |