forked from OSchip/llvm-project
4fef68cb8d
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 |
||
---|---|---|
.. | ||
Inputs | ||
alias_import.ll | ||
alias_resolution.ll | ||
autoupgrade.ll | ||
cache.ll | ||
crash_debuginfo.ll | ||
dicompositetype-unique.ll | ||
distributed_import.ll | ||
distributed_indexes.ll | ||
drop-debug-info.ll | ||
emit_imports.ll | ||
empty_module_with_cache.ll | ||
funcimport.ll | ||
funcimport2.ll | ||
internalize.ll | ||
linkonce_aliasee_ref_import.ll | ||
linkonce_resolution_comdat.ll | ||
lit.local.cfg | ||
llvm.used.ll | ||
module_asm2.ll | ||
module_asm_glob.ll | ||
prefix_replace.ll | ||
referenced_by_constant.ll | ||
section.ll | ||
select_right_alias_definition.ll | ||
weak_resolution.ll | ||
weak_resolution_single.ll |