From e43059ff7162ad6dfc79ccbba74de4428d03131f Mon Sep 17 00:00:00 2001 From: kyukhin Date: Wed, 20 Nov 2013 13:50:44 +0000 Subject: [PATCH] * cgraph.h (varpool_node): Add need_bounds_init field. * lto-cgraph.c (lto_output_varpool_node): Output need_bounds_init value. (input_varpool_node): Read need_bounds_init value. * varpool.c (dump_varpool_node): Dump need_bounds_init field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205116 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/cgraph.h | 4 ++++ gcc/lto-cgraph.c | 2 ++ gcc/varpool.c | 2 ++ 4 files changed, 16 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d824dd8..15476a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2013-11-20 Ilya Enkovich + + * cgraph.h (varpool_node): Add need_bounds_init field. + * lto-cgraph.c (lto_output_varpool_node): Output + need_bounds_init value. + (input_varpool_node): Read need_bounds_init value. + * varpool.c (dump_varpool_node): Dump need_bounds_init field. + 2013-11-20 Jan Hubicka * opts.c (finish_options): Imply -ffat-lto-objects with -fno-use-linker-plugin. diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 4acf2d0..15719fb 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -528,6 +528,10 @@ class GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node { public: /* Set when variable is scheduled to be assembled. */ unsigned output : 1; + + /* Set when variable has statically initialized pointer + or is a static bounds variable and needs initalization. */ + unsigned need_bounds_init : 1; }; /* Every top level asm statement is put into a asm_node. */ diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index d827599..0f1a1c5 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -580,6 +580,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node && boundary_p && !DECL_EXTERNAL (node->decl), 1); /* in_other_partition. */ } + bp_pack_value (&bp, node->need_bounds_init, 1); streamer_write_bitpack (&bp); if (node->same_comdat_group && !boundary_p) { @@ -1150,6 +1151,7 @@ input_varpool_node (struct lto_file_decl_data *file_data, node->analyzed = bp_unpack_value (&bp, 1); node->used_from_other_partition = bp_unpack_value (&bp, 1); node->in_other_partition = bp_unpack_value (&bp, 1); + node->need_bounds_init = bp_unpack_value (&bp, 1); if (node->in_other_partition) { DECL_EXTERNAL (node->decl) = 1; diff --git a/gcc/varpool.c b/gcc/varpool.c index 06b93a3..f79cf49 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -205,6 +205,8 @@ dump_varpool_node (FILE *f, struct varpool_node *node) fprintf (f, " initialized"); if (node->output) fprintf (f, " output"); + if (node->need_bounds_init) + fprintf (f, " need-bounds-init"); if (TREE_READONLY (node->decl)) fprintf (f, " read-only"); if (ctor_for_folding (node->decl) != error_mark_node) -- 2.7.4