[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

2019-06-18 Thread Pierre via Phabricator via cfe-commits
Pierre closed this revision. Pierre added a comment. The changes are part of https://reviews.llvm.org/D60763 which was merged. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60764/new/ https://reviews.llvm.org/D60764 ___ cfe-commits mailing

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-06-05 Thread Pierre via Phabricator via cfe-commits
Pierre added a comment. In D60763#1529279 , @Nicola wrote: > A bit late to the review, but I've noticed a couple of issues with some of > the implemented builtins: > > - The fmin/fmax builtins are defined twice for scalar types, does this create >

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-06-04 Thread Pierre via Phabricator via cfe-commits
Pierre added a comment. In D60763#1527870 , @thakis wrote: > From what I can tell, the only client of OpenCLBuiltins.td is currently > lib/Sema. Do you expect that to change? If not, does it make more sense to > move the .td file to there? > > Do you

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-23 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 200961. Pierre marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60763/new/ https://reviews.llvm.org/D60763 Files: clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/LangOptions.def

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-21 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 200499. Pierre marked 9 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60763/new/ https://reviews.llvm.org/D60763 Files: clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/LangOptions.def

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-21 Thread Pierre via Phabricator via cfe-commits
Pierre added a comment. The wrong patch was uploaded. Sorry for this. Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:107 + //<, 35>. + // TODO: Check the other types of vector available for performance purpose + std::vector, unsigned>> SignatureSet;

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-21 Thread Pierre via Phabricator via cfe-commits
Pierre marked an inline comment as done. Pierre added inline comments. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:298-302 +def write_imagef : Builtin<"write_imagef", +[void_t, + image2d_WO_t, +

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-17 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 18. Pierre marked 14 inline comments as done. Pierre added a comment. Corrections from the comments on the previous version. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60763/new/ https://reviews.llvm.org/D60763 Files:

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-17 Thread Pierre via Phabricator via cfe-commits
Pierre added inline comments. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:17 +// +// Builtin functions are instances of the Builtin class. +// Prototypes are defined as a list of Type classes (or its subclasses). Anastasia wrote: > Can you explain

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-03 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 197932. Pierre marked 39 inline comments as done. Pierre added a comment. Requested changes have been made in this diff. Some comments/ TODO have not been done yet. They will be done in a next patch. This first patch is meant to start introducing the

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-03 Thread Pierre via Phabricator via cfe-commits
Pierre added inline comments. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:65 +class QualType { + // How to get the QualType. Can be one of ("field", "func") + string AccessMethod = _AccessMethod; Anastasia wrote: > I don't think "field" and "func"

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-25 Thread Pierre via Phabricator via cfe-commits
Pierre added a comment. I also think we could reduce the size of the tables. To sum up how this is working right now: 1. The isOpenCLBuiltin(char* functionName) funcion is called to determine if a function is part of OpenCL builtin functions. If so, it returns its associated pair (index,

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-25 Thread Pierre via Phabricator via cfe-commits
Pierre added a comment. Other comments: 1- When a header file is included, its function declarations are decorated with the "nounwind" attribute, meaning that the function is not supposed to throw an exception. This decorator is currently not added with the new mechanism. The "readnone"

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-25 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 196591. Pierre marked 10 inline comments as done. Pierre added a comment. In this new patch: - Documentation has been added - The multiclasses in OpenCLBuiltins.td filehave been slighly changed to have a more generic way to generate function prototypes - In

[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

2019-04-25 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 196590. Pierre added a comment. Forgot to update one argument CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60764/new/ https://reviews.llvm.org/D60764 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Driver/CC1Options.td

[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

2019-04-24 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 196474. Pierre marked an inline comment as done. Pierre added a comment. The name of the command line option has been updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60764/new/ https://reviews.llvm.org/D60764 Files:

[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

2019-04-16 Thread Pierre via Phabricator via cfe-commits
Pierre created this revision. Pierre added reviewers: svenvh, Anastasia. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a project: clang. Clang cc1 currently sets the -finclude-default-header flag by default, including the opencl-c.h header file. This patch adds a

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-16 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 195336. Pierre added a comment. Deleted blank line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60763/new/ https://reviews.llvm.org/D60763 Files: clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/OpenCLBuiltins.td

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-16 Thread Pierre via Phabricator via cfe-commits
Pierre created this revision. Pierre added reviewers: Anastasia, svenvh. Herald added subscribers: cfe-commits, yaxunl, mgorny. Herald added a project: clang. **This is a re-upload of the patch from Joey GOULY, posted at: https://reviews.llvm.org/D53023 . I am re-uploading it because I will