llvm-project
28c52edb - [clang][X86] Support __attribute__((model("small"/"large"))) (#124834)

Commit
263 days ago
[clang][X86] Support __attribute__((model("small"/"large"))) (#124834) Following up #72078, on x86-64 this allows a global to be considered small or large regardless of the code model. For example, x86-64's medium code model by default classifies globals as small or large depending on their size relative to -mlarge-data-threshold. GPU compilations compile the same TU for both the host and device, but only codegen the host or device portions of it depending on attributes. However, we still Sema the TU, and will warn on an unknown attribute for the device compilation since this attribute is target-specific. Since they're intended for the host, accept but ignore this attribute for device compilations where the host is either unknown or known to support the attribute. Co-authored-by: @pranavk
Author
Parents
Loading