Skip to content

Commit 91b7c9d

Browse files
committed
Address review comments
1 parent 924f542 commit 91b7c9d

File tree

6 files changed

+2
-65
lines changed

6 files changed

+2
-65
lines changed

clang/include/clang/Basic/OffloadArch.h

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ enum class OffloadArch {
101101
AMDGCNSPIRV,
102102
Generic, // A processor model named 'generic' if the target backend defines a
103103
// public one.
104-
// Intel CPUs
105-
GRANITERAPIDS,
106-
// Intel GPUs
107-
BMG_G21,
108104
LAST,
109105

110106
CudaDefault = OffloadArch::SM_52,
@@ -120,22 +116,11 @@ static inline bool IsAMDOffloadArch(OffloadArch A) {
120116
return A >= OffloadArch::GFX600 && A < OffloadArch::Generic;
121117
}
122118

123-
static inline bool IsIntelCPUArch(OffloadArch Arch) {
124-
return Arch >= OffloadArch::GRANITERAPIDS && Arch < OffloadArch::BMG_G21;
125-
}
126-
127-
static inline bool IsIntelGPUArch(OffloadArch Arch) {
128-
return Arch >= OffloadArch::BMG_G21 && Arch < OffloadArch::LAST;
129-
}
130-
131-
static inline bool IsIntelOffloadArch(OffloadArch Arch) {
132-
return IsIntelCPUArch(Arch) || IsIntelGPUArch(Arch);
133-
}
134-
135119
const char *OffloadArchToString(OffloadArch A);
136120
const char *OffloadArchToVirtualArchString(OffloadArch A);
137121

138-
// The input should have the form "sm_20".
122+
// Convert a string to an OffloadArch enum value. Returns
123+
// OffloadArch::UNKNOWN if the string is not recognized.
139124
OffloadArch StringToOffloadArch(llvm::StringRef S);
140125

141126
} // namespace clang

clang/lib/Basic/OffloadArch.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,12 @@ static const OffloadArchToStringMap arch_names[] = {
8989
GFX(1200), // gfx1200
9090
GFX(1201), // gfx1201
9191
{OffloadArch::AMDGCNSPIRV, "amdgcnspirv", "compute_amdgcn"},
92-
// Note: this is an initial list of Intel GPU and GPU offloading architectures.
93-
// The list will be expanded later as support for more architectures is added.
94-
// Intel CPUs
95-
{OffloadArch::GRANITERAPIDS, "graniterapids", ""},
96-
// Intel GPUS
97-
{OffloadArch::BMG_G21, "bmg_g21", ""},
9892
{OffloadArch::Generic, "generic", ""},
9993
// clang-format on
10094
};
10195
#undef SM
10296
#undef SM2
10397
#undef GFX
104-
#undef INTEL
10598

10699
const char *OffloadArchToString(OffloadArch A) {
107100
auto result = std::find_if(

clang/lib/Basic/Targets/NVPTX.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
241241
case OffloadArch::GFX1201:
242242
case OffloadArch::AMDGCNSPIRV:
243243
case OffloadArch::Generic:
244-
case OffloadArch::GRANITERAPIDS:
245-
case OffloadArch::BMG_G21:
246244
case OffloadArch::LAST:
247245
break;
248246
case OffloadArch::UNKNOWN:

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,8 +2335,6 @@ void CGOpenMPRuntimeGPU::processRequiresDirective(const OMPRequiresDecl *D) {
23352335
case OffloadArch::GFX1201:
23362336
case OffloadArch::AMDGCNSPIRV:
23372337
case OffloadArch::Generic:
2338-
case OffloadArch::GRANITERAPIDS:
2339-
case OffloadArch::BMG_G21:
23402338
case OffloadArch::UNUSED:
23412339
case OffloadArch::UNKNOWN:
23422340
break;

clang/unittests/Basic/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ add_clang_unittest(BasicTests
55
FileEntryTest.cpp
66
FileManagerTest.cpp
77
LineOffsetMappingTest.cpp
8-
OffloadArchTest.cpp
98
SanitizersTest.cpp
109
SarifTest.cpp
1110
SourceManagerTest.cpp

clang/unittests/Basic/OffloadArchTest.cpp

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)