(&self, func: &Function, inst: Inst)
| 117 | } |
| 118 | |
| 119 | fn get_last_store(&self, func: &Function, inst: Inst) -> PackedOption<Inst> { |
| 120 | if let Some(memflags) = func.dfg.insts[inst].memflags() { |
| 121 | match func.dfg.mem_flags[memflags].alias_region() { |
| 122 | None => self.other, |
| 123 | Some(region) => { |
| 124 | let region_store = self.regions[region]; |
| 125 | // If the region has never been explicitly stored to, |
| 126 | // fall back to the last fence (which affects all regions). |
| 127 | if region_store.is_none() { |
| 128 | self.last_fence |
| 129 | } else { |
| 130 | region_store |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | } else if func.dfg.insts[inst].opcode().can_load() |
| 135 | || func.dfg.insts[inst].opcode().can_store() |
| 136 | { |
| 137 | inst.into() |
| 138 | } else { |
| 139 | PackedOption::default() |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | fn meet_from(&mut self, other: &LastStores, loc: Inst) { |
| 144 | let meet = |a: PackedOption<Inst>, b: PackedOption<Inst>| -> PackedOption<Inst> { |
no test coverage detected