OSDN Git Service

[ThinLTO] Metadata linking for imported functions
authorTeresa Johnson <tejohnson@google.com>
Thu, 17 Dec 2015 17:14:09 +0000 (17:14 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 17 Dec 2015 17:14:09 +0000 (17:14 +0000)
commitd0f8afa9b6d5bc8697c56f1b909cfce0e30eec9e
tree48cd2005cdf733ae9b1b1d7ab933750cb3e04cd2
parent55618d8f5c5498672bc044ccfc32dcd4f76f8456
[ThinLTO] Metadata linking for imported functions

Summary:
Second patch split out from http://reviews.llvm.org/D14752.

Maps metadata as a post-pass from each module when importing complete,
suturing up final metadata to the temporary metadata left on the
imported instructions.

This entails saving the mapping from bitcode value id to temporary
metadata in the importing pass, and from bitcode value id to final
metadata during the metadata linking postpass.

Depends on D14825.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255909 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/llvm/IR/GVMaterializer.h
include/llvm/IR/Metadata.h
include/llvm/IRReader/IRReader.h
include/llvm/Linker/IRMover.h
include/llvm/Linker/Linker.h
include/llvm/Transforms/Utils/ValueMapper.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/IR/Metadata.cpp
lib/IRReader/IRReader.cpp
lib/Linker/IRMover.cpp
lib/Linker/LinkModules.cpp
lib/Transforms/IPO/FunctionImport.cpp
lib/Transforms/Utils/ValueMapper.cpp
test/Linker/Inputs/thinlto_funcimport_debug.ll [new file with mode: 0644]
test/Linker/thinlto_funcimport_debug.ll [new file with mode: 0644]
test/Transforms/FunctionImport/Inputs/funcimport_debug.ll [new file with mode: 0644]
test/Transforms/FunctionImport/funcimport_debug.ll [new file with mode: 0644]
tools/llvm-link/llvm-link.cpp