[all-commits] [llvm/llvm-project] 2a8cbd: [LTO] Add support for existing Config::Freestandin...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Jan 22 05:46:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a8cbdd83006d638936800f9ed3dea4fc20ddf32
      https://github.com/llvm/llvm-project/commit/2a8cbdd83006d638936800f9ed3dea4fc20ddf32
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/test/LTO/X86/tli-nobuiltin.ll
    M llvm/tools/llvm-lto2/llvm-lto2.cpp

  Log Message:
  -----------
  [LTO] Add support for existing Config::Freestanding option.

lto::Config has a field to control whether the build is "freestanding"
(no builtins) or not, but it is not hooked up to the code actually
running the passes.

This patch adds support for the flag to both the code that runs
optimization with the new and old pass managers, by explicitly adding a
TargetLibraryInfo instance. If Freestanding is true, all library functions
are disabled.

Reviewed By: steven_wu

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




More information about the All-commits mailing list