Skip to content

[CIR] Upstream support for address space handling #160386

@andykaylor

Description

@andykaylor

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

Metadata

Metadata

Assignees

Labels

ClangIRAnything related to the ClangIR project

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions