pub struct InterproceduralGVN {
pub summaries: HashMap<String, GVNFunctionSummary>,
pub cross_fn_equalities: usize,
}Expand description
Interprocedural GVN: uses function summaries to propagate value equalities across function call boundaries.
Fields§
§summaries: HashMap<String, GVNFunctionSummary>Summaries for known functions.
cross_fn_equalities: usizeNumber of cross-function equalities discovered.
Implementations§
Source§impl InterproceduralGVN
impl InterproceduralGVN
pub fn new() -> Self
Sourcepub fn add_summary(&mut self, name: String, summary: GVNFunctionSummary)
pub fn add_summary(&mut self, name: String, summary: GVNFunctionSummary)
Register a function summary.
Sourcepub fn calls_are_equal(&self, fn_name: &str) -> bool
pub fn calls_are_equal(&self, fn_name: &str) -> bool
Query whether two calls to fn_name with the same arguments
produce equal results.
Sourcepub fn run(&mut self, decls: &mut [LcnfFunDecl])
pub fn run(&mut self, decls: &mut [LcnfFunDecl])
Run interprocedural GVN to find cross-function redundancies.
Trait Implementations§
Source§impl Debug for InterproceduralGVN
impl Debug for InterproceduralGVN
Source§impl Default for InterproceduralGVN
impl Default for InterproceduralGVN
Source§fn default() -> InterproceduralGVN
fn default() -> InterproceduralGVN
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InterproceduralGVN
impl RefUnwindSafe for InterproceduralGVN
impl Send for InterproceduralGVN
impl Sync for InterproceduralGVN
impl Unpin for InterproceduralGVN
impl UnsafeUnpin for InterproceduralGVN
impl UnwindSafe for InterproceduralGVN
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