pub struct FunctionAnalysisManager { /* private fields */ }
Expand description
Struct allowing to query the pass manager for the result of analyses on function IR.
Implementations§
Source§impl FunctionAnalysisManager
impl FunctionAnalysisManager
Sourcepub fn get_result<A>(&self, function: &FunctionValue<'_>) -> &A::Resultwhere
A: LlvmFunctionAnalysis,
pub fn get_result<A>(&self, function: &FunctionValue<'_>) -> &A::Resultwhere
A: LlvmFunctionAnalysis,
Returns the result of the analysis on a given function IR.
If the result is not in cache, the pass manager will execute the analysis pass. Otherwise, the result is directly returned from cache.
§Panics
Panics if the given analysis wasn’t registered, or if this function was called within the given analysis itself.
Sourcepub fn get_cached_result<A>(
&self,
function: &FunctionValue<'_>,
) -> Option<&A::Result>where
A: LlvmFunctionAnalysis,
pub fn get_cached_result<A>(
&self,
function: &FunctionValue<'_>,
) -> Option<&A::Result>where
A: LlvmFunctionAnalysis,
Returns the result of the analysis on a given function IR.
If the result is not in cache, None
is returned. Otherwise,
the result is directly returned from cache.
This function never triggers the execution of an analysis.
§Panics
Panics if the given analysis wasn’t registered, or if this function was called within the given analysis itself.
Sourcepub fn register_pass<T>(&mut self, pass: T)where
T: LlvmFunctionAnalysis,
pub fn register_pass<T>(&mut self, pass: T)where
T: LlvmFunctionAnalysis,
Register an analysis pass to the analysis manager.
§Panics
Panics if the given analysis was already registered.
Auto Trait Implementations§
impl Freeze for FunctionAnalysisManager
impl RefUnwindSafe for FunctionAnalysisManager
impl !Send for FunctionAnalysisManager
impl !Sync for FunctionAnalysisManager
impl Unpin for FunctionAnalysisManager
impl UnwindSafe for FunctionAnalysisManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more