[CIR] Upstream support for address space handling
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
### Overview
Upstream support for correctly handling address spaces in CIR.
This is a pervasive task, requiring changes in many places. Locations where address space handling is known to be missing are marked with a `cir::MissingFeatures::addressSpace()` assertion. Considerable effort will be needed to verify that all needed handling is reached by some test case. Many cases will not be reachable until support for additional features such as OpenMP or CUDA are added, which may not happen until much later. The assertions should be left in place for such cases.
### Suggested minimal test case
```
void f(int __attribute__((address_space(1))) *arg) {
return;
}
```
### Existing incubator tests
clang/test/CIR/CodeGen/address-space.c
clang/test/CIR/CodeGen/address-space-conversion.cpp
Contributor guide
Assessment
This issue has not been assessed yet.