Skip to main content

Module def_use

Module def_use 

Source
Expand description

Def-use computation types and pure MIR helpers.

These types (PlaceKey, PlaceBaseKey, RelevantPlaces, DefUse) track which MIR places are relevant to an analysis and compute definitions/uses from MIR terminators. Shared between the verify module and other analysis passes (points-to, etc.).

Structs§

DefUse
Definitions and uses collected from one MIR item.
PlaceKey
Projection-insensitive enough place key for relevance tracking.
RelevantPlaces
Set of places that make MIR items relevant to a property.

Enums§

PlaceBaseKey
Base of a contract/MIR place tracked by relevance.

Functions§

call_args_uses_at
Collect MIR roots used by selected call argument indices.
operand_uses
Collect all MIR roots used by an operand.
place_projection_uses 🔒
place_uses 🔒
rvalue_operands
Collect all MIR operands referenced by an rvalue.
terminator_use_def
Collect definitions and uses for one MIR terminator.
trace_place_origin
Trace a PlaceKey through the dataflow graph to resolve Copy/Move chains back to their origin local.