[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 7 14:13:46 PST 2022


yaxunl marked 2 inline comments as done.
yaxunl added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1166
     CmdArgs.insert(CmdArgs.begin() + 1, "-mllvm");
+    // -cc1as does not need -mcode-object-version option.
+    if (!IsCC1As)
----------------
tra wrote:
> `does not need -mcode-object-version` --> `does not accept...`
will do


================
Comment at: clang/test/CodeGenCUDA/amdgpu-code-object-version.cu:24-25
+
+// RUN: not %clang -cc1as -triple amdgcn-amd-amdhsa \
+// RUN:   -mcode-object-version=5 -o - %s 2>&1 | FileCheck -check-prefix=AS %s
+
----------------
tra wrote:
> I think what we want to check is that if top-level driver decides t invoke cc1as, that we do not pass the `-mcode-object-version` to it.
> 
> That `cc1as` would not accept that option is not very interesting -- it's a CC1-only option, after all.
> I guess that makes my test idea also not very interesting -- if we were to accidentally pass that option, it would cause an error.
> 
> OK, let's just update the comment above cc1as check and remove this test. 
will remove this test and add a driver test for -cc1as


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

https://reviews.llvm.org/D119026



More information about the cfe-commits mailing list