[PATCH] D103579: [LTO] Fix -fwhole-program-vtables handling after HIP ThinLTO patch

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 10:51:38 PDT 2021


tejohnson added inline comments.


================
Comment at: clang/test/Driver/hip-options.hip:63
 // RUN: %clang -### -target x86_64-unknown-linux-gnu -nogpuinc -nogpulib \
-// RUN:   --cuda-gpu-arch=gfx906 -foffload-lto=thin %s 2>&1 \
-// RUN:   | FileCheck -check-prefix=THINLTO %s
+// RUN:   --cuda-gpu-arch=gfx906 -foffload-lto=thin -fwhole-program-vtables %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=HIPTHINLTO %s
----------------
tra wrote:
> > caused a regression when compiling cuda code with -flto=thin -fwhole-program-vtables.
> 
> We should add a CUDA test for that. This test only covers HIP compilation.
AFAICT there are no existing Cuda lto tests in clang/test/Driver that I could add -fwhole-program-vtables to.

However, for the purposes of this bug fix, I think adding the below testing here should be sufficient - it triggers exactly the same way as when I saw this in an internal cuda build.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103579



More information about the cfe-commits mailing list