Module sway_ir::analysis::memory_utils
source · Expand description
An analysis to compute symbols that escape out from a function. This could be into another function, or via ptr_to_int etc. Any transformations involving such symbols are unsafe.
Enums
Constants
Functions
- Combine a series of GEPs into one.
- Pointers that may possibly be loaded from.
- Symbols that may possibly be loaded from.
- Given a memory pointer instruction, compute the offset of indexed element, for each symbol that this may alias to.
- Pointers that may possibly be stored to.
- Symbols that may possibly be stored to.
- Can memory ranges [val1, val1+len1] and [val2, val2+len2] overlap? Conservatively returns true if cannot statically determine.
- Are memory ranges [val1, val1+len1] and [val2, val2+len2] exactly the same? Conservatively returns false if cannot statically determine.
- For a pointer argument
ptr_val
, what’s the size of its pointee.