This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [whopr] Design/implementation alternatives for the driver and WPA



On Jun 5, 2008, at 10:43 AM, Ian Lance Taylor wrote:
Chris Lattner <clattner@apple.com> writes:

LLVM LTO handles this by marking symbols "internal" (aka static, aka
not TREE_PUBLIC, whatever) when the symbol is not visible outside the
LTO scope.  This allows the optimizers to go crazy and hack away at
the symbols, but only when safe.

How does the linker do this? Are you saying that when generating a shared library, the linker calls lto_codegen_add_must_preserve_symbol for every externally visible symbol?
Yes.

How does the linker tell LTO that a symbol may be inlined, but must
also be externally visible?
The linker just tells LTO which symbols must remain. The LTO engine
is free to inline anything that would improve codegen, with the exception
that any weak definition that must remain (preserved) cannot be inlined.


-Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]