rapx::analysis::core::range_analysis::SSA::Replacer

Struct Replacer

source
pub struct Replacer<'tcx> {
    pub(crate) tcx: TyCtxt<'tcx>,
    pub(crate) ssatransformer: SSATransformer<'tcx>,
    pub(crate) new_local_collection: HashSet<Local>,
}

Fields§

§tcx: TyCtxt<'tcx>§ssatransformer: SSATransformer<'tcx>§new_local_collection: HashSet<Local>

Implementations§

source§

impl<'tcx> Replacer<'tcx>

source

pub fn insert_phi_statment(&mut self, body: &mut Body<'tcx>)

source

pub fn insert_essa_statement(&mut self, body: &mut Body<'tcx>)

source

fn essa_process_basic_block(&mut self, bb: BasicBlock, body: &mut Body<'tcx>)

source

fn extract_condition( &self, place: &Place<'tcx>, switch_block: BasicBlockData<'tcx>, ) -> Option<(Operand<'tcx>, Operand<'tcx>, BinOp)>

source

fn essa_assign_statement( &mut self, bb: &BasicBlock, switch_block: &BasicBlock, value: u128, discr: &Operand<'tcx>, body: &mut Body<'tcx>, )

source

pub fn flip(binOp: BinOp) -> BinOp

source

pub fn rename_variables(&mut self, body: &mut Body<'tcx>)

source

fn process_basic_block(&mut self, bb: BasicBlock, body: &mut Body<'tcx>)

source

pub fn process_essa_statments( &mut self, succ_bb: BasicBlock, body: &mut Body<'tcx>, switch_bb: BasicBlock, )

source

fn process_phi_functions( &mut self, succ_bb: BasicBlock, body: &mut Body<'tcx>, do_bb: BasicBlock, )

source

pub fn rename_statement(&mut self, bb: BasicBlock, body: &mut Body<'tcx>)

source

fn rename_terminator(&mut self, bb: BasicBlock, body: &mut Body<'tcx>)

source

fn replace_rvalue(&mut self, rvalue: &mut Rvalue<'tcx>, bb: &BasicBlock)

source

fn replace_operand(&mut self, operand: &mut Operand<'tcx>, bb: &BasicBlock)

source

fn replace_place(&mut self, place: &mut Place<'tcx>, bb: &BasicBlock)

source

fn rename_local_def( &mut self, place: &mut Place<'tcx>, bb: &BasicBlock, not_phi: bool, )

source

pub fn dominates_(&self, def_bb: &BasicBlock, bb: &BasicBlock) -> bool

source

fn update_reachinf_def(&mut self, local: &Local, bb: &BasicBlock)

Auto Trait Implementations§

§

impl<'tcx> !Freeze for Replacer<'tcx>

§

impl<'tcx> !RefUnwindSafe for Replacer<'tcx>

§

impl<'tcx> !Send for Replacer<'tcx>

§

impl<'tcx> !Sync for Replacer<'tcx>

§

impl<'tcx> Unpin for Replacer<'tcx>

§

impl<'tcx> !UnwindSafe for Replacer<'tcx>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.