llvm-project/llvm/lib/LTO
Teresa Johnson 290a839891 [LTO] Record whether LTOUnit splitting is enabled in index
Summary:
Records in the module summary index whether the bitcode was compiled
with the option necessary to enable splitting the LTO unit
(e.g. -fsanitize=cfi, -fwhole-program-vtables, or -fsplit-lto-unit).

The information is passed down to the ModuleSummaryIndex builder via a
new module flag "EnableSplitLTOUnit", which is propagated onto a flag
on the summary index.

This is then used during the LTO link to check whether all linked
summaries were built with the same value of this flag. If not, an error
is issued when we detect a situation requiring whole program visibility
of the class hierarchy. This is the case when both of the following
conditions are met:
1) We are performing LowerTypeTests or Whole Program Devirtualization.
2) There are type tests or type checked loads in the code.

Note I have also changed the ThinLTOBitcodeWriter to also gate the
module splitting on the value of this flag.

Reviewers: pcc

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

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

llvm-svn: 350948
2019-01-11 18:31:57 +00:00
..
CMakeLists.txt [ThinLTO] Compute synthetic function entry count 2018-12-13 19:54:27 +00:00
Caching.cpp [ThinLTO] Update ThinLTO cache file atimes when on Windows 2018-07-04 14:17:10 +00:00
LLVMBuild.txt NFC: Move ObjectMemoryBuffer to support 2018-04-15 05:17:14 +00:00
LTO.cpp [LTO] Record whether LTOUnit splitting is enabled in index 2019-01-11 18:31:57 +00:00
LTOBackend.cpp [LTO] Drop non-prevailing definitions only if linkage is not local or appending 2018-11-08 20:10:07 +00:00
LTOCodeGenerator.cpp [PassTiming] cleaning up legacy PassTimingInfo interface. NFCI. 2018-09-26 13:01:43 +00:00
LTOModule.cpp [Support] Make error banner optional in logAllUnhandledErrors 2018-11-11 01:46:03 +00:00
SummaryBasedOptimizations.cpp Refactor synthetic profile count computation. NFC. 2019-01-09 20:10:27 +00:00
ThinLTOCodeGenerator.cpp [ThinLTO] Compute synthetic function entry count 2018-12-13 19:54:27 +00:00
UpdateCompilerUsed.cpp [LTO] Account for overriding lib calls via the alias attribute 2018-10-10 22:54:31 +00:00