[all-commits] [llvm/llvm-project] 4ab4e4: [OpenMP] Always pass the optimization level to the...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Aug 18 15:10:30 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ab4e40fa2944bfd2ed44c63027e7a838043e0fd
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/amdgpu-openmp-toolchain.c

  Log Message:
  [OpenMP] Always pass the optimization level to the linker wrapper

The linker wrapper runs LTO internally, so it needs to know the
optimization level the user requested, if any. Previously this was only
done in `-foffload-lto` mode as we were assuming that this would enble
LTO. However, AMDGPU always performs LTO, and it's possible to run clang
on object files to link without passing this flag. So we should just
respect it always.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D158298

More information about the All-commits mailing list