[PATCH] D134355: [AMDGPU] Emit module flag for all code object versions

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 07:44:45 PDT 2022


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:590-591
     // times 100.
-    // ToDo: Enable module flag for all code object version when ROCm device
-    // library is ready.
-    if (getTarget().getTargetOpts().CodeObjectVersion == TargetOptions::COV_5) {
+    if (getTarget().getTargetOpts().CodeObjectVersion !=
+        TargetOptions::COV_None) {
       getModule().addModuleFlag(llvm::Module::Error,
----------------
arsenm wrote:
> What is the flag default value? What does it mean to target none?
> What is the flag default value? What does it mean to target none?

Default value is COV_V4. COV_None is for device library, which needs to link with bitcode containing any code object version. COV_None is only specified with a clang -cc1 option which is used when compiling device library.


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

https://reviews.llvm.org/D134355



More information about the cfe-commits mailing list