This introduces LLVMExperimentalGetPtrProvenanceOperand and LLVMExperimentalSetPtrProvenanceOperand. They can be used to get/set/remove the ptr_provenance operand of a load or store instruction.
Diff Detail
Event Timeline
llvm/tools/llvm-c-test/echo.cpp | ||
---|---|---|
635 | You need to clone the values, just like it is done for the Ptr one. First, it ensures that the value is generated properly, but second, these value belong to different (even though identical if the test passes) modules. This is not expected to work and kind of is a miracle that this doesn't crash. | |
646 | dito |
I think using nullptr would be preferable, but this looks good. Thanks.
llvm/lib/IR/Core.cpp | ||
---|---|---|
3715 | I missed this on the first pass, but this is a C++ file, so you can simply return nullptr. |
I missed this on the first pass, but this is a C++ file, so you can simply return nullptr.