[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 08:36:29 PDT 2019


tejohnson created this revision.
tejohnson added a reviewer: xur.
Herald added subscribers: dexonsmith, steven_wu, hiraditya, eraman, inglorion, mehdi_amini.
Herald added projects: clang, LLVM.

The opt level was not being passed down to the ThinLTO backend when
invoked via clang (for distributed ThinLTO).

This exposed an issue where the new PM was asserting if the Thin or
regular LTO backend pipelines were invoked with -O0 (not a new issue,
could be provoked by invoking in-process *LTO backends via linker using
new PM and -O0). Fix this similar to the old PM where -O0 only does the
necessary lowering of type metadata (WPD and LowerTypeTest passes) and
then quits, rather than asserting.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61022

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  clang/test/CodeGen/thinlto-debug-pm.c
  clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll
  llvm/lib/Passes/PassBuilder.cpp
  llvm/test/tools/gold/X86/opt-level.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61022.196263.patch
Type: text/x-patch
Size: 6911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190423/003c4b76/attachment.bin>


More information about the llvm-commits mailing list