[−][src]Struct rustc_mir::transform::dest_prop::Conflicts
Fields
relevant_locals: &'a BitSet<Local>matrix: BitMatrix<Local, Local>The conflict matrix. It is always symmetric and the adjacency matrix of the corresponding conflict graph.
unify_cache: BitSet<Local>Preallocated BitSet used by unify.
unified_locals: InPlaceUnificationTable<UnifyLocal>Tracks locals that have been merged together to prevent cycles and propagate conflicts.
Implementations
impl<'a> Conflicts<'a>[src]
pub(in transform::dest_prop) fn build<'tcx>(
tcx: TyCtxt<'tcx>,
body: &Body<'tcx>,
relevant_locals: &'a BitSet<Local>
) -> Self[src]
tcx: TyCtxt<'tcx>,
body: &Body<'tcx>,
relevant_locals: &'a BitSet<Local>
) -> Self
pub(in transform::dest_prop) fn record_dataflow_conflicts(
&mut self,
new_conflicts: &mut BitSet<Local>
)[src]
&mut self,
new_conflicts: &mut BitSet<Local>
)
pub(in transform::dest_prop) fn record_local_conflict(
&mut self,
a: Local,
b: Local,
why: &str
)[src]
&mut self,
a: Local,
b: Local,
why: &str
)
pub(in transform::dest_prop) fn record_statement_conflicts(
&mut self,
stmt: &Statement<'_>
)[src]
&mut self,
stmt: &Statement<'_>
)
Records locals that must not overlap during the evaluation of stmt. These locals conflict
and must not be merged.
pub(in transform::dest_prop) fn record_terminator_conflicts(
&mut self,
term: &Terminator<'_>
)[src]
&mut self,
term: &Terminator<'_>
)
pub(in transform::dest_prop) fn can_unify(
&mut self,
a: Local,
b: Local
) -> bool[src]
&mut self,
a: Local,
b: Local
) -> bool
Checks whether a and b may be merged. Returns false if there's a conflict.
pub(in transform::dest_prop) fn unify(
&mut self,
a: Local,
b: Local
)[src]
&mut self,
a: Local,
b: Local
)
Merges the conflicts of a and b, so that each one inherits all conflicts of the other.
can_unify must have returned true for the same locals, or this may panic or lead to
miscompiles.
This is called when the pass makes the decision to unify a and b (or parts of a and
b) and is needed to ensure that future unification decisions take potentially newly
introduced conflicts into account.
For an example, assume we have locals _0, _1, _2, and _3. There are these conflicts:
_0<->_1_1<->_2_3<->_0
We then decide to merge _2 with _3 since they don't conflict. Then we decide to merge
_2 with _0, which also doesn't have a conflict in the above list. However _2 is now
_3, which does conflict with _0.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Conflicts<'a>
impl<'a> Send for Conflicts<'a>
impl<'a> Sync for Conflicts<'a>
impl<'a> Unpin for Conflicts<'a>
impl<'a> UnwindSafe for Conflicts<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.