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

Method meet_from

cranelift/codegen/src/alias_analysis.rs:143–162  ·  view source on GitHub ↗
(&mut self, other: &LastStores, loc: Inst)

Source from the content-addressed store, hash-verified

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.

Callers 1

Calls 4

maxFunction · 0.85
newFunction · 0.50
lenMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected