diff options
author | Alex Voicu <alexandru.voicu@amd.com> | 2023-07-19 18:04:31 +0100 |
---|---|---|
committer | Alex Voicu <alexandru.voicu@amd.com> | 2023-07-19 18:04:31 +0100 |
commit | 8acdcf4016876d122733991561be706b64026e73 (patch) | |
tree | 2cab27785342c4100dea53f53eae31a4913814a1 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 3055c5815ac08aa0d8597bff63569b9ed8ec0822 (diff) | |
download | llvm-8acdcf4016876d122733991561be706b64026e73.zip llvm-8acdcf4016876d122733991561be706b64026e73.tar.gz llvm-8acdcf4016876d122733991561be706b64026e73.tar.bz2 |
[Clang][CodeGen]`vtable`, `typeinfo` et al. are globals
All data structures and values associated with handling virtual functions / inheritance, as well as RTTI, are globals and thus can only reside in the global address space. This was not taken fully taken into account because for most targets, global & generic appear to coincide. However, on targets where global & generic ASes differ (e.g. AMDGPU), this was problematic, since it led to the generation of invalid bitcasts (which would trigger asserts in Debug) and less than optimal code. This patch does two things:
ensures that vtables, vptrs, vtts, typeinfo are generated in the right AS, and populated accordingly;
removes a bunch of bitcasts which look like left-overs from the typed ptr era.
Reviewed By: yxsamliu
Differential Revision: https://reviews.llvm.org/D153092
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions