[PATCH] Adding support for NoDuplicate function attribute in CLang
Marcello Maggioni
marcello at codeplay.com
Sat Nov 16 07:41:43 PST 2013
New patch that merges the two separate patches together and also adds
the NoDuplicate attribute to the ConstructAttributeList functions in
CGCall.cpp
Cheers,
Marcello
On 15/11/13 10:49, Marcello Maggioni wrote:
> Hi all,
>
> I made a patch that adds the capability of defining the NoDuplicate
> attribute for a function using both the GNU and CXX11 attribute
> syntaxes like in:
>
> __attribute__((noduplicate))
> [[noduplicate]]
>
> I also added tests to test out the new addition.
> The NoDuplicate attribute is useful to avoid the application of
> compiler optimizations like Loop Unswitching to code containing
> function calls that implement functionality like barriers in OpenCL.
> These functions could fail if such an optimization is applied on the
> code that calls them.
>
> I splitted the patch in two files. The "_code" file contains the part
> that adds the functionality to Clang and the "_tests" part contains
> the added tests.
>
> Tell me if it is interesting to add this to mainline. If there is a
> need for corrections I'll be happy to make them.
>
> Cheers,
> Marcello
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131116/b749170e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_noduplicate.patch
Type: text/x-patch
Size: 5073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131116/b749170e/attachment.bin>
More information about the cfe-commits
mailing list