[llvm-dev] [RFC] noalias intrinsic

Alexandre Mutel via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 14 01:34:00 PDT 2017


Hello,


Currently the noalias attribute can be applied on function parameters and return value, or via scoped alias on store.

The problem is that there is no easy way to apply the noalias attribute on a pointer that is loaded indirectly (e.g from the field of an aggregate, or from a memory location - though for this you can still use scoped alias, but they are a lot more intrusive)


The idea would be to provide some kind of intrinsic that can transform a pointer to a noalias pointer, something in the lines of:


define noalias i32* @noalias(i32 *%a) {

  ret i32* %a

}


What do you think? Would it fit an intrinsic?


Alexandre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170914/42c08869/attachment.html>


More information about the llvm-dev mailing list