nikic 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.

The set address operation can already be encoded by `ptradd(p, new_addr - 
ptrtoaddr(p))`. I doubt we're going to add an instruction for that. We might 
add an intrinsic. But I don't think think this needs to be coupled to the 
ptrtoaddr introduction.

https://github.com/llvm/llvm-project/pull/139357
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to