[][src]Enum rustc_mir::transform::add_call_guards::AddCallGuards

pub enum AddCallGuards {
    AllCallEdges,
    CriticalCallEdges,
}

Variants

AllCallEdges
CriticalCallEdges

Implementations

impl AddCallGuards[src]

pub fn add_call_guards(&self, body: &mut Body<'_>)[src]

Trait Implementations

impl<'tcx> MirPass<'tcx> for AddCallGuards[src]

Breaks outgoing critical edges for call terminators in the MIR.

Critical edges are edges that are neither the only edge leaving a block, nor the only edge entering one.

When you want something to happen "along" an edge, you can either do at the end of the predecessor block, or at the start of the successor block. Critical edges have to be broken in order to prevent "edge actions" from affecting other edges. We need this for calls that are codegened to LLVM invoke instructions, because invoke is a block terminator in LLVM so we can't insert any code to handle the call's result into the block that performs the call.

This function will break those edges by inserting new blocks along them.

NOTE: Simplify CFG will happily undo most of the work this pass does.

impl PartialEq<AddCallGuards> for AddCallGuards[src]

impl StructuralPartialEq for AddCallGuards[src]

Auto Trait Implementations

impl RefUnwindSafe for AddCallGuards

impl Send for AddCallGuards

impl Sync for AddCallGuards

impl Unpin for AddCallGuards

impl UnwindSafe for AddCallGuards

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]