pub struct SSATransformer<'tcx> {Show 15 fields
pub tcx: TyCtxt<'tcx>,
pub def_id: LocalDefId,
pub body: Body<'tcx>,
pub cfg: HashMap<BasicBlock, Vec<BasicBlock>>,
pub dominators: Dominators<BasicBlock>,
pub dom_tree: HashMap<BasicBlock, Vec<BasicBlock>>,
pub df: HashMap<BasicBlock, HashSet<BasicBlock>>,
pub local_assign_blocks: HashMap<Local, HashSet<BasicBlock>>,
pub reaching_def: HashMap<Local, Option<Local>>,
pub local_index: u32,
pub local_defination_block: HashMap<Local, BasicBlock>,
pub skipped: HashSet<u32>,
pub phi_index: HashMap<*const Statement<'tcx>, usize>,
pub phi_statements: HashMap<*const Statement<'tcx>, bool>,
pub essa_statements: HashMap<*const Statement<'tcx>, bool>,
}
Fields§
§tcx: TyCtxt<'tcx>
§def_id: LocalDefId
§body: Body<'tcx>
§cfg: HashMap<BasicBlock, Vec<BasicBlock>>
§dominators: Dominators<BasicBlock>
§dom_tree: HashMap<BasicBlock, Vec<BasicBlock>>
§df: HashMap<BasicBlock, HashSet<BasicBlock>>
§local_assign_blocks: HashMap<Local, HashSet<BasicBlock>>
§reaching_def: HashMap<Local, Option<Local>>
§local_index: u32
§local_defination_block: HashMap<Local, BasicBlock>
§skipped: HashSet<u32>
§phi_index: HashMap<*const Statement<'tcx>, usize>
§phi_statements: HashMap<*const Statement<'tcx>, bool>
§essa_statements: HashMap<*const Statement<'tcx>, bool>
Implementations§
source§impl<'tcx> SSATransformer<'tcx>
impl<'tcx> SSATransformer<'tcx>
pub fn new(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: LocalDefId) -> Self
pub fn return_body_ref(&self) -> &Body<'tcx>
fn map_locals_to_definition_block(body: &Body<'_>) -> HashMap<Local, BasicBlock>
pub fn depth_first_search_preorder( dom_tree: &HashMap<BasicBlock, Vec<BasicBlock>>, root: BasicBlock, ) -> Vec<BasicBlock>
pub fn depth_first_search_postorder( dom_tree: &HashMap<BasicBlock, Vec<BasicBlock>>, root: &BasicBlock, ) -> Vec<BasicBlock>
fn map_locals_to_assign_blocks( body: &Body<'_>, ) -> HashMap<Local, HashSet<BasicBlock>>
fn construct_dominance_tree( body: &Body<'_>, ) -> HashMap<BasicBlock, Vec<BasicBlock>>
fn compute_dominance_frontier( body: &Body<'_>, dom_tree: &HashMap<BasicBlock, Vec<BasicBlock>>, ) -> HashMap<BasicBlock, HashSet<BasicBlock>>
fn extract_cfg_from_predecessors( body: &Body<'_>, ) -> HashMap<BasicBlock, Vec<BasicBlock>>
fn print_dominance_tree( dom_tree: &HashMap<BasicBlock, Vec<BasicBlock>>, current: BasicBlock, depth: usize, )
pub fn is_phi_statement(&self, statement: &Statement<'tcx>) -> bool
pub fn is_essa_statement(&self, statement: &Statement<'tcx>) -> bool
Auto Trait Implementations§
impl<'tcx> !Freeze for SSATransformer<'tcx>
impl<'tcx> !RefUnwindSafe for SSATransformer<'tcx>
impl<'tcx> !Send for SSATransformer<'tcx>
impl<'tcx> !Sync for SSATransformer<'tcx>
impl<'tcx> Unpin for SSATransformer<'tcx>
impl<'tcx> !UnwindSafe for SSATransformer<'tcx>
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