summaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
Commit message (Collapse)AuthorAgeFilesLines
* Makefile.in (READ_MD_H): New variable.Richard Sandiford2010-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * Makefile.in (READ_MD_H): New variable. (BUILD_RTL): Add build/read-md.o. (lto-wrapper.o): Depend on coretypes.h instead of defaults.h. (build/gensupport.o, build/read-rtl.o, build/genattr.o) (build/genattrtab.o, build/genconditions.o build/genemit.o) (build/genextract.o, build/genflags.o, build/genoutput.o) (build/genpreds.o, build/genrecog.o): Depend on $(READ_MD_H). (build/read-md.o): New rule. * defaults.h (obstack_chunk_alloc, obstack_chunk_free) (OBSTACK_CHUNK_SIZE, gcc_obstack_init): Move to... * coretypes.h: ...here. * lto-wrapper.c: Include coretypes.h instead of defaults.h. * pretty-print.c (obstack_chunk_alloc, obstack_chunk_free): Delete. * genattr.c: Include read-md.h. * genattrtab.c: Likewise. * genconditions.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * genoutput.c: Likewise. * genpreds.c: Likewise. * genrecog.c: Likewise. * rtl.h (read_skip_spaces, copy_rtx_ptr_loc, print_rtx_ptr_loc) (join_c_conditions, print_c_condition, read_rtx_filename) (read_rtx_lineno): Move to read-md.h. * read-rtl.c: Include read-md.h. (ptr_loc, string_obstack, ptr_locs, ptr_loc_obstack) (joined_conditions, joined_conditions_obstack, read_rtx_lineno) (read_rtx_filename, fatal_with_file_and_line, fatal_expected_char) (leading_ptr_hash, leading_ptr_eq_p, set_rtx_ptr_loc, get_rtx_ptr_loc) (copy_rtx_ptr_loc, print_rtx_ptr_loc, join_c_conditions) (print_c_condition, read_skip_spaces, read_escape, read_quoted_string) (read_braced_string, read_string): Move to read-md.c. (read_rtx): Move some initialization to init_md_reader and call init_md_reader here. * gensupport.h (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.h. * gensupport.c: Include read-md.h. (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.c. * read-md.h, read-md.c: New files. From-SVN: r160570
* lto-wrapper.c (lto_wrapper_exit): Rename to ...Richard Guenther2010-06-021-28/+64
| | | | | | | | | | | | | | 2010-06-02 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (lto_wrapper_exit): Rename to ... (lto_wrapper_cleanup): ... this. Do not exit. (fatal): Adjust. Exit here. (fatal_perror): Likewise. (fatal_signal): New function. (main): Set up signal handlers to cleanup temporary files. * Makefile.in (lto-wrapper.o): Adjust dependencies. From-SVN: r160153
* lto-wrapper.c (run_gcc): With -save-temps generate a user-visible ltrans ↵Richard Guenther2010-05-281-3/+11
| | | | | | | | | | | | | | | | | | | | filename. 2010-05-28 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (run_gcc): With -save-temps generate a user-visible ltrans filename. Fixup ltrans unit numbering. lto/ * lto.c (prefix_name_with_star): Removed. (strip_extension): Likewise. (get_filename_for_set): Likewise. (lto_write_ltrans_list): Fold into ... (lto_wpa_write_files): ... this. Name LTRANS units by suffixing the ltrans output list filename. (do_whole_program_analysis): Adjust. From-SVN: r159967
* lto-wrapper.c (maybe_unlink_file): Ignore unlink failure for non-existant files.Richard Guenther2010-05-271-1/+4
| | | | | | | | | | 2010-05-27 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (maybe_unlink_file): Ignore unlink failure for non-existant files. (fork_execute): Mark args_name file as deleted. From-SVN: r159913
* lto-wrapper.c (nr, [...]): Globalize.Richard Guenther2010-05-251-53/+75
| | | | | | | | | | 2010-05-25 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (nr, input_names, output_names, makefile): Globalize. (lto_wrapper_exit): Unlink all LTRANS temporary files on error. (run_gcc): Re-organize to make cleanup easier. From-SVN: r159823
* Honor $MAKE for -fwhopr=; do not honor $MAKEFLAGS, $MFLAGS.Ralf Wildenhues2010-05-231-1/+6
| | | | | | | | | gcc/: * lto-wrapper.c (run_gcc): Unset MAKEFLAGS and MFLAGS before calling make; allow override through $MAKE. * doc/invoke.texi (Optimize Options): Document override. From-SVN: r159760
* invoke.texi (-fwhopr): Document new optional jobs argument.Richard Guenther2010-05-191-13/+70
| | | | | | | | | | | | | | 2010-05-19 Richard Guenther <rguenther@suse.de> * doc/invoke.texi (-fwhopr): Document new optional jobs argument. * common.opt (fwhopr=): New. * opts.c (common_handle_option): Handle OPT_fwhopr. * gcc.c (LINK_COMMAND_SPEC): Pass fwhopr*. * collect2.c (main): Match -fwhopr*. * lto-wrapper.c (run_gcc): Handle jobs argument of -fwhopr. Execute ltrans stage in parallel when jobs is bigger than 1. From-SVN: r159573
* re PR lto/44143 (-fdump-tree-all for lto does not work as expected)Richard Guenther2010-05-181-225/+143
| | | | | | | | | | | | | | | | | | 2010-05-18 Richard Guenther <rguenther@suse.de> PR lto/44143 * lto-wrapper.c (verbose): New variable. Initialize from -v. (debug): Initialize from -save-temps. (collect_execute): Print command-line when verbose. (run_gcc): Always use COLLECT_GCC_OPTIONS. Use fork_execute for ltrans invocation. Produce -dumpbase flag again. (process_args): Remove. (main): Simplify. * collect2.c (maybe_run_lto_and_relink): Only pass object files to lto-wrapper. * gcc.c (LINK_COMMAND_SPEC): Likewise. From-SVN: r159536
* lto-wrapper.c (run_gcc): Remove linker output from command line for LTRANS ↵Richard Guenther2010-05-071-0/+13
| | | | | | | | | | | invocation. 2010-05-08 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (run_gcc): Remove linker output from command line for LTRANS invocation. From-SVN: r159174
* lto-wrapper.c (DUMPBASE_SUFFIX): Define.Richard Biener2010-05-071-3/+155
| | | | | | | | | | | | | | | | | | | | 2010-05-07 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (DUMPBASE_SUFFIX): Define. (run_gcc): Handle LTRANS phase invocation. * collect2.c (maybe_run_lto_and_relink): Do not set WPA_SAVE_LTRANS. lto/ * lto.c (DUMPBASE_SUFFIX): Remove. (lto_execute_ltrans): Move functionality to lto-wrapper.c. Rename to ... (lto_write_ltrans_list): ... only output the list of ltrans files. (lto_maybe_unlink): Remove. (do_whole_program_analysis): Do not execute LTRANS phase from here. From-SVN: r159157
* Pass -dumpbase and -dumpdir to gcc for LTOH.J. Lu2010-01-031-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ 2010-01-03 H.J. Lu <hongjiu.lu@intel.com> PR lto/41564 * common.opt: Add dumpdir. * gcc.c (cc1_options): Add "-dumpbase %B" only if -dumpbase isn't specified. (option_map): Add --dumpdir. * gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add dumpdir. * lto-wrapper.c (run_gcc): Add -dumpbase and -dumpdir for -o. * opts.c (decode_options): Try dump_dir_name first if dump_base_name isn't an absolute path. (common_handle_option): Handle OPT_dumpdir. * toplev.c (dump_dir_name): New. (print_switch_values): Also ignore -dumpdir. * toplev.h (dump_dir_name): New. gcc/lto/ 2010-01-03 H.J. Lu <hongjiu.lu@intel.com> PR lto/41564 * lto.c (DUMPBASE_SUFFIX): New. (lto_execute_ltrans): Append a sequence number to -dumpbase for LTRANS. From-SVN: r155591
* lto-wrapper.c (lto_wrapper_exit): Don't try to delete files if being called ↵Rafael Avila de Espindola2009-11-241-6/+14
| | | | | | | | | | | recursively. 2009-11-24 Rafael Avila de Espindola <espindola@google.com> * lto-wrapper.c (lto_wrapper_exit): Don't try to delete files if being called recursively. From-SVN: r154500
* re PR driver/41637 (testsuite (-flto/-fwhopr) leaves does not clean up in /tmp)Richard Guenther2009-10-091-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | 2009-10-09 Richard Guenther <rguenther@suse.de> PR driver/41637 * lto-wrapper.c (ltrans_output_file, flto_out, args_name): New globals. (lto_wrapper_exit): New function. (fatal): Use it. (fatal_perror): Likewise. (fork_execute): Use global args_name, do not free it. (run_gcc): Use global ltrans_output_file, flto_out, do not free them. * lto-streamer.h: Remove duplicate prototypes. PR lto/41635 PR lto/41636 lto/ * lto.c (read_cgraph_and_symbols): Do not assert we can open a file. * lto-elf.c (init_shdr##BITS): Fix i18n problems. (init_ehdr##BITS): Likewise. From-SVN: r152588
* Merge lto branch into trunk.Diego Novillo2009-10-031-0/+378
From-SVN: r152434