[PATCH] D70947: Add a default address space for globals to DataLayout
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 12:44:16 PST 2020
arichardson added a comment.
In D70947#2408741 <https://reviews.llvm.org/D70947#2408741>, @echristo wrote:
> Why is this useful rather than having targets set the address space used in the backend explicitly? i.e. how is what amdgpu was doing up to this point not ok? It's not really clear here.
That's fine for globals created in target-specific passes, but other passes that create new global variables need to know which address space to place them in. In our CHERI fork (using a default address space of 200), we got lots of assertion failures/invalid IR due to passes creating globals in AS0 (or assuming that all global pointers are AS0) until I added a default globals address space to the datalayout so those passes can choose the address space that our target needs. Does that make sense?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70947/new/
https://reviews.llvm.org/D70947
More information about the llvm-commits
mailing list