[ThinLTO] Add an option to disable (thin)lto internalization.
authorXin Tong <trent.xin.tong@gmail.com>
Mon, 5 Nov 2018 15:49:46 +0000 (15:49 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Mon, 5 Nov 2018 15:49:46 +0000 (15:49 +0000)
commit7ca744488fa4c8e2b7d0fc88c63840d7f9000f54
tree499e14d7281dab901cc68b12f972d1451fa6ca84
parent6bd468bd8b1faeee33483c494135357c9a297fd8
[ThinLTO] Add an option to disable (thin)lto internalization.

Summary:
LTO and ThinLTO optimizes the IR differently.

One source of differences is the amount of internalizations that
can happen.

Add an option to enable/disable internalization so that other
differences can be studied in isolation. e.g. inlining.

There are other things lto and thinlto do differently, I will add
flags to enable/disable them as needed.

Reviewers: tejohnson, pcc, steven_wu

Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, dang, llvm-commits

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

llvm-svn: 346140
llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
llvm/lib/LTO/LTO.cpp
llvm/test/LTO/X86/internalize.ll [new file with mode: 0644]
llvm/test/ThinLTO/X86/internalize.ll