static void copyFeaturesToFunction(Function &Parent, const Function &Callee,
bool &NeedQueuePtr) {
// X ids unnecessarily propagated to kernels.
- static const StringRef AttrNames[] = {
- { "amdgpu-work-item-id-x" },
- { "amdgpu-work-item-id-y" },
- { "amdgpu-work-item-id-z" },
- { "amdgpu-work-group-id-x" },
- { "amdgpu-work-group-id-y" },
- { "amdgpu-work-group-id-z" },
- { "amdgpu-dispatch-ptr" },
- { "amdgpu-dispatch-id" },
- { "amdgpu-kernarg-segment-ptr" },
- { "amdgpu-implicitarg-ptr" }
- };
+ static constexpr StringLiteral AttrNames[] = {
+ "amdgpu-work-item-id-x", "amdgpu-work-item-id-y",
+ "amdgpu-work-item-id-z", "amdgpu-work-group-id-x",
+ "amdgpu-work-group-id-y", "amdgpu-work-group-id-z",
+ "amdgpu-dispatch-ptr", "amdgpu-dispatch-id",
+ "amdgpu-kernarg-segment-ptr", "amdgpu-implicitarg-ptr"};
if (handleAttr(Parent, Callee, "amdgpu-queue-ptr"))
NeedQueuePtr = true;
Prefetches &Prefetches) const {
assert(Prefetches.empty() &&
"Expected caller passed empty PrefetchInfo vector.");
- static const std::pair<const StringRef, unsigned> HintTypes[] = {
+ static constexpr std::pair<StringLiteral, unsigned> HintTypes[] = {
{"_nta_", X86::PREFETCHNTA},
{"_t0_", X86::PREFETCHT0},
{"_t1_", X86::PREFETCHT1},