gimple.h (compare_field_offset): Declare.

2009-12-15  Richard Guenther  <rguenther@suse.de>

	* gimple.h (compare_field_offset): Declare.
	* gimple.c (compare_field_offset): Export.
	* lto-streamer-in.c (input_gimple_stmt): Use compare_field_offset.

From-SVN: r155250
This commit is contained in:
Richard Guenther 2009-12-15 11:32:49 +00:00 committed by Richard Biener
parent ede51b1f13
commit 1e4bc4ebc6
4 changed files with 9 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2009-12-15 Richard Guenther <rguenther@suse.de>
* gimple.h (compare_field_offset): Declare.
* gimple.c (compare_field_offset): Export.
* lto-streamer-in.c (input_gimple_stmt): Use compare_field_offset.
2009-12-15 Richard Guenther <rguenther@suse.de>
* lto-cgraph.c (lto_output_node): Also stream the alias

View file

@ -3171,7 +3171,7 @@ compare_type_names_p (tree t1, tree t2, bool for_completion_p)
/* Return true if the field decls F1 and F2 are at the same offset. */
static bool
bool
compare_field_offset (tree f1, tree f2)
{
if (DECL_OFFSET_ALIGN (f1) == DECL_OFFSET_ALIGN (f2))

View file

@ -921,6 +921,7 @@ extern bool is_gimple_call_addr (tree);
extern tree get_call_expr_in (tree t);
extern void recalculate_side_effects (tree);
extern bool compare_field_offset (tree, tree);
extern tree gimple_register_type (tree);
extern void print_gimple_types_stats (void);
extern void free_gimple_type_tables (void);

View file

@ -1082,12 +1082,7 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
{
if (tem == field
|| (TREE_TYPE (tem) == TREE_TYPE (field)
&& (DECL_FIELD_OFFSET (tem)
== DECL_FIELD_OFFSET (field))
&& (DECL_FIELD_BIT_OFFSET (tem)
== DECL_FIELD_BIT_OFFSET (field))
&& (DECL_OFFSET_ALIGN (tem)
== DECL_OFFSET_ALIGN (field))))
&& compare_field_offset (tem, field)))
break;
}
/* In case of type mismatches across units we can fail