[llvm] [IR] Introduce captures attribute (PR #116990)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 01:16:30 PST 2024


nikic wrote:

> Just out of curiosity, do we need another version of icmp ptr that captures the provenance? I think the spec of C/C++/Rust may guarantee the provenance capturing of pointer comparisons: https://godbolt.org/z/5zbTfPa3x

I'm not really sure what your godbolt example is supposed to show (I don't see any relation to provenance capture?) but to answer your question: Rust definitely does not capture provenance in comparisons. The current C/C++ standards do not specify provenance semantics, but relevant papers have converged on a pnvi-ae style model, where pointer comparisons are not considered to be address-exposed operations. I just double checked that this is still the case in the latest WG14 paper on the topic (N3271 for TS6010).

https://github.com/llvm/llvm-project/pull/116990


More information about the llvm-commits mailing list