[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D34235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:13 kernel void foo() {} +kernel void bar() {} Anastasia wrote: > Would the original code produce duplicate version metadata here or is it just > for overloaded functions? Would it mak

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:13 kernel void foo() {} +kernel void bar() {} Would the original code produce duplicate version metadata here or is it just for overloaded functions? Would it make sense to add `C

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-16 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 102789. bader added a comment. Applied Akira's comment: re-used cached Int32Ty type. https://reviews.llvm.org/D34235 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_version.cl Index:

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:516 + llvm::LLVMContext &Ctx = TheModule.getContext(); + llvm::Type *Int32Ty = llvm::Type::getInt32Ty(Ctx); + // SPIR v2.0 s2.12 - The SPIR version used by the module is stored in the ---

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. Thanks. https://reviews.llvm.org/D34235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-15 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. OpenCL and SPIR version metadata must be generated once per module instead of once per mangled global value. https://reviews.llvm.org/D34235 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_