[llvm-commits] [llvm] r154124 - /llvm/trunk/tools/lto/LTOCodeGenerator.cpp

Bill Wendling wendling at apple.com
Mon Apr 9 15:29:20 PDT 2012


On Apr 6, 2012, at 10:22 AM, Chris Lattner <clattner at apple.com> wrote:

> That said, if clang is running internalize at "clang -O4" or "clang -flto" then we should talk about whether that really is the right default.  I'm not convinced it is.  GCC has a -fwhole-program flag (or something like that) which might be appropriate.  Otherwise, the standard linker visibility stuff should be used.
> 
Okay. Let's discuss this. What are the benefits of running internalize by default as opposed to running it via a command-line option?

If we go the `-fwhole-program' option, it's more in line with what people might expect from LTO (those coming from gcc-land especially). There could be other, subtle reasons why a programmer may not want to run the internalize pass. Keeping around functions to call when debugging code springs to mind. They may not want to mess with export lists for these functions (so no internalize), but would like them to go away when shipping the product (so running internalize).

There may be more reasons.

-bw





More information about the llvm-commits mailing list