summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-28 19:11:50 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-28 19:11:50 +0000
commitecba073ffa9d08ce731cd306ccebac9ca57af69b (patch)
tree1d892ec6e17c326d149f09c6e7cf245a89024974 /gcc/lto-streamer-in.c
parent29737a6d470b7a36109b4f1554a34b872924e481 (diff)
downloadgcc-ecba073ffa9d08ce731cd306ccebac9ca57af69b.tar.gz
Uniquization of constants at the Tree level
* tree.h (DECL_IN_CONSTANT_POOL): New macro (tree_decl_with_vis): Add in_constant_pool bit, move shadowed_for_var_p bit to the end. (tree_output_constant_def): Declare. * gimplify.c (gimplify_init_constructor): When using block copy, uniquize the constant constructor on the RHS. * lto-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Deal with DECL_IN_CONSTANT_POOL flag. * lto-streamer-out.c (pack_ts_decl_with_vis_value_fields): Likewise. * varasm.c (make_decl_rtl): Deal with variables belonging to the global constant pool. (assemble_variable): Deal with symbols belonging to the tree constant pool. (get_constant_section): Add ALIGN parameter and simplify. (build_constant_desc): Build a VAR_DECL and attach it to the symbol. (assemble_constant_contents): Use the expression of the VAR_DECL. (output_constant_def_contents): Use the alignment of the VAR_DECL. (tree_output_constant_def): New global function. (mark_constant): Use the expression of the VAR_DECL. (place_block_symbol): Use the alignment of the VAR_DECL and the size of its expression. (output_object_block): Likewise and assemble the expression. ada/ * gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Uniquize constant constructors before taking their address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158838 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 3001f6522fc..d5860ea527f 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1720,6 +1720,7 @@ unpack_ts_decl_with_vis_value_fields (struct bitpack_d *bp, tree expr)
{
DECL_HARD_REGISTER (expr) = (unsigned) bp_unpack_value (bp, 1);
DECL_IN_TEXT_SECTION (expr) = (unsigned) bp_unpack_value (bp, 1);
+ DECL_IN_CONSTANT_POOL (expr) = (unsigned) bp_unpack_value (bp, 1);
DECL_TLS_MODEL (expr) = (enum tls_model) bp_unpack_value (bp, 3);
}