[llvm-dev] Making a pointer parameter always dereferenceable

Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 2 08:52:54 PDT 2017


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.


More information about the llvm-dev mailing list