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§
- Provides Symbols, both Symbol::Locals and Symbol::Args, reachable from a certain Value via chain of InstOp::GetElemPtr (GEP) instructions or via InstOp::IntToPtr and InstOp::PtrToInt instruction patterns specific to references, both referencing (
&
) and dereferencing (*
), and raw pointers, via__addr_of
.
Constants§
Functions§
- Combine a series of GEPs into one.
- Get Symbols, both Symbol::Locals and Symbol::Args, reachable from the
val
via chain of InstOp::GetElemPtr (GEP) instructions. Aval
can, via GEP instructions, refer indirectly to none, or one or more symbols. - Pointers that may possibly be loaded from the instruction
inst
. - Symbols that may possibly, directly or indirectly, be loaded from the instruction
inst
. - 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.
- Get Symbols, both Symbol::Locals and Symbol::Args, reachable from the
val
via chain of InstOp::GetElemPtr (GEP) instructions or via InstOp::IntToPtr and InstOp::PtrToInt instruction patterns specific to references, both referencing (&
) and dereferencing (*
), and raw pointers, via__addr_of
. Aval
can, via these instructions, refer indirectly to none, or one or more symbols. - Pointers that may possibly be stored to the instruction
inst
. - Symbols that may possibly, directly or indirectly, be stored to the instruction
inst
. - 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.