[llvm-dev] pointer provenance introduction to load/store instructions

Jeroen Dobbelaere via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 14 15:57:29 PDT 2021


Hi all,

as some of you already know, the full restrict patches[0] introduce an optional 'ptr_provenance' operand
to LoadInst/StoreInst. In the context of full restrict support, this operand is used to separate the
computation of the pointer operand from the possible restrict provenance of that operand. This was necessary
so that we could keep all the optimizations working on those pointers, without being blocked by the noalias intrinsics.
At the same time we avoided the risk to lose the noalias provenance of the instruction.

As that separation can also be useful in other situations, there was a request in the past LLVM Alias Analysis Tech calls[1],
to split out the pointer provenance changes and propose them as a next step for inclusion.

Fast forward to today. A lot more discussions about pointer provenance and related problems are ongoing.

Maybe the provided set of patches[2] and the experience with tracking the provenance in the full restrict patches can
be a first step to help solving some of those problems ?

Any feedback is welcome, also during tomorrows AA TechCall[1]

Greetings,

Jeroen Dobbelaere

[0] https://reviews.llvm.org/D68484 [PATCH 01/27] [noalias] LangRef: noalias intrinsics and ptr_provenance documentation.
[1] https://docs.google.com/document/d/17U-WvX8qyKc3S36YUKr3xfF-GHunWyYowXbxEdpHscw/edit?usp=sharing  LLVM AA TechCall
[2] https://reviews.llvm.org/D104268 [ptr_provenance] Introduce optional ptr_provenance operand to load/store



More information about the llvm-dev mailing list