[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)
David Chisnall via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 30 00:42:46 PDT 2024
davidchisnall wrote:
I’m concerned about the semantics of unstable. This sounds like it would impact optimisation of memcmp, for example (is it still allowable to optimise away self comparisons?). I wouldn’t want that added to the LangRef without some clearer description of what optimisers *can* assume. That said, given that it’s a property that’s already present for NI pointers for GC, I suppose we’re stuck with it for now.
Note that CHERI LLVM’s use of ptrtoint is largely historical. We worked with the folks doing NI pointers and my plan was to move to them eventually. We didn’t initially have the address-get intrinsic and so we abused ptrtoint for that, but I believe we’ve fixed the places in the front end that do this. When we upstream, we should get rid of that entirely. This also improves optimisation because optimisers treat address-get as non-escaping whereas ptrtoint assumes the pointer may be materialised anywhere else and makes alias analysis conservative.
https://github.com/llvm/llvm-project/pull/105735
More information about the llvm-branch-commits
mailing list