llvm / llvm/llvm-project

[CIR] Upstream support for address space handling

Open
#160,386 6 comments 0 reactions 1 assignee Claimed by @RiverDave View on GitHub
ClangIR
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.