[llvm-dev] noalias attribute in LLVM/clang 3.9?

Michael Kuperstein via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 9 17:42:22 PST 2016


Hi Phil,

I'm not familiar with the attribute, but the documentation you linked to
indicates it's only available with the __declspec syntax, not __attribute__.

That is:
__declspec(noalias) void f1( InArray c, const InArray a, const InArray b ) {
  ...

Also, questions related to clang - as opposed to LLVM internals - will
probably get higher-quality answers on cfe-dev, not llvm-dev.

(bcc: llvm-dev, cc: cfe-dev)

Thanks,
  Michael

On Wed, Nov 9, 2016 at 5:18 PM, Phil Tomson via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> I see in the docs that there is supposed to be a noalias attribute in LLVM
> 3.9 ( http://llvm.org/releases/3.9.0/tools/clang/docs/
> AttributeReference.html#noalias), however, when I try to use it I get an
> error. Part of the source:
>
> ...
> typedef double InArray[DIM][DIM];
>
> //void f1( InArray, const InArray, const InArray) __attribute((noalias));
> void f1( InArray c, const InArray a, const InArray b )
> __attribute__((noalias))
> {
>  ...
>
> When I compile with clang, I get:
>
> ma.c:17:72: warning: unknown attribute 'noalias' ignored
> [-Wunknown-attributes]
> void f1( InArray c, const InArray a, const InArray b )
> __attribute__((noalias))
>
>
> Just to make sure I'm running 3.9:
>
> $ clang --version
> clang version 3.9.0 (tags/RELEASE_390/final)
>
>
> What's happening here?
>
> Phil
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161109/c18e90b3/attachment.html>


More information about the llvm-dev mailing list