pub struct AliasPass {
pub level: AliasAnalysisLevel,
pub solver: AndersenSolver,
pub type_map: HashMap<LcnfVarId, LcnfType>,
pub forwarder: LoadStoreForwarder,
/* private fields */
}Expand description
The alias analysis pass.
Collects variables from LCNF declarations, builds constraints, solves the points-to graph, and answers alias queries.
Fields§
§level: AliasAnalysisLevelThe analysis level to use.
solver: AndersenSolverThe Andersen solver (used for CFL levels).
type_map: HashMap<LcnfVarId, LcnfType>Type-based alias map: (var, type) pairs.
forwarder: LoadStoreForwarderLoad-store forwarder.
Implementations§
Source§impl AliasPass
impl AliasPass
Sourcepub fn with_level(level: AliasAnalysisLevel) -> Self
pub fn with_level(level: AliasAnalysisLevel) -> Self
Create a pass with a specific analysis level.
Sourcepub fn run(&mut self, decls: &mut [LcnfFunDecl])
pub fn run(&mut self, decls: &mut [LcnfFunDecl])
Run alias analysis over all function declarations.
Sourcepub fn query(&mut self, a: LcnfVarId, b: LcnfVarId) -> AliasResult
pub fn query(&mut self, a: LcnfVarId, b: LcnfVarId) -> AliasResult
Query whether two variables alias after analysis.
Sourcepub fn report(&self) -> AliasReport
pub fn report(&self) -> AliasReport
Return a copy of the accumulated report.
Sourcepub fn apply_load_store_forwarding(&mut self, decls: &mut [LcnfFunDecl])
pub fn apply_load_store_forwarding(&mut self, decls: &mut [LcnfFunDecl])
Apply load-store forwarding to all declarations (using alias info).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AliasPass
impl RefUnwindSafe for AliasPass
impl Send for AliasPass
impl Sync for AliasPass
impl Unpin for AliasPass
impl UnsafeUnpin for AliasPass
impl UnwindSafe for AliasPass
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