Skip to content

Commit 5eb65ca

Browse files
committed
[OpenMP] Move function out of !NDEBUG section
To unbreak the release build.
1 parent d6a3d6b commit 5eb65ca

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ static bool isConflictIP(IRBuilder<>::InsertPoint IP1,
8686
return IP1.getBlock() == IP2.getBlock() && IP1.getPoint() == IP2.getPoint();
8787
}
8888

89-
static const omp::GV &getGridValue(const Triple &T, Function *Kernel) {
90-
if (T.isAMDGPU()) {
91-
StringRef Features =
92-
Kernel->getFnAttribute("target-features").getValueAsString();
93-
if (Features.count("+wavefrontsize64"))
94-
return omp::getAMDGPUGridValues<64>();
95-
return omp::getAMDGPUGridValues<32>();
96-
}
97-
if (T.isNVPTX())
98-
return omp::NVPTXGridValues;
99-
llvm_unreachable("No grid value available for this architecture!");
100-
}
101-
10289
static bool isValidWorkshareLoopScheduleType(OMPScheduleType SchedType) {
10390
// Valid ordered/unordered and base algorithm combinations.
10491
switch (SchedType & ~OMPScheduleType::MonotonicityMask) {
@@ -158,6 +145,19 @@ static bool isValidWorkshareLoopScheduleType(OMPScheduleType SchedType) {
158145
}
159146
#endif
160147

148+
static const omp::GV &getGridValue(const Triple &T, Function *Kernel) {
149+
if (T.isAMDGPU()) {
150+
StringRef Features =
151+
Kernel->getFnAttribute("target-features").getValueAsString();
152+
if (Features.count("+wavefrontsize64"))
153+
return omp::getAMDGPUGridValues<64>();
154+
return omp::getAMDGPUGridValues<32>();
155+
}
156+
if (T.isNVPTX())
157+
return omp::NVPTXGridValues;
158+
llvm_unreachable("No grid value available for this architecture!");
159+
}
160+
161161
/// Determine which scheduling algorithm to use, determined from schedule clause
162162
/// arguments.
163163
static OMPScheduleType

0 commit comments

Comments
 (0)