This patch introduces an optional ptr_provenance operand to LoadInst and the StoreInst.
This allows to separate the provenance of the pointer operand from the value of the pointer operand.
This is needed by the full restrict patched (D68484), but will be also useful to resolve problems with
optimizations that, by replacing the pointer operand with an equivalent computation, also happen to
replace its provenance. At the same time, it can speed up some alias analysis phases, as, for the
ptr_provenance path, we can skip most of the computations.
Notes:
- This patch corresponds to D68488 from the original Full Restrict series.
- For the specification, a UnknownProvenance provenance can be treated as indicating that it can correspond to any object.
- For the Load and Store instructions, the absence of the ptr_provenance operand is an indication the we should look at the pointer operand to track the provenance.
- When cloning a load/store instruction that has a separate ptr_provenance, the ptr_provenance of the clone is set to 'UnknownProvenance'. When that is not wanted, it must be modified explicitely.
- Note: this results in a different behavior when the original instruction has a ptr_provenance that is identical to the ptr, vs an instruction without the ptr_provenance.