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

Method memflags

cranelift/codegen/src/machinst/lower.rs:1423–1435  ·  view source on GitHub ↗

Returns the memory flags of a given memory access.

(&self, ir_inst: Inst)

Source from the content-addressed store, hash-verified

1421
1422 /// Returns the memory flags of a given memory access.
1423 pub fn memflags(&self, ir_inst: Inst) -> Option<MachMemFlags> {
1424 match &self.f.dfg.insts[ir_inst] {
1425 &InstructionData::AtomicCas { flags, .. } => Some(self.f.dfg.mem_flags[flags].into()),
1426 &InstructionData::AtomicRmw { flags, .. } => Some(self.f.dfg.mem_flags[flags].into()),
1427 &InstructionData::Load { flags, .. }
1428 | &InstructionData::LoadNoOffset { flags, .. }
1429 | &InstructionData::Store { flags, .. } => Some(self.f.dfg.mem_flags[flags].into()),
1430 &InstructionData::StoreNoOffset { flags, .. } => {
1431 Some(self.f.dfg.mem_flags[flags].into())
1432 }
1433 _ => None,
1434 }
1435 }
1436
1437 /// Get the source location for a given instruction.
1438 pub fn srcloc(&self, ir_inst: Inst) -> RelSourceLoc {

Callers 4

stepFunction · 0.45
updateMethod · 0.45
get_last_storeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected