OSDN Git Service

[ThinLTO] only emit used or referenced CFI records to index
authorBob Haarman <llvm@inglorion.net>
Tue, 9 Jul 2019 18:50:55 +0000 (18:50 +0000)
committerBob Haarman <llvm@inglorion.net>
Tue, 9 Jul 2019 18:50:55 +0000 (18:50 +0000)
commite025bc2d09e918e21198d89576a74e1e40679fea
tree39fce8b86dc165cf093443c72542e435f2cd423b
parent303e799e0124246e8c40256155d348e3dd5b6535
[ThinLTO] only emit used or referenced CFI records to index

Summary: We emit CFI_FUNCTION_DEFS and CFI_FUNCTION_DECLS to
distributed ThinLTO indices to implement indirect function call
checking.  This change causes us to only emit entries for functions
that are either defined or used by the module we're writing the index
for (instead of all functions in the combined index), which can make
the indices substantially smaller.

Fixes PR42378.

Reviewers: pcc, vitalybuka, eugenis

Subscribers: mehdi_amini, hiraditya, dexonsmith, arphaman, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365537 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp
test/ThinLTO/X86/Inputs/cfi-icall-only-bazqux.ll [new file with mode: 0644]
test/ThinLTO/X86/cfi-icall-only-defuse.ll [new file with mode: 0644]