(&mut self, other: &LastStores, loc: Inst)
| 141 | } |
| 142 | |
| 143 | fn meet_from(&mut self, other: &LastStores, loc: Inst) { |
| 144 | let meet = |a: PackedOption<Inst>, b: PackedOption<Inst>| -> PackedOption<Inst> { |
| 145 | match (a.into(), b.into()) { |
| 146 | (None, None) => None.into(), |
| 147 | (Some(a), None) => a, |
| 148 | (None, Some(b)) => b, |
| 149 | (Some(a), Some(b)) if a == b => a, |
| 150 | _ => loc.into(), |
| 151 | } |
| 152 | }; |
| 153 | |
| 154 | // Meet all region slots. |
| 155 | let max_len = core::cmp::max(self.regions.keys().len(), other.regions.keys().len()); |
| 156 | for i in 0..max_len { |
| 157 | let ar = AliasRegion::new(i); |
| 158 | self.regions[ar] = meet(self.regions[ar], other.regions[ar]); |
| 159 | } |
| 160 | self.other = meet(self.other, other.other); |
| 161 | self.last_fence = meet(self.last_fence, other.last_fence); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | /// A key identifying a unique memory location. |
no test coverage detected