pub enum Origin {
Local(Inst),
Global(Symbol),
Unknown(Value),
}Expand description
Where a pointer came from, as far as this function can tell.
This is provenance and it is not points-to. Provenance says which object a pointer was derived from, which the IR knows locally and cheaply. Points-to says which objects a pointer might hold at run time, which needs a module-wide fixed point. Section 8.6 lists confusing the two as one of the ways this analysis goes wrong, so there is no conversion between them and there is no points-to type here at all.
Variants§
Local(Inst)
An alloca in this function, which is storage nothing outside it knew about until the
address was handed out.
Global(Symbol)
A named object, by the symbol its address was taken by.
Unknown(Value)
An address this function cannot follow any further back: a parameter, something loaded out of memory, what a call returned, or an integer turned into a pointer.