state' = state \ kill U gen return lockguard relation(a, b) where a is still live when b becomes live.
(
state: &mut LiveLockGuards,
gen: Option<&LiveLockGuards>,
kill: Option<&LiveLockGuards>,
)
| 508 | /// Collect gen/kill info for related locations. |
| 509 | fn gen_kill_locations( |
| 510 | lockguard_map: &LockGuardMap<'tcx>, |
| 511 | ) -> ( |
| 512 | FxHashMap<Location, LiveLockGuards>, |
| 513 | FxHashMap<Location, LiveLockGuards>, |
| 514 | ) { |
| 515 | let mut gen_map: FxHashMap<Location, LiveLockGuards> = Default::default(); |
| 516 | let mut kill_map: FxHashMap<Location, LiveLockGuards> = Default::default(); |
| 517 | for (id, info) in lockguard_map { |
| 518 | for loc in &info.gen_locs { |
| 519 | gen_map.entry(*loc).or_default().insert(*id); |
| 520 | } |
| 521 | for loc in &info.kill_locs { |
| 522 | kill_map.entry(*loc).or_default().insert(*id); |
| 523 | } |
| 524 | } |
| 525 | (gen_map, kill_map) |
| 526 | } |
| 527 | |
| 528 | /// state' = state \ kill U gen |
| 529 | /// return lockguard relation(a, b) where a is still live when b becomes live. |
| 530 | fn apply_gen_kill( |
| 531 | state: &mut LiveLockGuards, |
| 532 | gen: Option<&LiveLockGuards>, |
nothing calls this directly
no test coverage detected