[ThinLTO] Enable in-place symbol changes for exporting module
authorTeresa Johnson <tejohnson@google.com>
Fri, 8 Jan 2016 15:00:00 +0000 (15:00 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 8 Jan 2016 15:00:00 +0000 (15:00 +0000)
commit73ef481b528e1ab0bd943e178d384a926b4cbad9
tree2cb11b2af185e3e04ebb04ba7910640722a8ea0d
parentd7ef3dae862793fd92c9eadb587bc108ac122d56
[ThinLTO] Enable in-place symbol changes for exporting module

Summary:
Move ThinLTO global value processing functions out of ModuleLinker and
into a new ThinLTOGlobalProcessor class, which performs any necessary
linkage and naming changes on the given module in place.

As a result, renameModuleForThinLTO no longer needs to create a new
Module when performing any necessary local to global promotion on a
module that we are possibly exporting from during a ThinLTO backend
compilation.

During function importing the ThinLTO processing is still invoked from
the ModuleLinker (via the new class), as it needs to perform renaming and
linkage changes on the source module, e.g. in order to get the correct
renaming during local to global promotion.

Reviewers: joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D15696

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257174 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Linker/Linker.h
lib/Linker/LinkModules.cpp