diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-03 14:46:26 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-03 14:46:26 +0000 |
commit | 954825c9d3ebdd17cb20ed9c753ae559f88d4330 (patch) | |
tree | 9b93ef15724edc35794595b3bb53fc4cb6c6ae89 /gcc/lto | |
parent | f22216ac22a0f98a3563ba4e6c02e85c528097ce (diff) | |
download | gcc-954825c9d3ebdd17cb20ed9c753ae559f88d4330.tar.gz |
2011-11-03 Richard Guenther <rguenther@suse.de>
PR lto/44965
* lto-opts.c: Re-implement.
* lto-streamer.h (lto_register_user_option): Remove.
(lto_read_file_options): Likewise.
(lto_reissue_options): Likewise.
(lto_clear_user_options): Likewise.
(lto_clear_file_options): Likewise.
* opts-global.c (post_handling_callback): Remove.
(set_default_handlers): Do not set post_handling_callback.
(decode_options): Remove LTO specific code.
* lto-wrapper.c (merge_and_complain): New function.
(run_gcc): Read all input file options and
prepend a merged set before the linker driver options.
* gcc.c (driver_post_handling_callback): Remove.
(set_option_handlers): Do not set post_handling_callback.
* opts-common.c (handle_option): Do not call post_handling_callback.
* opts.h (struct cl_option_handlers): Remove post_handling_callback.
lto/
* lto-lang.c (lto_post_options): Do not read file options.
* lto.c (lto_read_all_file_options): Remove.
(lto_init): Call lto_set_in_hooks here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180827 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/lto/lto-lang.c | 2 | ||||
-rw-r--r-- | gcc/lto/lto.c | 55 |
3 files changed, 8 insertions, 56 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 5de85dd4f33..d8bbd9ca8dd 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2011-11-03 Richard Guenther <rguenther@suse.de> + + PR lto/44965 + * lto-lang.c (lto_post_options): Do not read file options. + * lto.c (lto_read_all_file_options): Remove. + (lto_init): Call lto_set_in_hooks here. + 2011-10-09 Jan Hubicka <jh@suse.cz> * lto.c (node_cmp, varpool_node_cmp): New functions. diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 4a5f6fe8ab5..c702b9a2d24 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -692,8 +692,6 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) support. */ flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; - lto_read_all_file_options (); - /* Initialize the compiler back end. */ return false; } diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index c50a97ec205..3b35604af8d 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -2494,60 +2494,6 @@ lto_fixup_decls (struct lto_file_decl_data **files) } } -/* Read the options saved from each file in the command line. Called - from lang_hooks.post_options which is called by process_options - right before all the options are used to initialize the compiler. - This assumes that decode_options has already run, so the - num_in_fnames and in_fnames are properly set. - - Note that this assumes that all the files had been compiled with - the same options, which is not a good assumption. In general, - options ought to be read from all the files in the set and merged. - However, it is still unclear what the merge rules should be. */ - -void -lto_read_all_file_options (void) -{ - size_t i; - - /* Clear any file options currently saved. */ - lto_clear_file_options (); - - /* Set the hooks to read ELF sections. */ - lto_set_in_hooks (NULL, get_section_data, free_section_data); - if (!quiet_flag) - fprintf (stderr, "Reading command line options:"); - - for (i = 0; i < num_in_fnames; i++) - { - struct lto_file_decl_data *file_data; - lto_file *file = lto_obj_file_open (in_fnames[i], false); - if (!file) - break; - if (!quiet_flag) - { - fprintf (stderr, " %s", in_fnames[i]); - fflush (stderr); - } - - file_data = XCNEW (struct lto_file_decl_data); - file_data->file_name = file->filename; - file_data->section_hash_table = lto_obj_build_section_table (file, NULL); - - lto_read_file_options (file_data); - - lto_obj_file_close (file); - htab_delete (file_data->section_hash_table); - free (file_data); - } - - if (!quiet_flag) - fprintf (stderr, "\n"); - - /* Apply globally the options read from all the files. */ - lto_reissue_options (); -} - static GTY((length ("lto_stats.num_input_files + 1"))) struct lto_file_decl_data **all_file_decl_data; /* Turn file datas for sub files into a single array, so that they look @@ -2921,6 +2867,7 @@ lto_init (void) lto_process_name (); lto_streamer_hooks_init (); lto_reader_init (); + lto_set_in_hooks (NULL, get_section_data, free_section_data); memset (<o_stats, 0, sizeof (lto_stats)); bitmap_obstack_initialize (NULL); gimple_register_cfg_hooks (); |