[all-commits] [llvm/llvm-project] 5856f3: [LTO] Add configuartion option to use default opti...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Mar 22 06:29:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5856f30b5ae06153ff4a7d3db73ff8d9a05b4144
      https://github.com/llvm/llvm-project/commit/5856f30b5ae06153ff4a7d3db73ff8d9a05b4144
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
    M llvm/include/llvm/LTO/Config.h
    M llvm/lib/LTO/LTOBackend.cpp

  Log Message:
  -----------
  [LTO] Add configuartion option to use default optimization pipeline

This patch adds a configuration option to simply use the default pass
pipeline in favor of the LTO-specific one. We observed some severe
performance penalties when uding device-side LTO for OpenMP offloading
applications caused by the LTO-pass pipeline. This is primarily because
OpenMP uses an LLVM bitcode library to implement a GPU runtime library.
In a standard compilation we link this bitcode library into each source
file and optimize it with the default pipeline. When performing LTO we
link it late with all the files, but the bitcode library never has the
regular optimization pipeline applied to it so we miss a few
optimizations just using the LTO pipeline to optimize it.

I'm not committed to this solution, but it's the easiest method to solve
this performance regression when using LTO without changing the
optimizatin pipeline for other users.

Reviewed By: tianshilei1992

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




More information about the All-commits mailing list