[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 21 15:35:32 PDT 2023


yaxunl added inline comments.


================
Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:13-15
+#if __has_include("hip/hip_version.h")
+#include "hip/hip_version.h"
+#endif // __has_include("hip/hip_version.h")
----------------
pls condition this with


```
#if !defined(__HIPCC_RTC__)
#endif
```
Since for hiprtc we concatenate header files linearly into one header file.


================
Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:321
+#if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 560
+#define __DEPRECATED_SINCE_HIP_560 __attribute__((deprecated))
+#else
----------------
How about providing a replacement hint:


```
#define __DEPRECATED_SINCE_HIP_560(replacement) __attribute__((deprecated("replaced by clang builtin", #replacement)))

```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155982/new/

https://reviews.llvm.org/D155982



More information about the cfe-commits mailing list