mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
Use llvm::StringLiteral instead of StringRef in few places
llvm-svn: 372395
This commit is contained in:
parent
1ee645b6d2
commit
a661d2b4f2
@ -197,18 +197,12 @@ static bool handleAttr(Function &Parent, const Function &Callee,
|
|||||||
static void copyFeaturesToFunction(Function &Parent, const Function &Callee,
|
static void copyFeaturesToFunction(Function &Parent, const Function &Callee,
|
||||||
bool &NeedQueuePtr) {
|
bool &NeedQueuePtr) {
|
||||||
// X ids unnecessarily propagated to kernels.
|
// X ids unnecessarily propagated to kernels.
|
||||||
static const StringRef AttrNames[] = {
|
static constexpr StringLiteral AttrNames[] = {
|
||||||
{ "amdgpu-work-item-id-x" },
|
"amdgpu-work-item-id-x", "amdgpu-work-item-id-y",
|
||||||
{ "amdgpu-work-item-id-y" },
|
"amdgpu-work-item-id-z", "amdgpu-work-group-id-x",
|
||||||
{ "amdgpu-work-item-id-z" },
|
"amdgpu-work-group-id-y", "amdgpu-work-group-id-z",
|
||||||
{ "amdgpu-work-group-id-x" },
|
"amdgpu-dispatch-ptr", "amdgpu-dispatch-id",
|
||||||
{ "amdgpu-work-group-id-y" },
|
"amdgpu-kernarg-segment-ptr", "amdgpu-implicitarg-ptr"};
|
||||||
{ "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"))
|
if (handleAttr(Parent, Callee, "amdgpu-queue-ptr"))
|
||||||
NeedQueuePtr = true;
|
NeedQueuePtr = true;
|
||||||
|
@ -2017,13 +2017,7 @@ bool AMDGPUAsmParser::AddNextRegisterToList(unsigned &Reg, unsigned &RegWidth,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const StringRef Registers[] = {
|
static constexpr StringLiteral Registers[] = {"v", "s", "ttmp", "acc", "a"};
|
||||||
{ "v" },
|
|
||||||
{ "s" },
|
|
||||||
{ "ttmp" },
|
|
||||||
{ "acc" },
|
|
||||||
{ "a" },
|
|
||||||
};
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
AMDGPUAsmParser::isRegister(const AsmToken &Token,
|
AMDGPUAsmParser::isRegister(const AsmToken &Token,
|
||||||
|
@ -108,7 +108,7 @@ bool X86InsertPrefetch::findPrefetchInfo(const FunctionSamples *TopSamples,
|
|||||||
Prefetches &Prefetches) const {
|
Prefetches &Prefetches) const {
|
||||||
assert(Prefetches.empty() &&
|
assert(Prefetches.empty() &&
|
||||||
"Expected caller passed empty PrefetchInfo vector.");
|
"Expected caller passed empty PrefetchInfo vector.");
|
||||||
static const std::pair<const StringRef, unsigned> HintTypes[] = {
|
static constexpr std::pair<StringLiteral, unsigned> HintTypes[] = {
|
||||||
{"_nta_", X86::PREFETCHNTA},
|
{"_nta_", X86::PREFETCHNTA},
|
||||||
{"_t0_", X86::PREFETCHT0},
|
{"_t0_", X86::PREFETCHT0},
|
||||||
{"_t1_", X86::PREFETCHT1},
|
{"_t1_", X86::PREFETCHT1},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user