llvm-project/llvm/test/ThinLTO/X86
Teresa Johnson 4fef68cb8d [ThinLTO] Only promote exported locals as marked in index
Summary:
We have always speculatively promoted all renamable local values
(except const non-address taken variables) for both the exporting
and importing module. We would then internalize them back based on
the ThinLink results if they weren't actually exported. This is
inefficient, and results in unnecessary renames. It also meant we
had to check the non-renamability of a value in the summary, which
was already checked during function importing analysis in the ThinLink.

Made renameModuleForThinLTO (which does the promotion/renaming) instead
use the index when exporting, to avoid unnecessary renames/promotions.
For importing modules, we can simply promoted all values as any local
we import by definition is exported and needs promotion.

This required changes to the method used by the FunctionImport pass
(only invoked from 'opt' for testing) and when invoked from llvm-link,
since neither does a ThinLink. We simply conservatively mark all locals
in the index as promoted, which preserves the current aggressive
promotion behavior.

I also needed to change an llvm-lto based test where we had previously
been aggressively promoting values that weren't importable (aliasees),
but now will not promote.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

llvm-svn: 286871
2016-11-14 19:21:41 +00:00
..
Inputs Restore part of "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-10 16:57:32 +00:00
alias_import.ll [ThinLTO] Only promote exported locals as marked in index 2016-11-14 19:21:41 +00:00
alias_resolution.ll [ThinLTO] Resolve LinkOnceAny 2016-05-26 14:16:52 +00:00
autoupgrade.ll Fix bitcode auto-upgrade when using bitcode lazy loading 2016-08-14 00:01:27 +00:00
cache.ll ThinLTO: don't perform incremental LTO on module without a hash 2016-10-08 04:44:23 +00:00
crash_debuginfo.ll DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
dicompositetype-unique.ll [ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC) 2016-08-23 18:39:15 +00:00
distributed_import.ll [ThinLTO] Handle distributed backend case when doing renaming 2016-11-03 01:07:16 +00:00
distributed_indexes.ll Restore "[ThinLTO] Emit individual index files for distributed backends" 2016-05-10 13:48:23 +00:00
drop-debug-info.ll Refactor stripDebugInfo(Function) to handle intrinsic 2016-05-07 04:10:52 +00:00
emit_imports.ll [ThinLTO] Always emit a summary when compiling in ThinLTO mode 2016-09-20 23:07:17 +00:00
empty_module_with_cache.ll ThinLTO: don't perform incremental LTO on module without a hash 2016-10-08 04:44:23 +00:00
funcimport.ll [ThinLTO] Add an option to llvm-lto to print some basic statistics for the index 2016-09-14 21:04:59 +00:00
funcimport2.ll [ThinLTO] Disable importing and other cross-module optis at -O0 2016-10-31 22:12:21 +00:00
internalize.ll [LTO] Fix test following r279550 2016-08-23 19:32:41 +00:00
linkonce_aliasee_ref_import.ll [ThinLTO] Correctly resolve linkonce when importing aliasee 2016-10-30 05:15:23 +00:00
linkonce_resolution_comdat.ll [ThinLTO] Fix temp file dumping, enable via llvm-lto and test it 2016-08-15 23:24:57 +00:00
lit.local.cfg
llvm.used.ll ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function 2016-05-06 08:25:33 +00:00
module_asm2.ll Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
module_asm_glob.ll [ThinLTO] Don't link module level assembly when importing 2016-10-12 18:39:29 +00:00
prefix_replace.ll [ThinLTO] Use semicolon to separate path prefix replacement 2016-05-17 18:43:22 +00:00
referenced_by_constant.ll Always traverse GlobalVariable initializer when computing the export list 2016-04-23 23:29:24 +00:00
section.ll ThinLTO: do not promote GlobalVariable that have a specific section. 2016-04-27 00:32:13 +00:00
select_right_alias_definition.ll FunctionImport: make sure we always select the right callee in presence of alias 2016-04-20 04:17:36 +00:00
weak_resolution.ll [ThinLTO] Correctly resolve linkonce when importing aliasee 2016-10-30 05:15:23 +00:00
weak_resolution_single.ll ThinLTO: Remove check for multiple modules before applying weak resolutions. 2016-07-07 01:51:11 +00:00