[all-commits] [llvm/llvm-project] 6a59f0: [LTO] Use lto::backend for code generation.

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Jan 30 03:18:17 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a59f0560648b43324b5aed51b9ef996404a25e0
      https://github.com/llvm/llvm-project/commit/6a59f0560648b43324b5aed51b9ef996404a25e0
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-01-30 (Sat, 30 Jan 2021)

  Changed paths:
    M llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/test/LTO/X86/disable-verify.ll
    M llvm/test/tools/lto/print-stats.ll
    M llvm/tools/llvm-lto/llvm-lto.cpp

  Log Message:
  -----------
  [LTO] Use lto::backend for code generation.

This patch updates LTOCodeGenerator to use the utilities provided by
LTOBackend to run middle-end optimizations and backend code generation.

This is a first step towards unifying the code used by libLTO's C API
and the newer, C++ interface (see PR41541).

The immediate motivation is to allow using the new pass manager when
doing LTO using libLTO's C API, which is used on Darwin, among others.

With the changes, there are no codegen/stats differences when building
MultiSource/SPEC2000/SPEC2006 on Darwin X86 with LTO, compared
to without the patch.

Reviewed By: steven_wu

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




More information about the All-commits mailing list