Extend debug info handling by adding DWARF address space mapping for SPIR, with corresponding test case.
Details
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
46,320 ms | x64 debian > libFuzzer.libFuzzer::fork.test |
Event Timeline
clang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl | ||
---|---|---|
22 | btw this variable is a duplicate of FileVar0 for your change. In clang parser: The same applies to local variables of Type * and Type *private as they are equivalent on AST level too. This is due to the address space inference rules if you are interested in more details: https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#addr-spaces-inference Perhaps you could reduce the test case a bit by removing the duplicate testing? Also I would suggest separating with empty lines every variable declaration with its corresponding CHECK line to improve the readability. CHECK: <...> Type var1; CHECK: <...> Type var2; |
clang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl | ||
---|---|---|
22 | In case this review feeds into changes made for other test files, it may be worth noting that the test in question uses OpenCL C 2.0 (-cl-std=CL2.0), and therefore the generic address space as the default in many contexts, rather than private. (This comment is made not for direct benefit for this review itself, but for the benefit of anyone who may be reading who is not already especially familiar with OpenCL address spaces.) The duplicated testing has now been removed from the newly added test, though. |
btw this variable is a duplicate of FileVar0 for your change. In clang parser:
global int *ptr;
is the same as
global int *global ptr;
The same applies to local variables of Type * and Type *private as they are equivalent on AST level too.
This is due to the address space inference rules if you are interested in more details: https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#addr-spaces-inference
Perhaps you could reduce the test case a bit by removing the duplicate testing?
Also I would suggest separating with empty lines every variable declaration with its corresponding CHECK line to improve the readability.