[PATCH] D135462: [SelectionDAG] Do not second-guess alignment for alloca
Jonas Hahnfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 06:32:42 PST 2022
Hahnfeld added a comment.
Hi @asavonic, after reading through the comments here and peeking into D44186 <https://reviews.llvm.org/D44186>, I think your analysis is correct: libomptarget assumes that it can pad the start address of every member to 8 bytes and stay within the requested size, which isn't true anymore. I'm not sure if it would be possible to "fix up" this mistake by increasing the padding requirements in the IR generated by the Clang frontend (do we control all `alloca`s and can they also be passed in by other parts of code?). I guess the better approach would indeed be to correct the implementation in the runtime library. That said, I haven't looked into the OpenMP offloading code for quite some time, more active members include @jdoerfert @jhuber6 @ronlieb (all of which have been pinged already...)
>From the outside, and remembering many discussions and changes around alignment of struct members, a viable approach may be to disable the padding code in libomptarget and see which cases actually break. I wouldn't be super surprised if some / most of the complexity isn't actually needed anymore and is dealt with (more correctly) in the frontend.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135462/new/
https://reviews.llvm.org/D135462
More information about the llvm-commits
mailing list