Expand description
A simplified version of rust mir.
Structs§
- Basic
Block Data  - Body
 - Call
Args  - Instance
 - An 
Instanceis the resolved call-target at a particular trait-call-site - Local
Decl  - Place
 - Place
Ref  - Statement
 - Terminator
 - Basic
Block  - A node in the MIR control-flow graph.
 - Field
Idx  - The source-order index of a field in a variant.
 - Local
 - Location
 Locationrepresents the position of the start of the statement; or, ifstatement_indexequals the number of statements, then the start of the terminator.- Source
Info  - Grouped information about the source code origin of a MIR entity. Intended to be inspected by diagnostics and debuginfo. Most passes can work with it as a whole, within a single function.
 - Switch
Targets  - User
Type Annotation Index  - Variant
Idx  - The source-order index of a variant in a type.
 
Enums§
- Aggregate
Kind  - Assert
Kind  - BinOp
 - Call
Kind  - Cast
Kind  - Constant
 - NonDiverging
Intrinsic  - NullOp
 - Operand
 - Place
Elem  - Pointer
Cast  - Rvalue
 - Corresponds to https://doc.rust-lang.org/beta/nightly-rustc/rustc_middle/mir/enum.Rvalue.html
 - Statement
Kind  - Terminator
Kind  - Borrow
Kind  - Fake
Borrow Kind  - Fake
Read Cause  - The 
FakeReadCausedescribes the type of pattern why a FakeRead statement exists. - Local
Kind  - Classifies locals into categories. See 
Body::local_kind. - RawPtr
Kind  - UnOp
 - Unwind
Action  - Action to be taken when a stack unwind happens.
 - Variance
 
Constants§
- FIRST_
VARIANT  - Equivalent to 
VariantIdx(0). - RETURN_
PLACE  - START_
BLOCK  
Functions§
- mk_
fake_ 🔒predecessors  - The 
FalseEdge/imaginary_targetedges mess up theis_join_pointcomputation which creates spurious join points that lose information e.g. in match arms, the k+1-th arm has the k-th arm as a “fake” predecessor so we lose the assumptions specific to the k+1-th arm due to a spurious join. This code corrects for this problem by computing the number of “fake” predecessors and decreasing them from the total number of “predecessors” returned byrustc. The option is to recompute “predecessors” from scratch but we may miss some cases there. (see alsois_join_point) - opt_
bb_ 🔒to_ str