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.).

Re-exportsยง

use crate::compat::FxHashSet; ๐Ÿ”’
use crate::compat::Spanned; ๐Ÿ”’
use rustc_middle::mir::Local; ๐Ÿ”’
use rustc_middle::mir::Operand; ๐Ÿ”’
use rustc_middle::mir::Place; ๐Ÿ”’
use rustc_middle::mir::ProjectionElem; ๐Ÿ”’
use rustc_middle::mir::Rvalue; ๐Ÿ”’
use rustc_middle::mir::Terminator; ๐Ÿ”’
use rustc_middle::mir::TerminatorKind; ๐Ÿ”’

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.