Struct ConstraintGraph

Source
pub struct ConstraintGraph<'tcx, T: IntervalArithmetic + Debug> {
Show 19 fields pub vars: VarNodes<'tcx, T>, pub oprs: GenOprs<'tcx, T>, pub defmap: DefMap<'tcx>, pub usemap: UseMap<'tcx>, pub symbmap: SymbMap<'tcx>, pub values_branchmap: ValuesBranchMap<'tcx, T>, constant_vector: Vec<T>, pub inst_rand_place_set: Vec<Place<'tcx>>, pub essa: DefId, pub ssa: DefId, pub index: i32, pub dfs: HashMap<&'tcx Place<'tcx>, i32>, pub root: HashMap<&'tcx Place<'tcx>, &'tcx Place<'tcx>>, pub in_component: HashSet<&'tcx Place<'tcx>>, pub components: HashMap<&'tcx Place<'tcx>, HashSet<&'tcx Place<'tcx>>>, pub worklist: VecDeque<&'tcx Place<'tcx>>, pub numAloneSCCs: usize, pub numSCCs: usize, pub final_vars: VarNodes<'tcx, T>,
}

Fields§

§vars: VarNodes<'tcx, T>§oprs: GenOprs<'tcx, T>§defmap: DefMap<'tcx>§usemap: UseMap<'tcx>§symbmap: SymbMap<'tcx>§values_branchmap: ValuesBranchMap<'tcx, T>§constant_vector: Vec<T>§inst_rand_place_set: Vec<Place<'tcx>>§essa: DefId§ssa: DefId§index: i32§dfs: HashMap<&'tcx Place<'tcx>, i32>§root: HashMap<&'tcx Place<'tcx>, &'tcx Place<'tcx>>§in_component: HashSet<&'tcx Place<'tcx>>§components: HashMap<&'tcx Place<'tcx>, HashSet<&'tcx Place<'tcx>>>§worklist: VecDeque<&'tcx Place<'tcx>>§numAloneSCCs: usize§numSCCs: usize§final_vars: VarNodes<'tcx, T>

Implementations§

Source§

impl<'tcx, T> ConstraintGraph<'tcx, T>

Source

pub fn convert_const(c: &Const<'_>) -> Option<T>

Source

pub fn new(essa: DefId, ssa: DefId) -> Self

Source

pub fn build_final_vars( &mut self, locals_map: &HashMap<Local, HashSet<Local>>, ) -> (VarNodes<'tcx, T>, Vec<Local>)

Source

pub fn rap_print_final_vars(&self)

Source

pub fn rap_print_vars(&self)

Source

pub fn print_vars(&self)

Source

pub fn print_conponent_vars(&self)

Source

fn print_values_branchmap(&self)

Source

fn print_symbmap(&self)

Source

fn print_defmap(&self)

Source

fn print_compusemap( &self, component: &HashSet<&'tcx Place<'tcx>>, comp_use_map: &HashMap<&'tcx Place<'tcx>, HashSet<usize>>, )

Source

fn print_usemap(&self)

Source

pub fn add_varnode(&mut self, v: &'tcx Place<'tcx>) -> &mut VarNode<'tcx, T>

Source

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

Source

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

Source

pub fn build_value_branch_map( &mut self, body: &Body<'tcx>, discr: &'tcx Operand<'tcx>, targets: &'tcx SwitchTargets, block: &'tcx BasicBlockData<'tcx>, )

Source

pub fn flipped_binop(op: BinOp) -> Option<BinOp>

Source

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

Source

fn apply_comparison<U: IntervalArithmetic>( &self, constant: U, cmp_op: BinOp, is_true_branch: bool, const_in_left: bool, ) -> Range<U>

Source

fn build_value_goto_map(&self, block_index: BasicBlock, target: BasicBlock)

Source

pub fn build_varnodes(&mut self)

Source

pub fn build_symbolic_intersect_map(&mut self)

Source

pub fn build_use_map( &mut self, component: &HashSet<&'tcx Place<'tcx>>, ) -> HashMap<&'tcx Place<'tcx>, HashSet<usize>>

Source

pub fn build_operations( &mut self, inst: &'tcx Statement<'tcx>, block: BasicBlock, )

Source

fn add_ssa_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, operands: &'tcx IndexVec<FieldIdx, Operand<'tcx>>, )

Source

fn add_use_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, op: &'tcx Operand<'tcx>, )

Source

fn add_essa_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, operands: &'tcx IndexVec<FieldIdx, Operand<'tcx>>, block: BasicBlock, )

Source

fn add_unary_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, op: &'tcx Operand<'tcx>, )

Source

fn add_binary_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, op1: &'tcx Operand<'tcx>, op2: &'tcx Operand<'tcx>, )

Source

fn fix_intersects(&mut self, component: &HashSet<&'tcx Place<'tcx>>)

Source

pub fn widen(&mut self, op: usize) -> bool

Source

pub fn narrow(&mut self, op: usize) -> bool

Source

fn pre_update( &mut self, comp_use_map: &HashMap<&'tcx Place<'tcx>, HashSet<usize>>, entry_points: &HashSet<&'tcx Place<'tcx>>, )

Source

fn pos_update( &mut self, comp_use_map: &HashMap<&'tcx Place<'tcx>, HashSet<usize>>, entry_points: &HashSet<&'tcx Place<'tcx>>, )

Source

fn generate_active_vars( &mut self, component: &HashSet<&'tcx Place<'tcx>>, active_vars: &mut HashSet<&'tcx Place<'tcx>>, )

Source

fn generate_entry_points( &mut self, component: &HashSet<&'tcx Place<'tcx>>, entry_points: &mut HashSet<&'tcx Place<'tcx>>, )

Source

fn propagate_to_next_scc(&mut self, component: &HashSet<&'tcx Place<'tcx>>)

Source

pub fn find_intervals(&mut self)

Source

pub fn add_control_dependence_edges(&mut self)

Source

pub fn del_control_dependence_edges(&mut self)

Source

pub fn build_nuutila(&mut self, single: bool)

Source

pub fn visit( &mut self, place: &'tcx Place<'tcx>, stack: &mut Vec<&'tcx Place<'tcx>>, )

Auto Trait Implementations§

§

impl<'tcx, T> Freeze for ConstraintGraph<'tcx, T>

§

impl<'tcx, T> !RefUnwindSafe for ConstraintGraph<'tcx, T>

§

impl<'tcx, T> Send for ConstraintGraph<'tcx, T>
where T: Send,

§

impl<'tcx, T> Sync for ConstraintGraph<'tcx, T>
where T: Sync,

§

impl<'tcx, T> Unpin for ConstraintGraph<'tcx, T>
where T: Unpin,

§

impl<'tcx, T> !UnwindSafe for ConstraintGraph<'tcx, T>

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.