Details
- Reviewers
tra jholewinski
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
What is the problem the patch is intended to solve? To allow better vectorization of param-space loads/stores ?
llvm/test/CodeGen/NVPTX/align-annotation.ll | ||
---|---|---|
27 | Does clang generate this metadata? AFAICT, it does not. https://godbolt.org/z/s9EYbdfjT |
I guess it may help vectorization, but I do not have a particular use case.
My main motivation is to make this consistent: we already handle this metadata while emitting an aggregate as a return value, but ignore it for parameters, which is a bit unexpected if this is the same aggregate.
llvm/test/CodeGen/NVPTX/align-annotation.ll | ||
---|---|---|
27 | Hmm, I looked at clang, and, surprisingly, it indeed doesn't generate align property, yet it generates all the other properties of nvvm.annotations metadata. We might add align to clang for the sake of completeness. |
llvm/test/CodeGen/NVPTX/align-annotation.ll | ||
---|---|---|
27 |
Let me play a devil's advocate here. If we lived without it till now and there's no demonstrable benefit of having it supported, I'd argue that we do not need it and we should remove it instead. NVVM metadata is a bit of a hack, IMO. Some of the things it's used for should be done via the standard LLVM mechanisms. E.g. kernels should be using a special calling convention, types do not have the concept of alignment in LLVM, only memory accesses do. What are we supposed to do with NVVM alignment info if the user-generated code provides conflicting alignment info about the loads/stores of the data? IMO it creates more problems than it was supposed to solve.
NVVM IR specification is somewhat irrelevant here. LLVM != NVVM. We have already diverged quite a bit since the time NVIDIA has contributed NVPTX back-end. |
Does clang generate this metadata? AFAICT, it does not. https://godbolt.org/z/s9EYbdfjT
Where is this metadata expected to come from?