Returns the memory flags of a given memory access.
(&self, ir_inst: Inst)
| 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 { |
no outgoing calls
no test coverage detected