Please review and submit.
Diff Detail
Event Timeline
test/CodeGenOpenCL/generic_type_cl20.cl | ||
---|---|---|
1 ↗ | (On Diff #45961) | Bug author wrote: "...and it's still crashing in the same place. Please try invoking with the precise arguments i wrote in "To reproduce".. and on the attached CL file, not pocl codebase - i've mentioned pocl for reference, but pocl doesn't currently work with 3.8 (yet)..." |
test/CodeGenOpenCL/generic_type_cl20.cl | ||
---|---|---|
1 ↗ | (On Diff #45961) | The author might wrote whatever he / she wants. But this does not mean that you should not reduce the testcase. |
lib/AST/ItaniumMangle.cpp | ||
---|---|---|
1799 | As you said in the bug commit, you can try to fix the windows part too. Try it in MicrosoftMangle.cpp | |
test/CodeGenOpenCL/generic_type_cl20.cl | ||
1 ↗ | (On Diff #45961) | I think you can merge this test in test/CodeGenOpenCL/address-spaces-mangling.c. You need not to reproduce the bug case here. You can refer to other test relate to opencl 2.0 and use something like #ifdef CL20 void test(int4 x) #endif |
test/CodeGenOpenCL/generic_mangling.cl | ||
---|---|---|
5 ↗ | (On Diff #46251) | I found no way to register the operation inside CL function, thus I post simplier diff, without mangling verification. |
lib/AST/ItaniumMangle.cpp | ||
---|---|---|
1799 | The Windows mangler is pretty different and doesn't have this issue. |
Local variables are always generic if not specified explicitly.
And I found no method to supply address space of local variable, only of whole function.
Please review the patch and commit.
BugZilla link: https://llvm.org/bugs/show_bug.cgi?id=26194
lib/AST/ItaniumMangle.cpp | ||
---|---|---|
1799 | I'll try to fix on the Windows. |
Added generic variable support and checking address space to Microsoft mangler.
Test case updated.
Please support discussion about MicrosoftMangle+CL at
https://llvm.org/bugs/show_bug.cgi?id=26194
tools/driver/driver.cpp | ||
---|---|---|
367 ↗ | (On Diff #46532) | Yes, this is enough to work with MicrosoftMangler. |
I noticed that MicrosoftMangler already has many extension functions. I.e. this MicrosoftMangler.cpp change is Ok.
Please review and accept/commit.
lib/AST/MicrosoftMangle.cpp | ||
---|---|---|
1386 | I was just wondering since this code appears to be a repetition from ItaniumMangler.cpp, could we just factor it out to a common function. I think Mangler.cpp could be a good place for having its definition then next to ObjC specific functions (see for example mangleObjCMethodName()). We would just have to update comments in this file accordingly to reflect that it now contains OpenCL and CUDA functionality as well. | |
test/CodeGenOpenCL/generic-mangling-itanium.cl | ||
1 | Could we extend test/CodeGenOpenCL/address-spaces-mangling.cl instead of adding another file? | |
5 | Did you mean to test generic not global? | |
test/CodeGenOpenCL/generic-mangling-microsoft.cl | ||
1 | I would very much like to have test/CodeGenOpenCL/address-spaces-mangling.cl extended here too. You can just add a new RUN line along with a new -check-prefix option. |
As you said in the bug commit, you can try to fix the windows part too.
Try it in MicrosoftMangle.cpp