Skip to main content

Module memory_ssa

Module memory_ssa 

Source
Expand description

IR- and alias-domain-independent access-based MemorySSA.

This module owns only the sparse LiveOnEntry/MemoryDef/MemoryPhi graph, program-point coordinates into that graph, and the generic clobber walk. Definition effects, byte ranges, read queries, value numbers, and lowering certificates belong to client adapters.

Graph construction uses O(B + E + C + D + F) storage, where B/E describe the CFG, C is the number of captured program points, D is the number of memory definitions, and F is the number of MemoryPhi inputs. A clobber query is linear in the visited graph in the worst case and reuses one O(D + F) scratch allocation across all of that query’s start points.

Structs§

ClobberQuery
Multi-point clobber query for one immutable alias query. Resolving a phi root and then its incoming states therefore visits each access at most once instead of restarting a whole-graph walk per edge.
ClobberWalker
Reusable, query-local state for clobber walking. It owns no graph and no alias-domain data.
MemoryAccessEvent
One ordered program event. An event with a definition creates one MemoryDef; an event without one only records a queryable program point.
MemoryAccessGraph
Sparse memory-state graph. It contains no alias information and no read query results.
MemoryAccessId
MemoryPointAccess
MemoryPointMap
Coordinate conversion produced while building a graph.
MemorySsaError

Enums§

MemoryAccess
MemoryClobber
Result of a clobber walk. Access is a stable identity within the graph and can therefore be embedded in a client-specific snapshot certificate.

Traits§

AliasOracle
Alias policy supplied by a client. The definition identity is the graph payload; effects and query representation remain outside MemorySSA.

Functions§

build
Build a standard access-based MemorySSA graph and a separate coordinate map. The caller decides which events are memory definitions; no effect or alias representation crosses this interface.