llvm-project/llvm/test/ThinLTO/X86
Vlad Tsyrklevich cd1559366d [LowerTypeTests] Limit when icall jumptable entries are emitted
Summary:
Currently LowerTypeTests emits jumptable entries for all live external
and address-taken functions; however, we could limit the number of
functions that we emit entries for significantly.

For Cross-DSO CFI, we continue to emit jumptable entries for all
exported definitions.  In the non-Cross-DSO CFI case, we only need to
emit jumptable entries for live functions that are address-taken in live
functions. This ignores exported functions and functions that are only
address taken in dead functions. This change uses ThinLTO summary data
(now emitted for all modules during ThinLTO builds) to determine
address-taken and liveness info.

The logic for emitting jumptable entries is more conservative in the
regular LTO case because we don't have summary data in the case of
monolithic LTO builds; however, once summaries are emitted for all LTO
builds we can unify the Thin/monolithic LTO logic to only use summaries
to determine the liveness of address taking functions.

This change is a partial fix for PR37474. It reduces the build size for
nacl_helper by ~2-3%, the reduction is due to nacl_helper compiling in
lots of unused code and unused functions that are address taken in dead
functions no longer being being considered live due to emitted jumptable
references. The reduction for chromium is ~0.1-0.2%.

Reviewers: pcc, eugenis, javed.absar

Reviewed By: pcc

Subscribers: aheejin, dexonsmith, dschuff, mehdi_amini, eraman, steven_wu, llvm-commits, kcc

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

llvm-svn: 337038
2018-07-13 19:57:39 +00:00
..
Inputs [ThinLTO] Use std::map to get determistic imports files 2018-07-10 20:06:04 +00:00
alias_import.ll [FileCheck] Add -allow-deprecated-dag-overlap to failing llvm tests 2018-07-11 20:25:49 +00:00
alias_resolution.ll
autoupgrade.ll [ThinLTO] Add string saver onto index for value names 2018-06-26 02:29:08 +00:00
cache-config.ll
cache-icall.ll
cache-import-lists.ll
cache-typeid-resolutions.ll
cache.ll [ThinLTO] Update ThinLTO cache file atimes when on Windows 2018-07-04 14:17:10 +00:00
callees-metadata.ll [ThinLTO] Add funtions in callees metadata to CallGraphEdges 2018-03-13 04:26:58 +00:00
cfi-icall.ll [LowerTypeTests] Limit when icall jumptable entries are emitted 2018-07-13 19:57:39 +00:00
crash_debuginfo.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
deadstrip.ll [ThinLTO] Fix test 2018-06-27 19:00:35 +00:00
debuginfo-compositetype-import.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
debuginfo-cu-import.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
diagnostic-handler-remarks-with-hotness.ll Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
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 [LTO] Update tests for r320905 2017-12-16 02:40:20 +00:00
dicompositetype-unique2.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
distributed_import.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
distributed_indexes.ll [ThinLTO] Fix printing of aliases for distributed backend indexes 2018-07-03 01:11:43 +00:00
dot-dumper.ll [ThinLTO] Re-commit of dot dumper after test fix 2018-01-22 13:35:40 +00:00
drop-debug-info.ll
dsolocal_dllimport.ll [ThinLTO] Clear dllimport when setting dso_local. 2018-03-13 15:24:51 +00:00
emit_imports.ll [ThinLTO] Use std::map to get determistic imports files 2018-07-10 20:06:04 +00:00
empty-module.ll Remove trailing whitespace 2017-12-16 02:12:35 +00:00
empty_module_with_cache.ll
export.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
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 Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
funcimport2.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
globals-import-const-fold.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
internalize.ll [ThinLTO] - Stop internalizing and drop non-prevailing symbols. 2018-01-29 08:03:30 +00:00
lazyload_metadata.ll Irreducible loop metadata for more accurate block frequency under PGO. 2017-11-02 22:26:51 +00:00
linkonce_aliasee_ref_import.ll
linkonce_odr_unnamed_addr.ll [ThinLTO] Teach ThinLTO about auto hide symbols 2018-02-09 18:34:08 +00:00
linkonce_resolution_comdat.ll [ThinLTO] Teach ThinLTO about auto hide symbols 2018-02-09 18:34:08 +00:00
lit.local.cfg
llvm.used.ll
local_name_conflict.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
merge-triple.ll
module_asm2.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
module_asm_glob.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
module_summary_graph_traits.ll [ThinLTO] Add GraphTraits for FunctionSummaries 2018-02-19 15:14:50 +00:00
newpm-basic.ll
noinline.ll [ThinLTO] Don't import functions with noinline attribute 2017-12-25 13:57:24 +00:00
personality-local.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
personality.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
prefix_replace.ll
reference_non_importable.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
referenced_by_constant.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
save_objects.ll
section.ll
tli-nobuiltin.ll
weak_resolution.ll
weak_resolution_single.ll