Re: [PATCH] D20168: [CodeGen] Handle structs directly in AMDGPUABIInfo

2016-07-21 Thread Vedran Miletić via cfe-commits
rivanvx added a comment. Addressed both concerns. https://reviews.llvm.org/D20168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20168: [CodeGen] Handle structs directly in AMDGPUABIInfo

2016-07-18 Thread Vedran Miletić via cfe-commits
rivanvx updated this revision to Diff 64417. rivanvx added a comment. Specifically handle only kernels. https://reviews.llvm.org/D20168 Files: lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl Index: test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl

Re: [PATCH] D20168: [CodeGen] Handle structs directly in AMDGPUABIInfo

2016-05-29 Thread Vedran Miletić via cfe-commits
rivanvx updated this revision to Diff 58920. rivanvx added a comment. Updated patch. Single element structs are coerced to its element, and there are tests for structs of different sizes, structs of arrays, structs containing structs. Arrays of structs are disallowed by clang in kernels.

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-27 Thread Vedran Miletić via cfe-commits
rivanvx added a comment. @Anastasia I looked into introducing a separate getOpenCLVersion() function (or perhaps three - major version, minor version and version string). This would have to be used in lib/CodeGen/TargetInfo.cpp and lib/Parse/ParseDecl.cpp, and I am undecided on where should

Re: [PATCH] D20168: [CodeGen] Handle structs directly in AMDGPUABIInfo

2016-05-12 Thread Vedran Miletić via cfe-commits
rivanvx updated this revision to Diff 57023. rivanvx added a comment. Now with 100% more tests. http://reviews.llvm.org/D20168 Files: lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl Index: test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-11 Thread Vedran Miletić via cfe-commits
rivanvx added a comment. Could we solve that at a later point? There is one more place where such code is already used, but this would enlarge the scope of this patch. If yes, I am wiling to factor it out after this is merged. http://reviews.llvm.org/D19780

[PATCH] D20168: [CodeGen] Handle structs directly in AMDGPUABIInfo

2016-05-11 Thread Vedran Miletić via cfe-commits
rivanvx created this revision. rivanvx added reviewers: arsenm, tstellarAMD. rivanvx added a subscriber: cfe-commits. Herald added a subscriber: kzhuravl. Structs are currently handled as pointer + byval, which makes AMDGPU LLVM backend generate incorrect code when structs are used. This patch

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-11 Thread Vedran Miletić via cfe-commits
rivanvx added a comment. Please, can anyone push this? http://reviews.llvm.org/D19780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-09 Thread Vedran Miletić via cfe-commits
rivanvx added a comment. Thanks for the reviews! http://reviews.llvm.org/D19780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-07 Thread Vedran Miletić via cfe-commits
rivanvx updated this revision to Diff 56479. rivanvx added a comment. Make that int const as well. http://reviews.llvm.org/D19780 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Parse/ParseDecl.cpp test/Parser/opencl-cl20.cl test/Parser/opencl-storage-class.cl

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-07 Thread Vedran Miletić via cfe-commits
rivanvx added inline comments. Comment at: lib/Parse/ParseDecl.cpp:3519 @@ +3518,3 @@ + / 100); +const char *VerSpec = (VerMajor + std::string (".") + VerMinor).c_str(); +Diag(Tok, DiagID) << VerSpec << PrevSpec <<

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-07 Thread Vedran Miletić via cfe-commits
rivanvx updated this revision to Diff 56478. rivanvx marked 3 inline comments as done. rivanvx added a comment. I am neither aware how to convert ints to StringRef nor how to concatenate StringRefs. Apologies if I missed something in the API. In any case, this approach looks pretty clean to me.

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-05-07 Thread Vedran Miletić via cfe-commits
rivanvx added a comment. @Anastasia would you still prefer to make VerSpec a std::string? http://reviews.llvm.org/D19780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits