pub struct Facts {
pub bounds: Option<Bounds>,
pub init: Option<u64>,
pub align: Option<u32>,
pub live: bool,
}Expand description
What is known about one value.
All four fields absent is the default and means nothing is known, which is not the same as knowing the pointer is bad. A fact is only ever a promise, never a denial, so an optimizer that loses one makes the program slower and never makes it wrong.
Fields§
§bounds: Option<Bounds>The range the pointer is known to lie in, which is !bounds(lo, ext).
init: Option<u64>How many bytes at the pointer are known initialized, which is !init(n).
align: Option<u32>The alignment the pointer is known to have, in bytes, which is !aligned(a).
live: boolWhether the storage the pointer points into is known live here, which is !live.
Implementations§
Trait Implementations§
impl Copy for Facts
Source§impl Display for Facts
impl Display for Facts
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
The list form the textual IR uses, !live, !aligned(8), with the facts in a fixed order
and nothing at all when none of them is known.
The two values a !bounds names are written by their raw index, which is the printer’s
numbering only when the function was built in print order. Printer
writes them itself for that reason and this is here for a diagnostic to use.