pub struct FieldAnalysis {
pub definitely_initialized: HashMap<BasicBlockId, HashSet<FieldKey>>,
pub field_liveness: HashMap<BasicBlockId, HashSet<FieldKey>>,
pub dead_fields: HashSet<FieldKey>,
pub conditionally_initialized: HashSet<FieldKey>,
pub hoisted_fields: HashMap<SlotId, Vec<FieldIdx>>,
pub hoisting_recommendations: HashMap<SlotId, Vec<(FieldIdx, String)>>,
}Expand description
Results of field-level analysis for a single MIR function.
Fields§
§definitely_initialized: HashMap<BasicBlockId, HashSet<FieldKey>>Fields that are definitely initialized at the entry of each block.
field_liveness: HashMap<BasicBlockId, HashSet<FieldKey>>Fields that are live (have future reads) at the entry of each block.
dead_fields: HashSet<FieldKey>Fields that are assigned but never read anywhere in the function.
conditionally_initialized: HashSet<FieldKey>Fields that are initialized on some but not all paths to a use point.
hoisted_fields: HashMap<SlotId, Vec<FieldIdx>>Fields eligible for TypedObject schema hoisting: written on any path and not dead. Keyed by slot, with the list of field indices to hoist.
hoisting_recommendations: HashMap<SlotId, Vec<(FieldIdx, String)>>MIR-authoritative hoisting recommendations: maps each slot to pairs of (field_index, field_name) for schema construction. Populated when field names are available from the lowering result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldAnalysis
impl RefUnwindSafe for FieldAnalysis
impl Send for FieldAnalysis
impl Sync for FieldAnalysis
impl Unpin for FieldAnalysis
impl UnsafeUnpin for FieldAnalysis
impl UnwindSafe for FieldAnalysis
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more