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

Vedant Kumar via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 9 17:45:03 PST 2016


Yes.

Grepping around, it seems like you need -fms-compatibility to use it.

vedant

> On Nov 9, 2016, at 5:42 PM, Michael Kuperstein via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> 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
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list