[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

David Chisnall via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 23 02:09:10 PDT 2025


davidchisnall wrote:

If we're going to add this, it would be good to add the other one of the pair—the set-address instruction—at the same time.

The Rust strict provenance model (and, hopefully, C++29) and CHERI both have these as parts of the provenance model: an instruction / function that takes a pointer and an address and propagate the provenance from the pointer but not the address.  This makes provenance-based alias analysis simpler, but just adding one of these two operations in isolation doesn't give that benefit.  

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


More information about the llvm-branch-commits mailing list