llvm-project/llvm/test/ThinLTO/X86/Inputs
Teresa Johnson 93f9996278 [ThinLTO] Import local variables from the same module as caller
Summary:
We can sometimes end up with multiple copies of a local variable that
have the same GUID in the index. This happens when there are local
variables with the same name that are in different source files having the
same name/path at compile time (but compiled into different bitcode objects).

In this case make sure we import the copy in the caller's module.
This enables importing both of the variables having the same GUID
(but which will have different promoted names since the module paths,
and therefore the module hashes, will be distinct).

Importing the wrong copy is particularly problematic for read only
variables, since we must import them as a local copy whenever
referenced. Otherwise we get undefs at link time.

Note that the llvm-lto.cpp and ThinLTOCodeGenerator changes are needed
for testing the distributed index case via clang, which will be sent as
a separate clang-side patch shortly. We were previously not doing the
dead code/read only computation before computing imports when testing
distributed index generation (like it was for testing importing and
other ThinLTO mechanisms alone).

Reviewers: evgeny777

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

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

llvm-svn: 347886
2018-11-29 17:02:42 +00:00
..
alias_import.ll
alias_internal.ll [LTO] Fix a crash caused by accessing an empty ValueInfo 2018-11-02 23:49:21 +00:00
alias_resolution.ll
autoupgrade.bc
cache-icall.ll
cache-import-lists1.ll
cache-import-lists2.ll
cache-typeid-resolutions-import.ll
cache-typeid-resolutions1.ll
cache-typeid-resolutions2.ll
cache-typeid-resolutions3.ll
cache.ll
callees-metadata.ll [ThinLTO] Add funtions in callees metadata to CallGraphEdges 2018-03-13 04:26:58 +00:00
cfi-distributed.ll [ThinLTO] Write TYPE_IDs for types used in functions imported by aliases 2018-09-19 18:51:42 +00:00
crash_debuginfo.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
deadstrip.ll
debuginfo-compositetype-import.ll
debuginfo-cu-import.ll
diagnostic-handler-remarks.ll
dicompositetype-unique-alias.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
dicompositetype-unique.ll
dicompositetype-unique2.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
distributed_import.ll
distributed_indexes.ll
dot-dumper.ll
drop-debug-info.bc
drop-debug-info.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
dsolocal_dllimport.ll [ThinLTO] Clear dllimport when setting dso_local. 2018-03-13 15:24:51 +00:00
emit_imports.ll
emit_imports2.ll [ThinLTO] Use std::map to get determistic imports files 2018-07-10 20:06:04 +00:00
empty.ll
empty_module_with_cache.ll
export.ll
funcimport-debug.ll [ThinLTO] Print names in function import debug messages when available 2018-06-27 18:03:39 +00:00
funcimport-tbaa.ll
funcimport.ll
funcimport2.ll
globals-import-blockaddr.ll [ThinLTO] Don't import GV which contains blockaddress 2018-10-12 07:24:02 +00:00
globals-import-cf-baz.ll [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
globals-import.ll [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
import_opaque_type.ll
index-const-prop-alias.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-cache-foo.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-cache-test1.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-cache-test2.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-comdat.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-define-g.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-full-lto.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-gvref.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop-linkage.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
index-const-prop.ll [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
lazyload_metadata.ll
linkonce_aliasee_ref_import.ll
linkonce_resolution_comdat.ll
llvm.used.ll
local_name_conflict1.ll [ThinLTO] Import local variables from the same module as caller 2018-11-29 17:02:42 +00:00
local_name_conflict2.ll [ThinLTO] Import local variables from the same module as caller 2018-11-29 17:02:42 +00:00
local_name_conflict_var1.ll [ThinLTO] Import local variables from the same module as caller 2018-11-29 17:02:42 +00:00
local_name_conflict_var2.ll [ThinLTO] Import local variables from the same module as caller 2018-11-29 17:02:42 +00:00
merge-triple.ll
module_asm.ll
module_asm2.ll
noinline.ll
personality-local.ll
personality.ll
pr35472.ll [ThinLTO] Fix a crash in lazy loading of Metadata 2018-11-14 20:58:04 +00:00
reference_non_importable.ll
referenced_by_constant.ll
section.ll
select_right_alias_definition1.ll
select_right_alias_definition2.ll
strong_non_prevailing.ll [LTO] Drop non-prevailing definitions only if linkage is not local or appending 2018-11-08 20:10:07 +00:00
weak_resolution.ll