[PATCH] Added support for CUDA __launch_bounds__ attribute to CodeGen.

Eli Bendersky eliben at google.com
Tue Apr 15 10:05:47 PDT 2014


Committed in r206302, and the test in r206303.




On Mon, Apr 14, 2014 at 5:41 PM, Manjunath Kudlur <keveman at gmail.com> wrote:

>
>
> ================
> Comment at: lib/CodeGen/TargetInfo.cpp:4770
> @@ -4768,1 +4769,3 @@
> +  static void addNVVMMetadata(llvm::Function *F, StringRef Name,
> +                              const int Operand);
>  };
> ----------------
> Reid Kleckner wrote:
> > Having const ints feels silly, since the caller really doesn't care.
> const removed.
>
> ================
> Comment at: lib/CodeGen/TargetInfo.cpp:4848
> @@ +4847,3 @@
> +      addNVVMMetadata(F, "maxntidx",
> +
> FD->getAttr<CUDALaunchBoundsAttr>()->getMaxThreads());
> +      // min blocks is a default argument for CUDALaunchBoundsAttr, so
> getting a
> ----------------
> Reid Kleckner wrote:
> > nit: indentation
> Fixed.
>
> ================
> Comment at: lib/CodeGen/TargetInfo.cpp:4853
> @@ +4852,3 @@
> +      // don't have to add a PTX directive.
> +      int minctasm = FD->getAttr<CUDALaunchBoundsAttr>()->getMinBlocks();
> +      if (minctasm > 0) {
> ----------------
> Reid Kleckner wrote:
> > The naming for local variables is StudlyCaps.
> Fixed.
>
>
> http://reviews.llvm.org/D3318
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140415/03cec9ae/attachment.html>


More information about the cfe-commits mailing list