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

In the Mesa frontend for AMDGPU, we just set dereferenceable(UINT_MAX).

Cheers,
Nicolai