Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Basic/Targets.cpp | ||
---|---|---|
2270 ↗ | (On Diff #87496) | Should this be constant in some contexts? |
test/CodeGenOpenCL/debugger-pointer-address-space.cl | ||
---|---|---|
1 ↗ | (On Diff #87496) | Seems like a lot of test coverage for 4 changes. Is it all needed? I'd expect roughly 4 tests for these 4 changes. One for each that demonstrates the addr space is plumbed through. Probably no need to test that all addr spaces work in each context - because this code is pretty/entirely orthogonal to the particular address space. |
test/CodeGenOpenCL/debugger-pointer-address-space.cl | ||
---|---|---|
1 ↗ | (On Diff #87496) | I think it's better to explicitly test all address spaces the target cares about |
lib/Basic/Targets.cpp | ||
---|---|---|
2269 ↗ | (On Diff #87496) | Missing override |
Address review feedback:
- Add target hook for asking about LLVM AS -> DWARF AS
- Use Optional<unsigned> for DWARF AS
lib/Basic/Targets.cpp | ||
---|---|---|
2270 ↗ | (On Diff #87496) | I can't think of any at this moment. |
include/clang/Basic/TargetInfo.h | ||
---|---|---|
1043 ↗ | (On Diff #88666) | Is this a reasonable default implementation? Should there be a default or should any implementation (mabe only those with non-zero address spaces?) be expected to provide a mapping? (not sure how this looks for other things in TargetInfo) |
include/clang/Basic/TargetInfo.h | ||
---|---|---|
1040–1041 ↗ | (On Diff #88666) | Perhaps give a more detailed description: "\return If a target requires an address within a target specific address space \p AddressSpace to be converted in order to be used, then return the corresponding target specific DWARF address space. |
lib/Basic/Targets.cpp | ||
2259–2260 ↗ | (On Diff #88666) | Same comment as above. |
Address review feedback
include/clang/Basic/TargetInfo.h | ||
---|---|---|
1043 ↗ | (On Diff #88666) | I think the proposed hook is flexible (targets can map address spaces however they like) and returning None is a reasonable default (dwarf spec does not say that DW_AT_address_class is required - returning None here, will cause AsmPrinter not to generate DW_AT_address_class). |
lib/CodeGen/CGDebugInfo.cpp | ||
---|---|---|
1612 ↗ | (On Diff #89277) | Should this be using the Constant address space since presumably a vtable will be in constant memory and not change during the execution of the program? This allows better code generation as constant data can be loaded by scalar operations on GPU hardware. |
1657 ↗ | (On Diff #89277) | Same comment as above. |
lib/Basic/Targets.cpp | ||
---|---|---|
2262 ↗ | (On Diff #89410) | This one is missing an 'override' |