sway_ir::analysis::memory_utils

Function get_memory_offsets

Source
pub fn get_memory_offsets(
    context: &Context<'_>,
    val: Value,
) -> Option<FxIndexMap<Symbol, u64>>
Expand description

Given a memory pointer instruction, compute the offset of indexed element, for each symbol that it may alias to. If for any symbol we can’t compute it, return None.