Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
1791 | would you mind drive-by fixing the declare - brace - mutate construct while you're in the area? I.e. replace the nested block with const auto kernelInfo = KernelInfoTable[device_id][kernel_name]; const uint32_t group_segment_size = kernelInfo.group_segment_size; const uint32_t sgpr_count = kernelInfo.sgpr_count; ... or just use kernelInfo.group_segment_size etc directly, not sure the local name helps readability much | |
1862 | this is a bit odd - have already done the lookup, and stored the fields in local variables, that could be written directly into the packet-> fields above |
no objection to the functional change, would be good to refactor the local weirdness in passing
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
1791 | I agree that we can use some cleanup here. I intend to use some of these variables in computing the launch values. Let's revisit the cleanup after that change. | |
1862 | Because the iterator is in a different scope, it is gone, so needs to do a lookup again. Let's do all these cleanups in a different commit. |
Refactoring separately is good, but only works in practice if it's done first. Otherwise the refactor usually gets forgotten, or replaced with something higher priority, and that is the path to entropy.
E.g. D103037 had a suggestion for eliminating the class of typos it was fixing, but as it wasn't done first or simultaneously, there's a reasonable chance it's been forgotten in favour of this line of patches.
Please do the cleanups before landing the associated patch, or inline with it if they are small.
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
1862 | Yes, but the separate scope is just braces. I was suggesting removing the braces. |
would you mind drive-by fixing the declare - brace - mutate construct while you're in the area? I.e. replace the nested block with
or just use kernelInfo.group_segment_size etc directly, not sure the local name helps readability much