This is the mail archive of the gcc-patches@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]

[patch] Enable the use of a resolution file


This is a first step in getting the example in
http://llvm.org/docs/LinkTimeOptimization.html working in gcc. With
this patch the plugin writes a resolution file and passes it to gcc.
If given this file, gcc reads the resolution from it instead of trying
to compute it itself.

With this patch lto1 knows that foo2 from the example is
LDPR_PREVAILING_DEF_IRONLY. What is missing is for lto1 to take
advantage of that and drop it from the final binary.

One extra change in this patch is the inclusion of the symbol name in
the resolution file. It is not used by lto1, but make debugging a lot
easier.

lto/
2009-11-10  Rafael Avila de Espindola  <espindola@google.com>

	* lang.opt (fresolution): Renamed from resolution.
	* lto-lang.c (lto_handle_option): Handle new option name.
	* lto.c (lto_resolution_read): Add more checks. Discard rest of line.

lto-plugin/
2009-11-10  Rafael Avila de Espindola  <espindola@google.com>

	* lto-plugin.c (write_resolution): Assume resolution_file is set.
	Print the symbol name.
	(all_symbols_read_handler): Create a resolution file.
	Pass it to gcc.
	(cleanup_handler): Remove the resolution file.
	(process_option): Drop the -resolution option.

Cheers,
-- 
Rafael Ãvila de EspÃndola


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