[cfe-commits] [Review request] CUDA patch series 3 (was Re: Proposal: CUDA support; outline, initial patches)

Peter Collingbourne peter at pcc.me.uk
Sat Nov 27 16:26:39 PST 2010


Hi,

+cfe-commits, as I think this series is now ready for pre-commit review.

This new patch series replaces series 1 and 2 entirely, and includes
the following changes:

 - Driver and Frontend support for the .cu file extension and '-x cuda',
   which both enable CUDA features.

 - Improved parsing error recovery for kernel call expressions.

 - Added a few diagnostics related to global functions and kernel calls.

 - Redesigned CUDAKernelCallExpr to store cudaConfigureCall function
   call as a subexpression.  The cudaConfigureCall declaration is
   now also used to parse the execution configuration.  This has
   a number of advantages:

   - Reduces hardcoded surface area
   - Same behaviour as NVIDIA toolchain
   - Therefore future-proof; if the cudaConfigureCall parameter list
     changes, there is no need to change CUDAKernelCallExpr
   - Simplifies CUDAKernelCallExpr::child_end() which before needed
     to take care with optional subexpressions
   - Can utilise existing support (Sema and CodeGen) for CallExprs

 - CodeGen support for CUDAKernelCallExpr.  This calls cudaConfigureCall
   to set the execution configuration before calling the global function
   (currently not CodeGen'd for the host).

 - Added small test suite, which tests Parse, Sema and CodeGen.

Future work:

 - Host-side CodeGen support for global functions.  This will involve
   generating a local device stub which uses cudaSetupArgument and
   cudaLaunch to set up the argument vector and launch the kernel,
   similar to the NVIDIA toolchain.

Reviews appreciated.

Thanks,
-- 
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Basic-Add-CUDA-language-option.patch
Type: text/x-diff
Size: 1171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Driver-Frontend-add-CUDA-language-support.patch
Type: text/x-diff
Size: 5391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-AST-support-for-extra-subexpressions-on-CallExpr-sub.patch
Type: text/x-diff
Size: 4886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-AST-add-CUDAKernelCallExpr.patch
Type: text/x-diff
Size: 8768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-AST-Sema-keep-track-of-cudaConfigureCall.patch
Type: text/x-diff
Size: 2604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0004.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Sema-support-for-building-CUDAKernelCallExpr-from-Ac.patch
Type: text/x-diff
Size: 6230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0005.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Lexer-add-CUDA-kernel-call-tokens.patch
Type: text/x-diff
Size: 2115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0006.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Parse-add-support-for-parsing-CUDA-kernel-calls.patch
Type: text/x-diff
Size: 5901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0007.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Basic-Sema-add-support-for-CUDA-location-attributes.patch
Type: text/x-diff
Size: 10937 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0008.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-Basic-Sema-Add-launch_bounds-attribute.patch
Type: text/x-diff
Size: 4397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0009.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-Sema-diagnose-kernel-calls-to-non-global-functions.patch
Type: text/x-diff
Size: 2362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0010.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-Sema-diagnose-kernel-functions-and-kernel-function-c.patch
Type: text/x-diff
Size: 3400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0011.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-Sema-improve-ConvertArgumentsForCall-diagnostics.patch
Type: text/x-diff
Size: 2126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0012.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Sema-add-separate-diagnostics-for-too-few-many-exec-.patch
Type: text/x-diff
Size: 6020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0013.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-Basic-add-PTXTargetInfo.patch
Type: text/x-diff
Size: 3364 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0014.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-CodeGen-add-PTXTargetCodeGenInfo.patch
Type: text/x-diff
Size: 2135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0015.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0017-CodeGen-support-for-CUDAKernelCallExpr.patch
Type: text/x-diff
Size: 3997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0016.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-Frontend-add-CodeGenOptions-CUDAIsDevice.patch
Type: text/x-diff
Size: 1130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0017.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-CodeGen-filter-declarations-based-on-attributes-and-.patch
Type: text/x-diff
Size: 1459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0018.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0020-Frontend-add-fcuda-is-device-flag.patch
Type: text/x-diff
Size: 2756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101128/1d107de1/attachment-0019.patch>


More information about the cfe-commits mailing list