Haidl, Michael via llvm-dev
2017-Aug-02 15:47 UTC
[llvm-dev] Making a pointer parameter always dereferenceable
Hi @all, I'm looking for an way to express in IR that a pointer parameter is always dereferenceable. I know about the attribut for pointer parameter but as far as I understand it requires an integer n denoting the number of bytes dereferenceable. Is there any way to express that loading from the pointer is always save? Cheers, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.llvm.org/pipermail/llvm-dev/attachments/20170802/d69937b1/attachment.html>
Nicolai Hähnle via llvm-dev
2017-Aug-02 15:52 UTC
[llvm-dev] Making a pointer parameter always dereferenceable
On 02.08.2017 17:47, Haidl, Michael via llvm-dev wrote:> Hi @all, > > I'm looking for an way to express in IR that a pointer parameter is > always dereferenceable. I know about the attribut for pointer parameter > but as far as I understand it requires an integer n denoting the number > of bytes dereferenceable. Is there any way to express that loading from > the pointer is always save?In the Mesa frontend for AMDGPU, we just set dereferenceable(UINT_MAX). Cheers, Nicolai -- Lerne, wie die Welt wirklich ist, Aber vergiss niemals, wie sie sein sollte.