Skip to content

Commit 87da3d4

Browse files
ritter-x2aGroverkss
authored andcommitted
Revert "[Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros" (llvm#115499)
Reverts llvm#112849 due to test failure on Mac, reported by @nico
1 parent f1969aa commit 87da3d4

File tree

5 files changed

+7
-127
lines changed

5 files changed

+7
-127
lines changed

clang/docs/AMDGPUSupport.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Predefined Macros
5050
* - ``__AMDGCN_UNSAFE_FP_ATOMICS__``
5151
- Defined if unsafe floating-point atomics are allowed.
5252
* - ``__AMDGCN_WAVEFRONT_SIZE__``
53-
- Defines the wavefront size. Allowed values are 32 and 64 (deprecated).
53+
- Defines the wavefront size. Allowed values are 32 and 64.
5454
* - ``__AMDGCN_WAVEFRONT_SIZE``
55-
- Alias to ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated).
55+
- Alias to ``__AMDGCN_WAVEFRONT_SIZE__``. To be deprecated.
5656
* - ``__HAS_FMAF__``
5757
- Defined if FMAF instruction is available (deprecated).
5858
* - ``__HAS_LDEXPF__``

clang/docs/HIPSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Predefined Macros
178178

179179
Note that some architecture specific AMDGPU macros will have default values when
180180
used from the HIP host compilation. Other :doc:`AMDGPU macros <AMDGPUSupport>`
181-
like ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated) will default to 64 for example.
181+
like ``__AMDGCN_WAVEFRONT_SIZE__`` will default to 64 for example.
182182

183183
Compilation Modes
184184
=================

clang/include/clang/Basic/MacroBuilder.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,8 @@ class MacroBuilder {
2626
MacroBuilder(raw_ostream &Output) : Out(Output) {}
2727

2828
/// Append a \#define line for macro of the form "\#define Name Value\n".
29-
/// If DeprecationMsg is provided, also append a pragma to deprecate the
30-
/// defined macro.
31-
void defineMacro(const Twine &Name, const Twine &Value = "1",
32-
Twine DeprecationMsg = "") {
29+
void defineMacro(const Twine &Name, const Twine &Value = "1") {
3330
Out << "#define " << Name << ' ' << Value << '\n';
34-
if (!DeprecationMsg.isTriviallyEmpty())
35-
Out << "#pragma clang deprecated(" << Name << ", \"" << DeprecationMsg
36-
<< "\")\n";
3731
}
3832

3933
/// Append a \#undef line for Name. Name should be of the form XXX

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,9 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts,
337337
if (hasFastFMA())
338338
Builder.defineMacro("FP_FAST_FMA");
339339

340-
Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize),
341-
"compile-time-constant access to the wavefront size will "
342-
"be removed in a future release");
343-
Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE", Twine(WavefrontSize),
344-
"compile-time-constant access to the wavefront size will "
345-
"be removed in a future release");
340+
Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize));
341+
// ToDo: deprecate this macro for naming consistency.
342+
Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE", Twine(WavefrontSize));
346343
Builder.defineMacro("__AMDGCN_CUMODE__", Twine(CUMode));
347344
}
348345

clang/test/Driver/hip-wavefront-size-deprecation-diagnostics.hip

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

0 commit comments

Comments
 (0)