On Wed, 25 Feb 2015, Jakub Jelinek wrote:

> On Wed, Feb 18, 2015 at 11:00:35AM +0100, Jakub Jelinek wrote:
> > On Tue, Feb 17, 2015 at 11:00:14AM +0100, Richard Biener wrote:
> > > I'm just looking for a way to make this less of a hack (and the LTO IL
> > > less target dependent).  Not for GCC 5 for which something like your
> > > patch is probably ok, but for the future.
> > 
> > So, given Ilya's and Thomas' testing, is this acceptable for now, and
> > perhaps we can try to do something better for GCC 6?
> > 
> > Here is the patch with full ChangeLog:
> 
> I'd like to ping following patch:
> http://gcc.gnu.org/ml/gcc-patches/2015-02/msg01080.html

Oops, totally forgot about this one.

Shouldn't

+           default:
+             error ("unsupported mode %s\n", mname);

be a fatal_error ()?  After all if we hit this but continue we'll
stream random crap.  I also think we should be a bit more user-centric
here and maybe report "for host / offload target combination".

+static GTY(()) const unsigned char *lto_mode_identity_table;

why in GC memory?

Ok with changes along these lines.

Thanks,
Richard.


> > 2015-02-18  Jakub Jelinek  <ja...@redhat.com>
> > 
> >     * passes.c (ipa_write_summaries_1): Call lto_output_init_mode_table.
> >     (ipa_write_optimization_summaries): Likewise.
> >     * tree-streamer.h: Include data-streamer.h.
> >     (streamer_mode_table): Declare extern variable.
> >     (bp_pack_machine_mode, bp_unpack_machine_mode): New inline functions.
> >     * lto-streamer-out.c (lto_output_init_mode_table,
> >     lto_write_mode_table): New functions.
> >     (produce_asm_for_decls): Call lto_write_mode_table when streaming
> >     offloading LTO.
> >     * lto-section-in.c (lto_section_name): Add "mode_table" entry.
> >     (lto_create_simple_input_block): Add mode_table argument to the
> >     lto_input_block constructors.
> >     * ipa-prop.c (ipa_prop_read_section, read_replacements_section):
> >     Likewise.
> >     * data-streamer-in.c (string_for_index): Likewise.
> >     * ipa-inline-analysis.c (inline_read_section): Likewise.
> >     * ipa-icf.c (sem_item_optimizer::read_section): Likewise.
> >     * lto-cgraph.c (input_cgraph_opt_section): Likewise.
> >     * lto-streamer-in.c (lto_read_body_or_constructor,
> >     lto_input_toplevel_asms): Likewise.
> >     (lto_input_mode_table): New function.
> >     * tree-streamer-out.c (pack_ts_fixed_cst_value_fields,
> >     pack_ts_decl_common_value_fields, pack_ts_type_common_value_fields):
> >     Use bp_pack_machine_mode.
> >     * real.h (struct real_format): Add name field.
> >     * lto-streamer.h (enum lto_section_type): Add LTO_section_mode_table.
> >     (class lto_input_block): Add mode_table member.
> >     (lto_input_block::lto_input_block): Add mode_table_ argument,
> >     initialize mode_table.
> >     (struct lto_file_decl_data): Add mode_table field.
> >     (lto_input_mode_table, lto_output_init_mode_table): New prototypes.
> >     * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields,
> >     unpack_ts_decl_common_value_fields,
> >     unpack_ts_type_common_value_fields): Call bp_unpack_machine_mode.
> >     * tree-streamer.c (streamer_mode_table): New variable.
> >     * real.c (ieee_single_format, mips_single_format,
> >     motorola_single_format, spu_single_format, ieee_double_format,
> >     mips_double_format, motorola_double_format,
> >     ieee_extended_motorola_format, ieee_extended_intel_96_format,
> >     ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
> >     ibm_extended_format, mips_extended_format, ieee_quad_format,
> >     mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
> >     decimal_single_format, decimal_double_format, decimal_quad_format,
> >     ieee_half_format, arm_half_format, real_internal_format): Add name
> >     field.
> >     * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise.
> > lto/
> >     * lto.c (lto_mode_identity_table): New variable.
> >     (lto_read_decls): Add mode_table argument to the lto_input_block
> >     constructor.
> >     (lto_file_finalize): Initialize mode_table.
> >     (lto_init): Initialize lto_mode_identity_table.
> 
>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)

Reply via email to