pub struct Summaries { /* private fields */ }Expand description
What is known about each function in the module.
Built once, because a summary belongs to the callee and there is one callee and many call
sites. A pass holding one function and no module has Summaries::nothing, which answers
None to everything and leaves every caller with the conservative answer.
Implementations§
Source§impl Summaries
impl Summaries
Sourcepub fn of_module(module: &Module) -> Self
pub fn of_module(module: &Module) -> Self
What the attributes on each of the module’s functions promise, before anything is read.
The three that say something about memory are the three crate::alias already reads, and
what they promise is the floor the analysis starts from rather than something it can
contradict. A function with none of them gets no entry, which is not the same as an entry
saying it does everything: the difference is what lets summarize tell a promise it has
to keep from an absence it may fill in.
Sourcepub fn of(&self, name: Symbol) -> Option<&Summary>
pub fn of(&self, name: Symbol) -> Option<&Summary>
What is known about this function, or nothing.
Sourcepub fn at(&self, func: &Func, call: Inst) -> Option<&Summary>
pub fn at(&self, func: &Func, call: Inst) -> Option<&Summary>
What is known about what this call reaches.
Only a direct call has an answer. A call through an address, inline assembly and a target intrinsic are all names this cannot put to a body.
Sourcepub fn record(&mut self, name: Symbol, summary: Summary)
pub fn record(&mut self, name: Symbol, summary: Summary)
Writes down what the analysis worked out.
Narrowed against whatever the attributes promised rather than written over it, because a promise the body does not keep is still a promise the caller was told to rely on, and the build that reports the function whose attribute was a lie wants both halves.