MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / get_last_store

Method get_last_store

cranelift/codegen/src/alias_analysis.rs:119–141  ·  view source on GitHub ↗
(&self, func: &Function, inst: Inst)

Source from the content-addressed store, hash-verified

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> {

Callers 1

process_instMethod · 0.80

Calls 6

can_loadMethod · 0.80
can_storeMethod · 0.80
memflagsMethod · 0.45
alias_regionMethod · 0.45
is_noneMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected