How do I specify that arguments are "noalias" within numba?

Ok, so AFAIK “noalias” is the way to tell LLVM “what this pointer points to is yours and only yours for the duration of the execution of this function”.

I want to make sure that it is set in specific instances.

My problem is that accessing the relevant ir.Arguments does not seem obvious to me. When I use numba.extending.intrinsics, I can sort of access ir.Arguments through args but it’s clunky.

For instance, for a tuple args[0].value returns a ir.Argument but for an array, I need args[0].value.value. Ultimately, for the array, args[0].value.value.add_attribute("noalias") fails with a generic compilation error, so I suppose this is not the correct ir.Argument to modify.

So three questions:

  • Is there a way to look at what attributes are ultimately set without having to compile, then inspect_llvm?
  • What is the correct way to set noalias and similar for a numpy array?
  • Is there any way to do so from generic_jit instead of intrinsic?