!66 Bugfix for Special Situation

From: @eastb233
Reviewed-by: @haijianzhang,@jdkboy
Signed-off-by: @haijianzhang,@haijianzhang,@jdkboy
This commit is contained in:
openeuler-ci-bot 2021-04-21 21:40:32 +08:00 committed by Gitee
commit 4d36586e0c
2 changed files with 104 additions and 56 deletions

View File

@ -1,6 +1,6 @@
diff -Nurp a/gcc/ipa-struct-reorg/escapes.def b/gcc/ipa-struct-reorg/escapes.def diff -Nurp a/gcc/ipa-struct-reorg/escapes.def b/gcc/ipa-struct-reorg/escapes.def
--- a/gcc/ipa-struct-reorg/escapes.def 2020-09-17 02:26:36.900000000 -0400 --- a/gcc/ipa-struct-reorg/escapes.def 2021-04-21 17:21:27.402498000 +0800
+++ b/gcc/ipa-struct-reorg/escapes.def 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/ipa-struct-reorg/escapes.def 2021-04-21 17:20:40.335373500 +0800
@@ -56,5 +56,7 @@ DEF_ESCAPE (escape_non_optimize, "Type u @@ -56,5 +56,7 @@ DEF_ESCAPE (escape_non_optimize, "Type u
DEF_ESCAPE (escape_array, "Type is used in an array [not handled yet]") DEF_ESCAPE (escape_array, "Type is used in an array [not handled yet]")
DEF_ESCAPE (escape_ptr_ptr, "Type is used in a pointer to a pointer [not handled yet]") DEF_ESCAPE (escape_ptr_ptr, "Type is used in a pointer to a pointer [not handled yet]")
@ -10,8 +10,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/escapes.def b/gcc/ipa-struct-reorg/escapes.def
#undef DEF_ESCAPE #undef DEF_ESCAPE
diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c
--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-09-17 02:58:59.540000000 -0400 --- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2021-04-21 17:21:27.402498000 +0800
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-09-17 04:55:03.992000000 -0400 +++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2021-04-21 17:42:44.141566700 +0800
@@ -95,6 +95,7 @@ along with GCC; see the file COPYING3. @@ -95,6 +95,7 @@ along with GCC; see the file COPYING3.
#include "ipa-struct-reorg.h" #include "ipa-struct-reorg.h"
#include "tree-eh.h" #include "tree-eh.h"
@ -67,7 +67,37 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
fprintf (f, "}\n"); fprintf (f, "}\n");
} }
@@ -804,12 +808,6 @@ srfield::dump (FILE *f) @@ -484,7 +488,7 @@ srtype::analyze (void)
into 2 different structures. In future we intend to add profile
info and/or static heuristics to differentiate splitting process. */
if (fields.length () == 2)
- fields[1]->clusternum = 1;
+ fields[1]->clusternum = 0;
/* Otherwise we do nothing. */
if (fields.length () >= 3)
@@ -619,7 +623,8 @@ srtype::create_new_type (void)
if (tname)
{
name = concat (tname, ".reorg.", id, NULL);
- TYPE_NAME (newtype[i]) = get_identifier (name);
+ TYPE_NAME (newtype[i]) = build_decl (UNKNOWN_LOCATION, TYPE_DECL,
+ get_identifier (name), newtype[i]);
free (name);
}
}
@@ -640,6 +645,10 @@ srtype::create_new_type (void)
{
TYPE_FIELDS (newtype[i]) = newfields[i];
layout_type (newtype[i]);
+ if (TYPE_NAME (newtype[i]) != NULL)
+ {
+ layout_decl (TYPE_NAME (newtype[i]), 0);
+ }
}
warn_padded = save_warn_padded;
@@ -804,12 +813,6 @@ srfield::dump (FILE *f)
fprintf (f, ", offset = " HOST_WIDE_INT_PRINT_DEC, offset); fprintf (f, ", offset = " HOST_WIDE_INT_PRINT_DEC, offset);
fprintf (f, ", type = "); fprintf (f, ", type = ");
print_generic_expr (f, fieldtype); print_generic_expr (f, fieldtype);
@ -80,7 +110,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
fprintf (f, "\n}\n"); fprintf (f, "\n}\n");
} }
@@ -819,7 +817,10 @@ srfield::dump (FILE *f) @@ -819,7 +822,10 @@ srfield::dump (FILE *f)
void void
srfield::simple_dump (FILE *f) srfield::simple_dump (FILE *f)
{ {
@ -92,7 +122,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
} }
/* Dump out the access structure to FILE. */ /* Dump out the access structure to FILE. */
@@ -863,21 +864,120 @@ srdecl::dump (FILE *file) @@ -863,21 +869,120 @@ srdecl::dump (FILE *file)
} // namespace struct_reorg } // namespace struct_reorg
@ -217,7 +247,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
// fields // fields
auto_vec_del<srtype> types; auto_vec_del<srtype> types;
auto_vec_del<srfunction> functions; auto_vec_del<srfunction> functions;
@@ -885,8 +985,8 @@ private: @@ -885,8 +990,8 @@ private:
srfunction *current_function; srfunction *current_function;
bool done_recording; bool done_recording;
@ -227,7 +257,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
void dump_types (FILE *f); void dump_types (FILE *f);
void dump_types_escaped (FILE *f); void dump_types_escaped (FILE *f);
void dump_functions (FILE *f); void dump_functions (FILE *f);
@@ -916,6 +1016,7 @@ private: @@ -916,6 +1021,7 @@ private:
void maybe_record_allocation_site (cgraph_node *, gimple *); void maybe_record_allocation_site (cgraph_node *, gimple *);
void record_stmt_expr (tree expr, cgraph_node *node, gimple *stmt); void record_stmt_expr (tree expr, cgraph_node *node, gimple *stmt);
void mark_expr_escape(tree, escape_type, gimple *stmt); void mark_expr_escape(tree, escape_type, gimple *stmt);
@ -235,7 +265,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
tree allocate_size (srtype *t, gimple *stmt); tree allocate_size (srtype *t, gimple *stmt);
void mark_decls_in_as_not_needed (tree fn); void mark_decls_in_as_not_needed (tree fn);
@@ -931,6 +1032,7 @@ private: @@ -931,6 +1037,7 @@ private:
bool get_type_field (tree expr, tree &base, bool &indirect, srtype *&type, srfield *&field, bool &realpart, bool &imagpart, bool &address, bool should_create = false, bool can_escape = false); bool get_type_field (tree expr, tree &base, bool &indirect, srtype *&type, srfield *&field, bool &realpart, bool &imagpart, bool &address, bool should_create = false, bool can_escape = false);
bool wholeaccess (tree expr, tree base, tree accesstype, srtype *t); bool wholeaccess (tree expr, tree base, tree accesstype, srtype *t);
@ -243,13 +273,13 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
void check_definition (srdecl *decl, vec<srdecl*>&); void check_definition (srdecl *decl, vec<srdecl*>&);
void check_uses (srdecl *decl, vec<srdecl*>&); void check_uses (srdecl *decl, vec<srdecl*>&);
void check_use (srdecl *decl, gimple *stmt, vec<srdecl*>&); void check_use (srdecl *decl, gimple *stmt, vec<srdecl*>&);
@@ -943,8 +1045,644 @@ private: @@ -943,8 +1050,644 @@ private:
bool has_rewritten_type (srfunction*); bool has_rewritten_type (srfunction*);
void maybe_mark_or_record_other_side (tree side, tree other, gimple *stmt); void maybe_mark_or_record_other_side (tree side, tree other, gimple *stmt);
+ unsigned execute_struct_relayout (void); + unsigned execute_struct_relayout (void);
}; +};
+
+struct ipa_struct_relayout +struct ipa_struct_relayout
+{ +{
+public: +public:
@ -290,8 +320,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
+ bool maybe_rewrite_cst (tree cst, gimple_stmt_iterator *gsi, + bool maybe_rewrite_cst (tree cst, gimple_stmt_iterator *gsi,
+ HOST_WIDE_INT &times); + HOST_WIDE_INT &times);
+ unsigned int execute (void); + unsigned int execute (void);
+}; };
+
+} // anon namespace +} // anon namespace
+ +
+namespace { +namespace {
@ -888,7 +918,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
/* Dump all of the recorded types to file F. */ /* Dump all of the recorded types to file F. */
void void
@@ -1140,8 +1878,10 @@ ipa_struct_reorg::record_type (tree type @@ -1140,8 +1883,10 @@ ipa_struct_reorg::record_type (tree type
f->type = t1; f->type = t1;
t1->add_field_site (f); t1->add_field_site (f);
} }
@ -901,7 +931,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
} }
} }
} }
@@ -1278,6 +2018,14 @@ ipa_struct_reorg::record_var (tree decl, @@ -1278,6 +2023,14 @@ ipa_struct_reorg::record_var (tree decl,
else else
e = escape_type_volatile_array_or_ptrptr (TREE_TYPE (decl)); e = escape_type_volatile_array_or_ptrptr (TREE_TYPE (decl));
@ -916,7 +946,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
if (e != does_not_escape) if (e != does_not_escape)
type->mark_escape (e, NULL); type->mark_escape (e, NULL);
} }
@@ -1353,7 +2101,8 @@ ipa_struct_reorg::find_vars (gimple *stm @@ -1353,7 +2106,8 @@ ipa_struct_reorg::find_vars (gimple *stm
{ {
case GIMPLE_ASSIGN: case GIMPLE_ASSIGN:
if (gimple_assign_rhs_class (stmt) == GIMPLE_SINGLE_RHS if (gimple_assign_rhs_class (stmt) == GIMPLE_SINGLE_RHS
@ -926,7 +956,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
{ {
tree lhs = gimple_assign_lhs (stmt); tree lhs = gimple_assign_lhs (stmt);
tree rhs = gimple_assign_rhs1 (stmt); tree rhs = gimple_assign_rhs1 (stmt);
@@ -1378,6 +2127,32 @@ ipa_struct_reorg::find_vars (gimple *stm @@ -1378,6 +2132,32 @@ ipa_struct_reorg::find_vars (gimple *stm
current_function->record_decl (t, rhs, -1); current_function->record_decl (t, rhs, -1);
} }
} }
@ -959,7 +989,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
break; break;
case GIMPLE_CALL: case GIMPLE_CALL:
@@ -1459,9 +2234,23 @@ is_result_of_mult (tree arg, tree *num, @@ -1459,9 +2239,23 @@ is_result_of_mult (tree arg, tree *num,
/* If we have a integer, just check if it is a multiply of STRUCT_SIZE. */ /* If we have a integer, just check if it is a multiply of STRUCT_SIZE. */
if (TREE_CODE (arg) == INTEGER_CST) if (TREE_CODE (arg) == INTEGER_CST)
{ {
@ -985,7 +1015,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
return true; return true;
} }
return false; return false;
@@ -1531,15 +2320,19 @@ is_result_of_mult (tree arg, tree *num, @@ -1531,15 +2325,19 @@ is_result_of_mult (tree arg, tree *num,
/* Return TRUE if STMT is an allocation statement that is handled. */ /* Return TRUE if STMT is an allocation statement that is handled. */
@ -1013,7 +1043,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
return true; return true;
return false; return false;
} }
@@ -1581,7 +2374,8 @@ ipa_struct_reorg::allocate_size (srtype @@ -1581,7 +2379,8 @@ ipa_struct_reorg::allocate_size (srtype
/* Check that second argument is a constant equal to the size of structure. */ /* Check that second argument is a constant equal to the size of structure. */
if (operand_equal_p (arg1, struct_size, 0)) if (operand_equal_p (arg1, struct_size, 0))
return size; return size;
@ -1023,7 +1053,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
if (operand_equal_p (size, struct_size, 0)) if (operand_equal_p (size, struct_size, 0))
return arg1; return arg1;
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
@@ -1698,6 +2492,29 @@ ipa_struct_reorg::maybe_record_assign (c @@ -1698,6 +2497,29 @@ ipa_struct_reorg::maybe_record_assign (c
} }
} }
@ -1053,7 +1083,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
tree tree
get_ref_base_and_offset (tree &e, HOST_WIDE_INT &offset, bool &realpart, bool &imagpart, tree &accesstype) get_ref_base_and_offset (tree &e, HOST_WIDE_INT &offset, bool &realpart, bool &imagpart, tree &accesstype)
{ {
@@ -1737,7 +2554,10 @@ get_ref_base_and_offset (tree &e, HOST_W @@ -1737,7 +2559,10 @@ get_ref_base_and_offset (tree &e, HOST_W
gcc_assert (TREE_CODE (field_off) == INTEGER_CST); gcc_assert (TREE_CODE (field_off) == INTEGER_CST);
/* So we can mark the types as escaping if different. */ /* So we can mark the types as escaping if different. */
accesstype = TREE_TYPE (field_off); accesstype = TREE_TYPE (field_off);
@ -1065,7 +1095,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
return TREE_OPERAND (expr, 0); return TREE_OPERAND (expr, 0);
} }
default: default:
@@ -2114,6 +2934,39 @@ ipa_struct_reorg::check_type_and_push (t @@ -2114,6 +2939,39 @@ ipa_struct_reorg::check_type_and_push (t
} }
@ -1105,7 +1135,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
/* /*
2) Check SSA_NAMEs for non type usages (source or use) (worlist of srdecl) 2) Check SSA_NAMEs for non type usages (source or use) (worlist of srdecl)
a) if the SSA_NAME is sourced from a pointer plus, record the pointer and a) if the SSA_NAME is sourced from a pointer plus, record the pointer and
@@ -2157,6 +3010,7 @@ ipa_struct_reorg::check_definition (srde @@ -2157,6 +3015,7 @@ ipa_struct_reorg::check_definition (srde
if (!handled_allocation_stmt (stmt) if (!handled_allocation_stmt (stmt)
|| !allocate_size (type, stmt)) || !allocate_size (type, stmt))
type->mark_escape (escape_return, stmt); type->mark_escape (escape_return, stmt);
@ -1113,7 +1143,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
return; return;
} }
/* If the SSA_NAME is sourced from an inline-asm, just mark the type as escaping. */ /* If the SSA_NAME is sourced from an inline-asm, just mark the type as escaping. */
@@ -2195,6 +3049,21 @@ ipa_struct_reorg::check_definition (srde @@ -2195,6 +3054,21 @@ ipa_struct_reorg::check_definition (srde
return; return;
} }
@ -1135,7 +1165,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
/* Casts between pointers and integer are escaping. */ /* Casts between pointers and integer are escaping. */
if (gimple_assign_cast_p (stmt)) if (gimple_assign_cast_p (stmt))
{ {
@@ -2257,6 +3126,13 @@ ipa_struct_reorg::check_other_side (srde @@ -2257,6 +3131,13 @@ ipa_struct_reorg::check_other_side (srde
srtype *t1 = find_type (inner_type (t)); srtype *t1 = find_type (inner_type (t));
if (t1 == type) if (t1 == type)
{ {
@ -1149,7 +1179,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
tree base; tree base;
bool indirect; bool indirect;
srtype *type1; srtype *type1;
@@ -2304,8 +3180,11 @@ ipa_struct_reorg::check_use (srdecl *dec @@ -2304,8 +3185,11 @@ ipa_struct_reorg::check_use (srdecl *dec
tree rhs1 = gimple_cond_lhs (stmt); tree rhs1 = gimple_cond_lhs (stmt);
tree rhs2 = gimple_cond_rhs (stmt); tree rhs2 = gimple_cond_rhs (stmt);
tree orhs = rhs1; tree orhs = rhs1;
@ -1163,7 +1193,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
{ {
mark_expr_escape (rhs1, escape_non_eq, stmt); mark_expr_escape (rhs1, escape_non_eq, stmt);
mark_expr_escape (rhs2, escape_non_eq, stmt); mark_expr_escape (rhs2, escape_non_eq, stmt);
@@ -2335,8 +3214,11 @@ ipa_struct_reorg::check_use (srdecl *dec @@ -2335,8 +3219,11 @@ ipa_struct_reorg::check_use (srdecl *dec
tree rhs1 = gimple_assign_rhs1 (stmt); tree rhs1 = gimple_assign_rhs1 (stmt);
tree rhs2 = gimple_assign_rhs2 (stmt); tree rhs2 = gimple_assign_rhs2 (stmt);
tree orhs = rhs1; tree orhs = rhs1;
@ -1177,7 +1207,19 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
{ {
mark_expr_escape (rhs1, escape_non_eq, stmt); mark_expr_escape (rhs1, escape_non_eq, stmt);
mark_expr_escape (rhs2, escape_non_eq, stmt); mark_expr_escape (rhs2, escape_non_eq, stmt);
@@ -2733,8 +3615,11 @@ ipa_struct_reorg::propagate_escape (void @@ -2617,6 +3504,11 @@ ipa_struct_reorg::record_accesses (void)
/* Record accesses inside a function. */
if(cnode->definition)
record_function (cnode);
+ else
+ {
+ tree return_type = TREE_TYPE (TREE_TYPE (cnode->decl));
+ mark_type_as_escape (return_type, escape_return, NULL);
+ }
}
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -2733,8 +3625,11 @@ ipa_struct_reorg::propagate_escape (void
void void
ipa_struct_reorg::prune_escaped_types (void) ipa_struct_reorg::prune_escaped_types (void)
{ {
@ -1191,7 +1233,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
{ {
@@ -3856,16 +4741,82 @@ ipa_struct_reorg::rewrite_functions (voi @@ -3856,16 +4751,82 @@ ipa_struct_reorg::rewrite_functions (voi
} }
unsigned int unsigned int
@ -1282,7 +1324,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
} }
const pass_data pass_data_ipa_struct_reorg = const pass_data pass_data_ipa_struct_reorg =
@@ -3890,17 +4841,27 @@ public: @@ -3890,17 +4851,27 @@ public:
/* opt_pass methods: */ /* opt_pass methods: */
virtual bool gate (function *); virtual bool gate (function *);
@ -1314,8 +1356,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
} // anon namespace } // anon namespace
diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.h b/gcc/ipa-struct-reorg/ipa-struct-reorg.h diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.h b/gcc/ipa-struct-reorg/ipa-struct-reorg.h
--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2020-09-17 02:26:36.904000000 -0400 --- a/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2021-04-21 17:21:27.402498000 +0800
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2021-04-21 17:29:45.288870000 +0800
@@ -121,6 +121,7 @@ public: @@ -121,6 +121,7 @@ public:
tree newtype[max_split]; tree newtype[max_split];
@ -1331,8 +1373,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.h b/gcc/ipa-struct-reorg/ipa-
+ +
+namespace struct_relayout { +namespace struct_relayout {
+ +
+const int min_relayout_split = 8; +const int min_relayout_split = 1U << 6;
+const int max_relayout_split = 16; +const int max_relayout_split = 1U << 7;
+ +
+struct csrtype +struct csrtype
+{ +{
@ -1360,8 +1402,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.h b/gcc/ipa-struct-reorg/ipa-
+ +
#endif #endif
diff -Nurp a/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c b/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c b/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c
--- a/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c 2021-04-21 17:24:40.830621400 +0800
@@ -0,0 +1,60 @@ @@ -0,0 +1,60 @@
+// { dg-do run } +// { dg-do run }
+ +
@ -1424,8 +1466,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c b/gcc/testsu
+ +
+/* { dg-final { scan-ipa-dump "Number of structures to transform in Complete Structure Relayout is 1" "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "Number of structures to transform in Complete Structure Relayout is 1" "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c b/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c b/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c
--- a/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c 2021-04-21 17:24:40.767717700 +0800
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
+#include <stdlib.h> +#include <stdlib.h>
+#include <stdio.h> +#include <stdio.h>
@ -1474,8 +1516,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c b/gcc/testsuite/gcc.
+ +
+/* { dg-final { scan-ipa-dump "No structures to transform in Complete Structure Relayout." "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "No structures to transform in Complete Structure Relayout." "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c b/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c b/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c
--- a/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c 2021-04-21 17:24:40.767717700 +0800
@@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
+#include <stdlib.h> +#include <stdlib.h>
+#include <stdio.h> +#include <stdio.h>
@ -1537,8 +1579,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c b/gcc/testsuite/gcc.
+ +
+/* { dg-final { scan-ipa-dump "No structures to transform in Complete Structure Relayout." "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "No structures to transform in Complete Structure Relayout." "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c b/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c b/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c
--- a/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c 2021-04-21 17:24:40.767717700 +0800
@@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@
+#include <stdlib.h> +#include <stdlib.h>
+#include <stdio.h> +#include <stdio.h>
@ -1618,8 +1660,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c b/gcc/testsuite/gcc.
+ +
+/* { dg-final { scan-ipa-dump "No structures to transform in Complete Structure Relayout." "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "No structures to transform in Complete Structure Relayout." "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_cast_int.c b/gcc/testsuite/gcc.dg/struct/csr_cast_int.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_cast_int.c b/gcc/testsuite/gcc.dg/struct/csr_cast_int.c
--- a/gcc/testsuite/gcc.dg/struct/csr_cast_int.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/csr_cast_int.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/csr_cast_int.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/csr_cast_int.c 2021-04-21 17:24:40.783298600 +0800
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
+// { dg-do run } +// { dg-do run }
+ +
@ -1674,8 +1716,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_cast_int.c b/gcc/testsuite/gcc.dg/s
+ +
+/* { dg-final { scan-ipa-dump "struct node has escaped: \"Type escapes a cast from/to intergral type\"" "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "struct node has escaped: \"Type escapes a cast from/to intergral type\"" "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c b/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c b/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c
--- a/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c 2021-04-21 17:24:40.783298600 +0800
@@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
+#include <stdlib.h> +#include <stdlib.h>
+#include <stdio.h> +#include <stdio.h>
@ -1726,8 +1768,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c b/gcc/testsuite
+ +
+/* { dg-final { scan-ipa-dump "struct node has escaped: \"Type escapes via a separate instance\"" "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "struct node has escaped: \"Type escapes via a separate instance\"" "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c b/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c b/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c
--- a/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c 2021-04-21 17:24:40.783298600 +0800
@@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
+/* { dg-do run } */ +/* { dg-do run } */
+ +
@ -1767,8 +1809,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c b/gcc/testsuite/g
+ +
+/* { dg-final { scan-ipa-dump "struct S has escaped: \"Type escapes via taking the address of field\"" "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "struct S has escaped: \"Type escapes via taking the address of field\"" "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c b/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c b/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c
--- a/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c 2021-04-21 17:24:40.783298600 +0800
@@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
+// { dg-do compile } +// { dg-do compile }
+ +
@ -1796,8 +1838,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c b/gcc/testsuite/gcc.dg
+ +
+/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */ +/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */
diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c b/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c diff -Nurp a/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c b/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c
--- a/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c 1969-12-31 19:00:00.000000000 -0500 --- a/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c 2020-09-17 02:59:19.308000000 -0400 +++ b/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c 2021-04-21 17:24:40.783298600 +0800
@@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
+// { dg-do compile } +// { dg-do compile }
+ +

View File

@ -59,7 +59,7 @@
Summary: Various compilers (C, C++, Objective-C, ...) Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc Name: gcc
Version: %{gcc_version} Version: %{gcc_version}
Release: %{DATE}.17 Release: %{DATE}.18
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
URL: https://gcc.gnu.org URL: https://gcc.gnu.org
@ -2707,6 +2707,12 @@ end
%doc rpm.doc/changelogs/libcc1/ChangeLog* %doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog %changelog
* Wed Apr 21 2021 eastb233 <xiezhiheng@huawei.com> - 9.3.1-20210204.18
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:NA
* Mon Mar 15 2021 tianwei <tianwei12@huawei.com> - 9.3.1-20210204.17 * Mon Mar 15 2021 tianwei <tianwei12@huawei.com> - 9.3.1-20210204.17
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA