Page MenuHomePhabricator

[ptr_provenance] Introduce llvm.experimental.ptr.provenance
Needs ReviewPublic

Authored by jeroen.dobbelaere on Aug 3 2021, 7:52 AM.



The llvm.experimental.ptr.provenance intrinsics combines a pointer value (=operand 0) with a pointer provenance (= operand 1).
This intrinsic is provided so that the provenance can be tracked when a pointer (with provenance) is returned, passed to a function, stored into memory.

When loading and storing through such a pointer, the intrinsic can be omited and the operand 1 can be connected to the ptr_provenance operand of the load/store instructions.

Diff Detail

Event Timeline

jeroen.dobbelaere requested review of this revision.Aug 3 2021, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2021, 7:52 AM
MatzeB added a subscriber: MatzeB.Nov 3 2021, 5:13 PM

Please document in the LLVM language reference.

nikic added inline comments.Jan 24 2022, 12:44 PM

IRBuilder asserts that both types are the same, so make the second one LLVMMatchType<0> as well?


This can also be NoCapture<ArgIndex<1>> I believe. (The first argument is capturing, because the pointer is returned.)

Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2022, 7:05 AM