aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto.h
AgeCommit message (Collapse)AuthorFilesLines
2014-02-05lto.h (lto_global_var_decls): Remove.Richard Biener1-3/+0
2014-02-05 Richard Biener <rguenther@suse.de> lto/ * lto.h (lto_global_var_decls): Remove. * lto-lang.c (lto_init): Do not allocate lto_global_var_decls. (lto_write_globals): Do nothing in WPA stage, gather globals from the varpool here ... * lto.c (lto_main): ... not here. (materialize_cgraph): Do not call rest_of_decl_compilation on the empty lto_global_var_decls vector. (lto_global_var_decls): Remove. From-SVN: r207510
2014-01-02Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r206289
2013-09-06lto-streamer.h (lto_global_var_decls): Remove.Richard Biener1-0/+4
2013-09-06 Richard Biener <rguenther@suse.de> * lto-streamer.h (lto_global_var_decls): Remove. * Makefile.in (OBJS): Remove lto-symtab.o. (lto-symtab.o): Remove. (GTFILES): Remove lto-symtab.c * lto-symtab.c: Move to lto/ lto/ * lto-symtab.c: Move from gcc/ * lto.h: Include vec.h. (lto_global_var_decls): Declare. * lto.c (lto_global_var_decls): Move definition here. * Make-lang.in (LTO_OBJS): Add lto-symtab.o. (lto-symtab.o): Add. * config-lang.in (gtfiles): Add lto.h. From-SVN: r202313
2013-01-10Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r195098
2013-01-04Update Copyright years for files modified in 2011 and/or 2012.Jakub Jelinek1-1/+1
From-SVN: r194903
2011-12-13lto-streamer-out.c (write_symbol): Use proper 64-bit host type.Eric Botcazou1-2/+0
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type. * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets. * lto-streamer-in.c (lto_read_body): Likewise. (lto_input_toplevel_asms): Likewise. * lto-section-in.c (lto_create_simple_input_block): Likewise. * ipa-inline-analysis.c (inline_read_section): Likewise. * ipa-prop.c (ipa_prop_read_section): Likewise. * df.h (DF_NOTE): Fix typo in comment. lto/ * lto.h (lto_parse_hex): Delete. * lto.c (lto_read_decls): Use 'int' for offsets. (lto_parse_hex): Make static and return proper 64-bit host type. (lto_resolution_read): Use proper 64-bit host type. From-SVN: r182310
2011-10-04Maintain order of LTO sectionsAndi Kleen1-1/+9
Currently when reading in LTO sections from ld -r files they can get randomly reordered based on hash tables and random IDs. This causes reordering later when the final code is generated and also makes crashes harder to reproduce. This patch maintains explicit lists based on the input order and uses those lists to preserve that order when starting the rest of the LTO passes. This is the first step to working -fno-toplevel-reorder for LTO. But this needs more changes because the LTO partitioner can still reorder. This add two lists: one for the section and another one for the file_decl_datas. This is needed because the sections are walked twice through different data structures. In addition some code becomes slightly cleaner because we don't need to pass state through abstract callbacks anymore, but can just use direct type safe calls. gcc/lto/: 2011-10-02 Andi Kleen <ak@linux.intel.com> * lto-object.c (lto_obj_add_section_data): Add list. (lto_obj_add_section): Fill in list. (ltoobj_build_section_table): Pass through list. * lto.c (file_data_list): Declare. (create_subid_section_table): Pass arguments directly. Fill in list of file_datas. (lwstate): Delete. (lto_create_files_from_ids): Pass in direct arguments. Don't maintain list. (lto_file_read): Use explicit section and file data lists. (lto_read_all_file_options): Pass in section_list. * lto.h (lto_obj_build_section_table): Add list. (lto_section_slot): Add next. (lto_section_list): Declare. From-SVN: r179505
2010-11-17invoke.texi (-dy): Remove.Joseph Myers1-1/+1
* doc/invoke.texi (-dy): Remove. * langhooks-def.h (lhd_do_nothing_i): Don't declare. (LANG_HOOKS_PARSE_FILE): Define to lhd_do_nothing. * langhooks.c (lhd_do_nothing_i): Remove. * langhooks.h (lang_hooks.parse_file): Take no arguments. * toplev.c (set_yydebug): Remove. (compile_file): Update call to lang_hooks.parse_file. (decode_d_option): Don't handle -dy. ada: * gcc-interface/misc.c (gnat_parse_file): Take no arguments. c-family: * c-opts.c (c_common_parse_file): Take no arguments. * c-common.h (c_common_parse_file): Update prototype. fortran: * f95-lang.c (gfc_be_parse_file): Take no arguments. java: * jcf-parse.c (java_parse_file): Take no arguments. * java-tree.h (java_parse_file): Update prototype. lto: * lto.c (lto_main): Take no arguments. * lto.h (lto_main): Update prototype. From-SVN: r166868
2010-07-23lto-coff.c (hash_name, eq_name): Move.Andi Kleen1-0/+1
2010-07-10 Andi Kleen <ak@linux.intel.com> * lto-coff.c (hash_name, eq_name): Move. (lto_obj_build_section_table): Call lto_obj_create_section_hash_table. * lto-elf.c: (hash_name, eq_name): Move. (lto_obj_build_section_table): Call lto_obj_create_section_hash_table. * lto-macho.c: (hash_name, eq_name): Move. (lto_obj_build_section_table): Call lto_obj_create_section_hash_table. * lto.c: (hash_name, eq_name): Move from lto-*.c (lto_obj_create_section_hash_table): Add. (free_with_string): Add. From-SVN: r162441
2010-05-27re PR lto/44230 (Do not create need for multiple EH personalities)Eric Botcazou1-0/+1
PR lto/44230 * dwarf2out.c (dwarf2out_begin_prologue): Fix nits in sorry message. lto/ * lto.h (lto_eh_personality): New prototype. * lto.c: Include debug.h. (first_personality_decl): New static variable. (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the first function for which it is non-null. (lto_eh_personality_decl): New static variable. (lto_eh_personality): New function. * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function. * Make-lang.in (lto/lto.o): Add dependency on debug.h. From-SVN: r159921
2010-05-07configure.ac (--enable-lto): Add x86_64-apple-darwin* as a platform that ↵Steven Bosscher1-1/+2
supports LTO. ChangeLog: * configure.ac (--enable-lto): Add x86_64-apple-darwin* as a platform that supports LTO. * configure: Regenerate. gcc/ChangeLog: * config.gcc (i[34567]86-*-darwin*, x86_64-*-darwin*): Add lto-macho as lto_binary_reader. * target.h (struct gcc_target): New hooks lto_start and lto_end. * target-def.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END): Define. * cgraphunit.c (ipa_passes): Wrap LTO assembler output generation in lto_start and lto_end calls. (is_elf_or_coff): Rename to maybe_lto_object_file. Add Mach-O magic numbers. (scan_prog_file): Update is_elf_or_coff call. * doc/tm.text (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END): Document. * collect2.c (main): Fix enum comparison. * config/darwin-protos.h (darwin_asm_lto_start, darwin_asm_lto_end): Add prototypes. * darwin9.h (LINK_COMMAND_SPEC): Pass -flto and -fwhopr to the linker. * darwin.h (LINK_COMMAND_SPEC): Likewise. Define TARGET_ASM_LTO_START and TARGET_ASM_LTO_END. * darwin.c: Include obstack.h and lto-streamer.h. (lto_section_names_offset, lto_section_names_obstack, lto_asm_out_file, lto_asm_out_name, saved_asm_out_file): New static global variables. (LTO_SEGMENT_NAME, LTO_NAMES_SECTION): New defines. (darwin_asm_lto_start): New function. Redirect output to asm_out_file to a temporary file. (darwin_asm_lto_end): New function. Restore asm_out_file. (darwin_asm_named_section): For LTO sections, replace the name with the offset of the section name in a string table, and build this table. (darwin_file_start): Initialize global vars for LTO support. (darwin_file_end): If output to asm_out_file was redirected, append it to the proper asm_out_file here. Add the section names section. lto/ChangeLog: * lto.h (struct lto_file_struct): Document offset member. * lto-endian.h: New file. * lto-macho.h: New file. * lto-macho.c: New file. * Make-lang.in: Add rule for lto-macho.o. From-SVN: r159173
2010-04-26lto.h (lto_elf_file_open): Rename prototype from this ...Dave Korn1-7/+7
* lto.h (lto_elf_file_open): Rename prototype from this ... (lto_obj_file_open): ... to this. (lto_elf_file_close): Likewise ... (lto_obj_file_close): ... and likewise. (lto_elf_build_section_table): Likewise ... (lto_obj_build_section_table): ... and likewise. (lto_elf_begin_section): Likewise ... (lto_obj_begin_section): ... and likewise. (lto_elf_append_data): Likewise ... (lto_obj_append_data): ... and likewise. (lto_elf_end_section): Likewise ... (lto_obj_end_section): ... and likewise. * lto.c (lto_file_read): Update references to the above. (lto_wpa_write_files): Likewise. (lto_read_all_file_options): Likewise. (read_cgraph_and_symbols): Likewise. * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise. (LANG_HOOKS_APPEND_DATA): Likewise. (LANG_HOOKS_END_SECTION): Likewise. * lto-elf.c (lto_elf_file_open): Rename from this ... (lto_obj_file_open): ... to this, updating any references. (lto_elf_file_close): Likewise ... (lto_obj_file_close): ... and likewise. (lto_elf_build_section_table): Likewise ... (lto_obj_build_section_table): ... and likewise. (lto_elf_begin_section): Likewise ... (lto_obj_begin_section): ... and likewise. (lto_elf_append_data): Likewise ... (lto_obj_append_data): ... and likewise. (lto_elf_end_section): Likewise ... (lto_obj_end_section): ... and likewise. From-SVN: r158718
2009-11-19re PR bootstrap/42096 (lto.c:289:7: error: implicit declaration of function ↵Rafael Avila de Espindola1-0/+1
'strtoll') 2009-11-19 Rafael Avila de Espindola <espindola@google.com> PR bootstrap/42096 * lto-plugin.c (claim_file_handler): Print offsets in hex. 2009-11-19 Rafael Avila de Espindola <espindola@google.com> PR bootstrap/42096 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex. * lto.c (lto_parse_hex): New. (lto_resolution_read): Use lto_parse_hex. * lto.h (lto_parse_hex): New. From-SVN: r154330
2009-11-17lto-elf.c (lto_file_init): Add offset argument.Rafael Avila de Espindola1-0/+1
2009-11-17 Rafael Avila de Espindola <espindola@google.com> * lto-elf.c (lto_file_init): Add offset argument. (lto_elf_file_open): Record the offset. * lto.c (lto_resolution_read): Change file_name into a lto_file argument. Check offsets. (lto_file_read): Update call to lto_resolution_read. * lto.h (lto_file_struct): Add the offset field. From-SVN: r154251
2009-10-03Merge lto branch into trunk.Diego Novillo1-0/+60
From-SVN: r152434