[PATCH] D53891: [LTO] Pass down LTOUnit codegen flag to bitcode writer

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 16 15:25:03 PST 2018


tejohnson added a comment.

In https://reviews.llvm.org/D53891#1300789, @tejohnson wrote:

> - Switch the default of splitting lto units to off by default, unless compiled with CFI or -fwhole-program-vtables.


Thinking ahead to when I add the index based WPD implementation, we are going to want to emit the type tests, etc for ThinLTO by default and keep splitting off. Would you prefer:

1. -flto=thin implies -fwhole-program-vtables, and have that latter option no longer implicitly enable splitting
2. -flto=thin directly enables the CodeGenOptions.WholeProgramVTables flag (which is only used by CGClass.cpp to insert the type tests/checked loads).
3. The code in CGClass.cpp that checks CodeGenOptions.WholeProgramVTables also checks CodeGenOptions.PrepareForThinLTO

(This assumes we want index-based WPD on by default for thinlto, which based on my measurements of minimal overhead should be fine and desirable.)


Repository:
  rC Clang

https://reviews.llvm.org/D53891





More information about the cfe-commits mailing list