!37 Push bugfix patches
From: @eastb233 Reviewed-by: @jdkboy Signed-off-by: @jdkboy
This commit is contained in:
commit
9b1dfdd531
@ -1,6 +1,6 @@
|
||||
diff -Nurp a/gcc/ipa-struct-reorg/escapes.def b/gcc/ipa-struct-reorg/escapes.def
|
||||
--- a/gcc/ipa-struct-reorg/escapes.def 2020-07-18 05:11:11.548000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/escapes.def 2020-07-18 05:16:25.928000000 -0400
|
||||
--- a/gcc/ipa-struct-reorg/escapes.def 2020-09-17 02:26:36.900000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/escapes.def 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -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_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
|
||||
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-07-18 05:11:17.664000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-07-20 09:08:08.912000000 -0400
|
||||
--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-09-17 02:58:59.540000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-09-17 04:55:03.992000000 -0400
|
||||
@@ -95,6 +95,7 @@ along with GCC; see the file COPYING3.
|
||||
#include "ipa-struct-reorg.h"
|
||||
#include "tree-eh.h"
|
||||
@ -28,7 +28,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
|
||||
/* Return true iff TYPE is stdarg va_list type. */
|
||||
|
||||
@@ -152,6 +154,14 @@ handled_type (tree type)
|
||||
@@ -158,6 +160,14 @@ handled_type (tree type)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
} // anon namespace
|
||||
|
||||
namespace struct_reorg {
|
||||
@@ -241,7 +251,8 @@ srtype::srtype (tree type)
|
||||
@@ -247,7 +257,8 @@ srtype::srtype (tree type)
|
||||
: type (type),
|
||||
chain_type (false),
|
||||
escapes (does_not_escape),
|
||||
@ -53,7 +53,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
{
|
||||
for (int i = 0; i < max_split; i++)
|
||||
newtype[i] = NULL_TREE;
|
||||
@@ -441,13 +452,6 @@ srtype::dump (FILE *f)
|
||||
@@ -447,13 +458,6 @@ srtype::dump (FILE *f)
|
||||
fn->simple_dump (f);
|
||||
}
|
||||
fprintf (f, "\n }\n");
|
||||
@ -67,7 +67,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
fprintf (f, "}\n");
|
||||
}
|
||||
|
||||
@@ -798,12 +802,6 @@ srfield::dump (FILE *f)
|
||||
@@ -804,12 +808,6 @@ srfield::dump (FILE *f)
|
||||
fprintf (f, ", offset = " HOST_WIDE_INT_PRINT_DEC, offset);
|
||||
fprintf (f, ", type = ");
|
||||
print_generic_expr (f, fieldtype);
|
||||
@ -80,7 +80,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
fprintf (f, "\n}\n");
|
||||
}
|
||||
|
||||
@@ -813,7 +811,10 @@ srfield::dump (FILE *f)
|
||||
@@ -819,7 +817,10 @@ srfield::dump (FILE *f)
|
||||
void
|
||||
srfield::simple_dump (FILE *f)
|
||||
{
|
||||
@ -92,7 +92,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. */
|
||||
@@ -857,21 +858,113 @@ srdecl::dump (FILE *file)
|
||||
@@ -863,21 +864,120 @@ srdecl::dump (FILE *file)
|
||||
|
||||
} // namespace struct_reorg
|
||||
|
||||
@ -119,6 +119,11 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+unsigned
|
||||
+csrtype::calculate_field_num (tree field_offset)
|
||||
+{
|
||||
+ if (field_offset == NULL)
|
||||
+ {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ HOST_WIDE_INT off = int_byte_position (field_offset);
|
||||
+ unsigned i = 1;
|
||||
+ for (tree field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
|
||||
@ -141,7 +146,9 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ }
|
||||
+ new_size = old_size = tree_to_uhwi (TYPE_SIZE_UNIT (type));
|
||||
+
|
||||
+ /* Close enough to pad to improve performance. */
|
||||
+ /* Close enough to pad to improve performance.
|
||||
+ 33~63 should pad to 64 but 33~48 (first half) are too far away, and
|
||||
+ 65~127 should pad to 128 but 65~96 (first half) are too far away. */
|
||||
+ if (old_size > 48 && old_size < 64)
|
||||
+ {
|
||||
+ new_size = 64;
|
||||
@ -210,7 +217,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
// fields
|
||||
auto_vec_del<srtype> types;
|
||||
auto_vec_del<srfunction> functions;
|
||||
@@ -879,8 +972,8 @@ private:
|
||||
@@ -885,8 +985,8 @@ private:
|
||||
srfunction *current_function;
|
||||
|
||||
bool done_recording;
|
||||
@ -220,7 +227,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_escaped (FILE *f);
|
||||
void dump_functions (FILE *f);
|
||||
@@ -910,6 +1003,7 @@ private:
|
||||
@@ -916,6 +1016,7 @@ private:
|
||||
void maybe_record_allocation_site (cgraph_node *, gimple *);
|
||||
void record_stmt_expr (tree expr, cgraph_node *node, gimple *stmt);
|
||||
void mark_expr_escape(tree, escape_type, gimple *stmt);
|
||||
@ -228,7 +235,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);
|
||||
|
||||
void mark_decls_in_as_not_needed (tree fn);
|
||||
@@ -925,6 +1019,7 @@ private:
|
||||
@@ -931,6 +1032,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 wholeaccess (tree expr, tree base, tree accesstype, srtype *t);
|
||||
|
||||
@ -236,13 +243,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_uses (srdecl *decl, vec<srdecl*>&);
|
||||
void check_use (srdecl *decl, gimple *stmt, vec<srdecl*>&);
|
||||
@@ -937,8 +1032,631 @@ private:
|
||||
@@ -943,8 +1045,644 @@ private:
|
||||
|
||||
bool has_rewritten_type (srfunction*);
|
||||
void maybe_mark_or_record_other_side (tree side, tree other, gimple *stmt);
|
||||
+ unsigned execute_struct_relayout (void);
|
||||
+};
|
||||
+
|
||||
};
|
||||
|
||||
+struct ipa_struct_relayout
|
||||
+{
|
||||
+public:
|
||||
@ -283,8 +290,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,
|
||||
+ HOST_WIDE_INT ×);
|
||||
+ unsigned int execute (void);
|
||||
};
|
||||
|
||||
+};
|
||||
+
|
||||
+} // anon namespace
|
||||
+
|
||||
+namespace {
|
||||
@ -349,8 +356,13 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ fprintf (dump_file, "Create global gptrs: {\n");
|
||||
+ }
|
||||
+
|
||||
+ char *gptr0_name = NULL;
|
||||
+ const char *type_name = get_type_name (ctype.type);
|
||||
+ char *gptr0_name = concat (type_name, "_gptr0", NULL);
|
||||
+
|
||||
+ if (type_name)
|
||||
+ {
|
||||
+ gptr0_name = concat (type_name, "_gptr0", NULL);
|
||||
+ }
|
||||
+ tree var_gptr0 = create_new_vars (ctype.type, gptr0_name);
|
||||
+ gptr[0] = var_gptr0;
|
||||
+ varpool_node::add (var_gptr0);
|
||||
@ -368,8 +380,10 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ sprintf (id, "%d", i);
|
||||
+ const char *decl_name = IDENTIFIER_POINTER (DECL_NAME (field));
|
||||
+
|
||||
+ if (type_name && decl_name)
|
||||
+ {
|
||||
+ name = concat (type_name, "_", decl_name, "_gptr", id, NULL);
|
||||
+
|
||||
+ }
|
||||
+ tree var = create_new_vars (type, name);
|
||||
+
|
||||
+ gptr[i] = var;
|
||||
@ -441,6 +455,11 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ if (cnode->definition)
|
||||
+ {
|
||||
+ fn = DECL_STRUCT_FUNCTION (cnode->decl);
|
||||
+ if (fn == NULL)
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ current_node = cnode;
|
||||
+ push_cfun (fn);
|
||||
+
|
||||
@ -469,7 +488,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+bool
|
||||
+ipa_struct_relayout::rewrite_debug (gimple *stmt, gimple_stmt_iterator *gsi)
|
||||
+{
|
||||
+ /* TODO: For future implement. */
|
||||
+ /* Delete debug gimple now. */
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
@ -612,6 +631,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+tree
|
||||
+ipa_struct_relayout::create_ssa (tree node, gimple_stmt_iterator *gsi)
|
||||
+{
|
||||
+ gcc_assert (TREE_CODE (node) == VAR_DECL);
|
||||
+ tree node_ssa = make_ssa_name (TREE_TYPE (node));
|
||||
+ gassign *stmt = gimple_build_assign (node_ssa, node);
|
||||
+ gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
|
||||
@ -868,7 +888,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. */
|
||||
|
||||
void
|
||||
@@ -1134,8 +1852,10 @@ ipa_struct_reorg::record_type (tree type
|
||||
@@ -1140,8 +1878,10 @@ ipa_struct_reorg::record_type (tree type
|
||||
f->type = t1;
|
||||
t1->add_field_site (f);
|
||||
}
|
||||
@ -881,7 +901,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1272,6 +1992,14 @@ ipa_struct_reorg::record_var (tree decl,
|
||||
@@ -1278,6 +2018,14 @@ ipa_struct_reorg::record_var (tree decl,
|
||||
else
|
||||
e = escape_type_volatile_array_or_ptrptr (TREE_TYPE (decl));
|
||||
|
||||
@ -896,7 +916,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
if (e != does_not_escape)
|
||||
type->mark_escape (e, NULL);
|
||||
}
|
||||
@@ -1347,7 +2075,8 @@ ipa_struct_reorg::find_vars (gimple *stm
|
||||
@@ -1353,7 +2101,8 @@ ipa_struct_reorg::find_vars (gimple *stm
|
||||
{
|
||||
case GIMPLE_ASSIGN:
|
||||
if (gimple_assign_rhs_class (stmt) == GIMPLE_SINGLE_RHS
|
||||
@ -906,7 +926,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 rhs = gimple_assign_rhs1 (stmt);
|
||||
@@ -1372,6 +2101,32 @@ ipa_struct_reorg::find_vars (gimple *stm
|
||||
@@ -1378,6 +2127,32 @@ ipa_struct_reorg::find_vars (gimple *stm
|
||||
current_function->record_decl (t, rhs, -1);
|
||||
}
|
||||
}
|
||||
@ -939,7 +959,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
break;
|
||||
|
||||
case GIMPLE_CALL:
|
||||
@@ -1453,9 +2208,23 @@ is_result_of_mult (tree arg, tree *num,
|
||||
@@ -1459,9 +2234,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 (TREE_CODE (arg) == INTEGER_CST)
|
||||
{
|
||||
@ -965,7 +985,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1525,15 +2294,19 @@ is_result_of_mult (tree arg, tree *num,
|
||||
@@ -1531,15 +2320,19 @@ is_result_of_mult (tree arg, tree *num,
|
||||
|
||||
/* Return TRUE if STMT is an allocation statement that is handled. */
|
||||
|
||||
@ -993,7 +1013,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -1575,7 +2348,8 @@ ipa_struct_reorg::allocate_size (srtype
|
||||
@@ -1581,7 +2374,8 @@ ipa_struct_reorg::allocate_size (srtype
|
||||
/* Check that second argument is a constant equal to the size of structure. */
|
||||
if (operand_equal_p (arg1, struct_size, 0))
|
||||
return size;
|
||||
@ -1003,7 +1023,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))
|
||||
return arg1;
|
||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||
@@ -1692,6 +2466,29 @@ ipa_struct_reorg::maybe_record_assign (c
|
||||
@@ -1698,6 +2492,29 @@ ipa_struct_reorg::maybe_record_assign (c
|
||||
}
|
||||
}
|
||||
|
||||
@ -1033,7 +1053,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
tree
|
||||
get_ref_base_and_offset (tree &e, HOST_WIDE_INT &offset, bool &realpart, bool &imagpart, tree &accesstype)
|
||||
{
|
||||
@@ -1731,7 +2528,10 @@ get_ref_base_and_offset (tree &e, HOST_W
|
||||
@@ -1737,7 +2554,10 @@ get_ref_base_and_offset (tree &e, HOST_W
|
||||
gcc_assert (TREE_CODE (field_off) == INTEGER_CST);
|
||||
/* So we can mark the types as escaping if different. */
|
||||
accesstype = TREE_TYPE (field_off);
|
||||
@ -1045,7 +1065,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
return TREE_OPERAND (expr, 0);
|
||||
}
|
||||
default:
|
||||
@@ -2108,6 +2908,39 @@ ipa_struct_reorg::check_type_and_push (t
|
||||
@@ -2114,6 +2934,39 @@ ipa_struct_reorg::check_type_and_push (t
|
||||
|
||||
}
|
||||
|
||||
@ -1085,7 +1105,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)
|
||||
a) if the SSA_NAME is sourced from a pointer plus, record the pointer and
|
||||
@@ -2151,6 +2984,7 @@ ipa_struct_reorg::check_definition (srde
|
||||
@@ -2157,6 +3010,7 @@ ipa_struct_reorg::check_definition (srde
|
||||
if (!handled_allocation_stmt (stmt)
|
||||
|| !allocate_size (type, stmt))
|
||||
type->mark_escape (escape_return, stmt);
|
||||
@ -1093,7 +1113,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
return;
|
||||
}
|
||||
/* If the SSA_NAME is sourced from an inline-asm, just mark the type as escaping. */
|
||||
@@ -2189,6 +3023,21 @@ ipa_struct_reorg::check_definition (srde
|
||||
@@ -2195,6 +3049,21 @@ ipa_struct_reorg::check_definition (srde
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1115,7 +1135,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. */
|
||||
if (gimple_assign_cast_p (stmt))
|
||||
{
|
||||
@@ -2251,6 +3100,13 @@ ipa_struct_reorg::check_other_side (srde
|
||||
@@ -2257,6 +3126,13 @@ ipa_struct_reorg::check_other_side (srde
|
||||
srtype *t1 = find_type (inner_type (t));
|
||||
if (t1 == type)
|
||||
{
|
||||
@ -1129,7 +1149,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
tree base;
|
||||
bool indirect;
|
||||
srtype *type1;
|
||||
@@ -2298,8 +3154,11 @@ ipa_struct_reorg::check_use (srdecl *dec
|
||||
@@ -2304,8 +3180,11 @@ ipa_struct_reorg::check_use (srdecl *dec
|
||||
tree rhs1 = gimple_cond_lhs (stmt);
|
||||
tree rhs2 = gimple_cond_rhs (stmt);
|
||||
tree orhs = rhs1;
|
||||
@ -1143,7 +1163,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 (rhs2, escape_non_eq, stmt);
|
||||
@@ -2329,8 +3188,11 @@ ipa_struct_reorg::check_use (srdecl *dec
|
||||
@@ -2335,8 +3214,11 @@ ipa_struct_reorg::check_use (srdecl *dec
|
||||
tree rhs1 = gimple_assign_rhs1 (stmt);
|
||||
tree rhs2 = gimple_assign_rhs2 (stmt);
|
||||
tree orhs = rhs1;
|
||||
@ -1157,7 +1177,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 (rhs2, escape_non_eq, stmt);
|
||||
@@ -2727,8 +3589,11 @@ ipa_struct_reorg::propagate_escape (void
|
||||
@@ -2733,8 +3615,11 @@ ipa_struct_reorg::propagate_escape (void
|
||||
void
|
||||
ipa_struct_reorg::prune_escaped_types (void)
|
||||
{
|
||||
@ -1171,7 +1191,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))
|
||||
{
|
||||
@@ -3850,16 +4715,82 @@ ipa_struct_reorg::rewrite_functions (voi
|
||||
@@ -3856,16 +4741,82 @@ ipa_struct_reorg::rewrite_functions (voi
|
||||
}
|
||||
|
||||
unsigned int
|
||||
@ -1216,8 +1236,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ "Complete Structure Relayout.\n");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- return rewrite_functions ();
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
@ -1229,7 +1248,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ if (mode == NORMAL)
|
||||
+ {
|
||||
+ current_mode = NORMAL;
|
||||
+ /* FIXME: If there is a top-level inline-asm,
|
||||
+ /* If there is a top-level inline-asm,
|
||||
+ the pass immediately returns. */
|
||||
+ if (symtab->first_asm_symbol ())
|
||||
+ {
|
||||
@ -1238,7 +1257,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+ record_accesses ();
|
||||
+ prune_escaped_types ();
|
||||
+ analyze_types ();
|
||||
+
|
||||
|
||||
- return rewrite_functions ();
|
||||
+ ret = rewrite_functions ();
|
||||
+ }
|
||||
+ else if (mode == COMPLETE_STRUCT_RELAYOUT)
|
||||
@ -1262,7 +1282,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 =
|
||||
@@ -3884,17 +4815,27 @@ public:
|
||||
@@ -3890,17 +4841,27 @@ public:
|
||||
|
||||
/* opt_pass methods: */
|
||||
virtual bool gate (function *);
|
||||
@ -1294,8 +1314,8 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
|
||||
} // anon namespace
|
||||
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-07-18 05:11:11.548000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2020-07-18 05:16:25.928000000 -0400
|
||||
--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.h 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -121,6 +121,7 @@ public:
|
||||
|
||||
tree newtype[max_split];
|
||||
@ -1341,7 +1361,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.h b/gcc/ipa-struct-reorg/ipa-
|
||||
#endif
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/complete_struct_relayout.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,60 @@
|
||||
+// { dg-do run }
|
||||
+
|
||||
@ -1405,7 +1425,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-1.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,46 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
@ -1455,7 +1475,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-2.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,59 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
@ -1518,7 +1538,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_allocation-3.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,77 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
@ -1599,7 +1619,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_cast_int.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_cast_int.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,52 @@
|
||||
+// { dg-do run }
|
||||
+
|
||||
@ -1655,7 +1675,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/csr_separate_instance.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,48 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
@ -1707,7 +1727,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/sr_address_of_field.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* { dg-do run } */
|
||||
+
|
||||
@ -1748,7 +1768,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/sr_maxmin_expr.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,25 @@
|
||||
+// { dg-do compile }
|
||||
+
|
||||
@ -1777,7 +1797,7 @@ 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" } } */
|
||||
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
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c 2020-07-18 05:16:25.928000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/sr_pointer_minus.c 2020-09-17 02:59:19.308000000 -0400
|
||||
@@ -0,0 +1,33 @@
|
||||
+// { dg-do compile }
|
||||
+
|
||||
|
||||
162
fix-ICE-in-eliminate_stmt.patch
Normal file
162
fix-ICE-in-eliminate_stmt.patch
Normal file
@ -0,0 +1,162 @@
|
||||
This backport contains 2 patchs from gcc main stream tree.
|
||||
The commit id of these patchs list as following in the order of time.
|
||||
|
||||
0001-Tweak-gcc.dg-vect-bb-slp-4-01-.c-PR92366.patch
|
||||
3771033244b3ee1b53a8a00d734580b16384fdd3
|
||||
|
||||
0001-tree-vect-slp.c-vect_analyze_slp_instance-Dump-const.patch
|
||||
140ee00a961fda084c1b4b3f0e7e489a917858f7
|
||||
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/vect/bb-slp-40.c b/gcc/testsuite/gcc.dg/vect/bb-slp-40.c
|
||||
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-40.c 2020-09-14 21:24:20.899694710 +0800
|
||||
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-40.c 2020-09-15 20:54:05.456027442 +0800
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O3 -fdump-tree-slp-all" } */
|
||||
+/* { dg-additional-options "-fvect-cost-model=dynamic" } */
|
||||
/* { dg-require-effective-target vect_int } */
|
||||
|
||||
char g_d[1024], g_s1[1024], g_s2[1024];
|
||||
@@ -30,5 +30,5 @@ void foo(void)
|
||||
}
|
||||
|
||||
/* See that we vectorize an SLP instance. */
|
||||
-/* { dg-final { scan-tree-dump-times "Found vectorizable constructor" 1 "slp1" } } */
|
||||
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "slp1" } } */
|
||||
+/* { dg-final { scan-tree-dump "Analyzing vectorizable constructor" "slp1" } } */
|
||||
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "slp1" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/vect/bb-slp-41.c b/gcc/testsuite/gcc.dg/vect/bb-slp-41.c
|
||||
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-41.c 2020-09-14 21:24:20.899694710 +0800
|
||||
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-41.c 2020-09-15 20:54:10.424087539 +0800
|
||||
@@ -1,10 +1,9 @@
|
||||
-/* { dg-do run } */
|
||||
-/* { dg-options "-O3 -fdump-tree-slp-all -fno-vect-cost-model" } */
|
||||
/* { dg-require-effective-target vect_int } */
|
||||
|
||||
#define ARR_SIZE 1000
|
||||
|
||||
-void foo (int *a, int *b)
|
||||
+void __attribute__((optimize (0)))
|
||||
+foo (int *a, int *b)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < (ARR_SIZE - 2); ++i)
|
||||
@@ -56,6 +55,4 @@ int main ()
|
||||
return 0;
|
||||
|
||||
}
|
||||
-/* See that we vectorize an SLP instance. */
|
||||
-/* { dg-final { scan-tree-dump-times "Found vectorizable constructor" 12 "slp1" } } */
|
||||
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "slp1" } } */
|
||||
+/* { dg-final { scan-tree-dump-not "vectorizing stmts using SLP" "slp1" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/vect/bb-slp-42.c b/gcc/testsuite/gcc.dg/vect/bb-slp-42.c
|
||||
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-42.c 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-42.c 2020-09-15 20:54:14.724139555 +0800
|
||||
@@ -0,0 +1,48 @@
|
||||
+/* { dg-require-effective-target vect_int } */
|
||||
+/* { dg-require-effective-target vect_perm } */
|
||||
+
|
||||
+#include "tree-vect.h"
|
||||
+
|
||||
+#define ARR_SIZE 1024
|
||||
+
|
||||
+void __attribute__((noipa))
|
||||
+foo (int a[][ARR_SIZE], int *b)
|
||||
+{
|
||||
+ int i;
|
||||
+ for (i = 0; i < ARR_SIZE; ++i)
|
||||
+ {
|
||||
+ a[0][i] += b[0];
|
||||
+ a[1][i] += b[1];
|
||||
+ a[2][i] += b[2];
|
||||
+ a[3][i] += b[3];
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ int a[4][ARR_SIZE];
|
||||
+ int b[4];
|
||||
+
|
||||
+ check_vect ();
|
||||
+
|
||||
+ for (int i = 0; i < 4; ++i)
|
||||
+ {
|
||||
+ b[i] = 20 * i;
|
||||
+ for (int j = 0; j < ARR_SIZE; ++j)
|
||||
+ a[i][j] = (i + 1) * ARR_SIZE - j;
|
||||
+ }
|
||||
+
|
||||
+ foo (a, b);
|
||||
+
|
||||
+ for (int i = 0; i < 4; ++i)
|
||||
+ for (int j = 0; j < ARR_SIZE; ++j)
|
||||
+ if (a[i][j] != (i + 1) * ARR_SIZE - j + 20 * i)
|
||||
+ __builtin_abort ();
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+/* See that we do not try to vectorize the uniform CTORs. */
|
||||
+/* { dg-final { scan-tree-dump-not "Analyzing vectorizable constructor" "slp1" } } */
|
||||
diff -Nurp a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
|
||||
--- a/gcc/tree-vect-slp.c 2020-09-14 21:24:20.983695752 +0800
|
||||
+++ b/gcc/tree-vect-slp.c 2020-09-14 16:13:11.077779069 +0800
|
||||
@@ -2106,6 +2106,10 @@ vect_analyze_slp_instance (vec_info *vin
|
||||
else
|
||||
return false;
|
||||
}
|
||||
+ if (dump_enabled_p ())
|
||||
+ dump_printf_loc (MSG_NOTE, vect_location,
|
||||
+ "Analyzing vectorizable constructor: %G\n",
|
||||
+ stmt_info->stmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3049,31 +3053,22 @@ vect_slp_check_for_constructors (bb_vec_
|
||||
gimple_stmt_iterator gsi;
|
||||
|
||||
for (gsi = bb_vinfo->region_begin;
|
||||
- gsi_stmt (gsi) != gsi_stmt (bb_vinfo->region_end); gsi_next (&gsi))
|
||||
+ gsi_stmt (gsi) != gsi_stmt (bb_vinfo->region_end); gsi_next (&gsi))
|
||||
{
|
||||
- gimple *stmt = gsi_stmt (gsi);
|
||||
-
|
||||
- if (is_gimple_assign (stmt)
|
||||
- && gimple_assign_rhs_code (stmt) == CONSTRUCTOR
|
||||
- && TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME
|
||||
- && TREE_CODE (TREE_TYPE (gimple_assign_lhs (stmt))) == VECTOR_TYPE)
|
||||
- {
|
||||
- tree rhs = gimple_assign_rhs1 (stmt);
|
||||
-
|
||||
- if (CONSTRUCTOR_NELTS (rhs) == 0)
|
||||
- continue;
|
||||
-
|
||||
- poly_uint64 subparts = TYPE_VECTOR_SUBPARTS (TREE_TYPE (rhs));
|
||||
+ gassign *stmt = dyn_cast <gassign *> (gsi_stmt (gsi));
|
||||
+ if (!stmt || gimple_assign_rhs_code (stmt) != CONSTRUCTOR)
|
||||
+ continue;
|
||||
|
||||
- if (maybe_ne (subparts, CONSTRUCTOR_NELTS (rhs)))
|
||||
- continue;
|
||||
+ tree rhs = gimple_assign_rhs1 (stmt);
|
||||
+ if (!VECTOR_TYPE_P (TREE_TYPE (rhs))
|
||||
+ || maybe_ne (TYPE_VECTOR_SUBPARTS (TREE_TYPE (rhs)),
|
||||
+ CONSTRUCTOR_NELTS (rhs))
|
||||
+ || VECTOR_TYPE_P (TREE_TYPE (CONSTRUCTOR_ELT (rhs, 0)->value))
|
||||
+ || uniform_vector_p (rhs))
|
||||
+ continue;
|
||||
|
||||
- if (dump_enabled_p ())
|
||||
- dump_printf_loc (MSG_NOTE, vect_location,
|
||||
- "Found vectorizable constructor: %G\n", stmt);
|
||||
- stmt_vec_info stmt_info = bb_vinfo->lookup_stmt (stmt);
|
||||
- BB_VINFO_GROUPED_STORES (bb_vinfo).safe_push (stmt_info);
|
||||
- }
|
||||
+ stmt_vec_info stmt_info = bb_vinfo->lookup_stmt (stmt);
|
||||
+ BB_VINFO_GROUPED_STORES (bb_vinfo).safe_push (stmt_info);
|
||||
}
|
||||
}
|
||||
|
||||
69
fix-make-ifcvt-clean-up-dead-comparisons.patch
Normal file
69
fix-make-ifcvt-clean-up-dead-comparisons.patch
Normal file
@ -0,0 +1,69 @@
|
||||
This backport contains 1 patch from gcc main stream tree. ^M
|
||||
The commit id of these patchs list as following in the order of time.
|
||||
|
||||
0001-Make-ifcvt-clean-up-dead-comparisons.patch
|
||||
f1f10541903b082d27114db38947fb31f5364bcc
|
||||
|
||||
diff -Nurp a/gcc/basic-block.h b/gcc/basic-block.h
|
||||
--- a/gcc/basic-block.h 2020-09-12 14:42:34.268000000 +0800
|
||||
+++ b/gcc/basic-block.h 2020-09-12 14:42:48.448000000 +0800
|
||||
@@ -507,6 +507,8 @@ ei_cond (edge_iterator ei, edge *p)
|
||||
#define CLEANUP_CFGLAYOUT 32 /* Do cleanup in cfglayout mode. */
|
||||
#define CLEANUP_CFG_CHANGED 64 /* The caller changed the CFG. */
|
||||
#define CLEANUP_NO_PARTITIONING 128 /* Do not try to fix partitions. */
|
||||
+#define CLEANUP_FORCE_FAST_DCE 0x100 /* Force run_fast_dce to be called
|
||||
+ at least once. */
|
||||
|
||||
/* Return true if BB is in a transaction. */
|
||||
|
||||
diff -Nurp a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
|
||||
--- a/gcc/cfgcleanup.c 2020-09-12 14:42:34.292000000 +0800
|
||||
+++ b/gcc/cfgcleanup.c 2020-09-12 14:42:48.448000000 +0800
|
||||
@@ -3197,7 +3197,10 @@ cleanup_cfg (int mode)
|
||||
&& !delete_trivially_dead_insns (get_insns (), max_reg_num ()))
|
||||
break;
|
||||
if ((mode & CLEANUP_CROSSJUMP) && crossjumps_occurred)
|
||||
- run_fast_dce ();
|
||||
+ {
|
||||
+ run_fast_dce ();
|
||||
+ mode &= ~CLEANUP_FORCE_FAST_DCE;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
break;
|
||||
@@ -3206,6 +3209,9 @@ cleanup_cfg (int mode)
|
||||
if (mode & CLEANUP_CROSSJUMP)
|
||||
remove_fake_exit_edges ();
|
||||
|
||||
+ if (mode & CLEANUP_FORCE_FAST_DCE)
|
||||
+ run_fast_dce ();
|
||||
+
|
||||
/* Don't call delete_dead_jumptables in cfglayout mode, because
|
||||
that function assumes that jump tables are in the insns stream.
|
||||
But we also don't _have_ to delete dead jumptables in cfglayout
|
||||
diff -Nurp a/gcc/ifcvt.c b/gcc/ifcvt.c
|
||||
--- a/gcc/ifcvt.c 2020-09-12 14:42:34.300000000 +0800
|
||||
+++ b/gcc/ifcvt.c 2020-09-12 14:42:48.448000000 +0800
|
||||
@@ -5457,6 +5457,8 @@ if_convert (bool after_combine)
|
||||
static unsigned int
|
||||
rest_of_handle_if_conversion (void)
|
||||
{
|
||||
+ int flags = 0;
|
||||
+
|
||||
if (flag_if_conversion)
|
||||
{
|
||||
if (dump_file)
|
||||
@@ -5466,9 +5468,12 @@ rest_of_handle_if_conversion (void)
|
||||
}
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE);
|
||||
if_convert (false);
|
||||
+ if (num_updated_if_blocks)
|
||||
+ /* Get rid of any dead CC-related instructions. */
|
||||
+ flags |= CLEANUP_FORCE_FAST_DCE;
|
||||
}
|
||||
|
||||
- cleanup_cfg (0);
|
||||
+ cleanup_cfg (flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
23
gcc.spec
23
gcc.spec
@ -1,7 +1,8 @@
|
||||
%global DATE 20200915
|
||||
%global DATE 20200921
|
||||
|
||||
%global gcc_version 9.3.1
|
||||
%global gcc_major 9.3.1
|
||||
%global gcc_pkgversion "build 300b011"
|
||||
%global _unpackaged_files_terminate_build 0
|
||||
%global _performance_build 1
|
||||
|
||||
@ -13,7 +14,7 @@
|
||||
%global build_go 0
|
||||
%global build_d 0
|
||||
%global build_check 0
|
||||
%ifarch %{ix86} x86_64 ia64 ppc64le
|
||||
%ifarch %{ix86} x86_64 ia64 ppc64le aarch64
|
||||
%global build_libquadmath 1
|
||||
%else
|
||||
%global build_libquadmath 0
|
||||
@ -59,7 +60,7 @@
|
||||
Summary: Various compilers (C, C++, Objective-C, ...)
|
||||
Name: gcc
|
||||
Version: %{gcc_version}
|
||||
Release: %{DATE}.9
|
||||
Release: %{DATE}.10
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
||||
Source0: gcc-9.3.0.tar.xz
|
||||
%global isl_version 0.16.1
|
||||
@ -181,6 +182,9 @@ Patch66: fix-ICE-in-verify_target_availability.patch
|
||||
Patch67: fix-ICE-vect_slp_analyze_node_operations.patch
|
||||
Patch68: fix-ICE-in-extract_constrain_insn.patch
|
||||
Patch69: fix-ICE-during-GIMPLE-pass-dse.patch
|
||||
Patch70: ipa-const-prop-buffer-overflow-bugfix.patch
|
||||
Patch71: fix-ICE-in-eliminate_stmt.patch
|
||||
Patch72: fix-make-ifcvt-clean-up-dead-comparisons.patch
|
||||
|
||||
|
||||
%global gcc_target_platform %{_arch}-linux-gnu
|
||||
@ -693,6 +697,9 @@ not stable, so plugins must be rebuilt any time GCC is updated.
|
||||
%patch67 -p1
|
||||
%patch68 -p1
|
||||
%patch69 -p1
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
%patch72 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -761,6 +768,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \
|
||||
--enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-plugin \
|
||||
--enable-initfini-array --disable-libgcj --without-isl --without-cloog \
|
||||
--enable-gnu-indirect-function --build=%{gcc_target_platform} \
|
||||
--with-pkgversion=%{gcc_pkgversion} \
|
||||
--with-stage1-ldflags="$OPT_LDFLAGS" \
|
||||
--with-boot-ldflags="$OPT_LDFLAGS" \
|
||||
%ifarch x86_64
|
||||
@ -2621,6 +2629,15 @@ end
|
||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||
|
||||
%changelog
|
||||
* Mon Sep 21 2020 eastb233 <xiezhiheng@huawei.com> - 9.3.1-20200921.10
|
||||
- complete-struct-reorg.patch: Fix secure coding
|
||||
- ipa-struct-reorg-bugfix.patch: Likewise
|
||||
- simplify-removing-subregs.patch: Likewise
|
||||
- fix-ICE-in-eliminate_stmt.patch: New file
|
||||
- fix-make-ifcvt-clean-up-dead-comparisons.patch: New file
|
||||
- ipa-const-prop-buffer-overflow-bugfix.patch: New file
|
||||
- gcc.spec: Add pkgversion, pack libquadmath library on aarch64
|
||||
|
||||
* Thu Sep 15 2020 eastb233 <xiezhiheng@huawei.com> - 9.3.1-20200915.9
|
||||
- avoid-cycling-on-vertain-subreg-reloads.patch: New file
|
||||
- fix-ICE-in-verify_target_availability.patch: New file
|
||||
|
||||
119
ipa-const-prop-buffer-overflow-bugfix.patch
Normal file
119
ipa-const-prop-buffer-overflow-bugfix.patch
Normal file
@ -0,0 +1,119 @@
|
||||
This patch is to solve issue409, which merge following 3 commits with some style fix
|
||||
|
||||
commit 9505acd8501e6c79bc4fa9ed9f1ee174462601d1
|
||||
Author: Richard Biener <rguenther@suse.de>
|
||||
Date: Wed Jul 17 09:35:04 2019 +0000
|
||||
|
||||
re PR tree-optimization/91180 (wrong code at -O and above with __builtin_memset())
|
||||
|
||||
2019-07-17 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/91180
|
||||
* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix offset
|
||||
computation for memset partial defs.
|
||||
|
||||
* gcc.dg/torture/pr91180.c: New testcase.
|
||||
|
||||
From-SVN: r273548
|
||||
|
||||
commit 6b68f00d4c2b375dad66bd6e72c01c309b4085c5
|
||||
Author: Richard Biener <rguenther@suse.de>
|
||||
Date: Fri Jul 19 16:19:39 2019 +0000
|
||||
|
||||
re PR tree-optimization/91211 (wrong code with __builtin_memset() and __builtin_memcpy() at -O1 and above)
|
||||
|
||||
2019-07-19 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/91211
|
||||
* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Fix
|
||||
memset encoding size.
|
||||
|
||||
* gcc.dg/torture/pr91211.c: New testcase.
|
||||
|
||||
From-SVN: r273605
|
||||
|
||||
commit 599331c858294dec6ac94400e63d275c4836607f
|
||||
Author: Richard Biener <rguenther@suse.de>
|
||||
Date: Thu Jul 25 06:57:46 2019 +0000
|
||||
|
||||
re PR tree-optimization/91236 (ICE in walk_non_aliased_vuses at gcc/tree-ssa-alias.c:3395 on aarch64)
|
||||
|
||||
2019-07-25 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/91236
|
||||
* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Fix
|
||||
size of CONSTRUCTOR write. Fix buffer size we pass to
|
||||
native_encode_expr.
|
||||
|
||||
From-SVN: r273787
|
||||
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/torture/pr91180.c b/gcc/testsuite/gcc.dg/torture/pr91180.c
|
||||
--- a/gcc/testsuite/gcc.dg/torture/pr91180.c 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ b/gcc/testsuite/gcc.dg/torture/pr91180.c 2020-09-15 20:52:58.796000000 +0800
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-do run } */
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+#if __SIZEOF_INT__ == 4
|
||||
+ unsigned x = 0xffffffff;
|
||||
+ __builtin_memset (1 + (char *) &x, 0, 2);
|
||||
+ if (x != 0xff0000ff)
|
||||
+ __builtin_abort ();
|
||||
+#endif
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/torture/pr91211.c b/gcc/testsuite/gcc.dg/torture/pr91211.c
|
||||
--- a/gcc/testsuite/gcc.dg/torture/pr91211.c 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ b/gcc/testsuite/gcc.dg/torture/pr91211.c 2020-09-15 20:52:43.932000000 +0800
|
||||
@@ -0,0 +1,19 @@
|
||||
+/* { dg-do run } */
|
||||
+
|
||||
+typedef __UINT32_TYPE__ u32;
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ u32 b = 0x027C5902;
|
||||
+ u32 a = 0;
|
||||
+ __builtin_memset (1 + (char *) &b, 0, 2);
|
||||
+ __builtin_memcpy (&a, 2 + (char *) &b, 2);
|
||||
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
+ if (a != 0x00000200)
|
||||
+#else
|
||||
+ if (a != 0x00020000)
|
||||
+#endif
|
||||
+ __builtin_abort();
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Nurp a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
|
||||
--- a/gcc/tree-ssa-sccvn.c 2020-09-14 16:44:05.476000000 +0800
|
||||
+++ b/gcc/tree-ssa-sccvn.c 2020-09-16 09:29:22.520000000 +0800
|
||||
@@ -1840,12 +1840,15 @@ vn_walk_cb_data::push_partial_def (const
|
||||
if (TREE_CODE (pd.rhs) == CONSTRUCTOR)
|
||||
/* Empty CONSTRUCTOR. */
|
||||
memset (buffer + MAX (0, pd.offset),
|
||||
- 0, MIN ((HOST_WIDE_INT)sizeof (buffer), pd.size));
|
||||
+ 0, MIN ((HOST_WIDE_INT)sizeof (buffer)
|
||||
+ - MAX (0, pd.offset),
|
||||
+ pd.size + MIN (0, pd.offset)));
|
||||
else
|
||||
{
|
||||
len = native_encode_expr (pd.rhs,
|
||||
buffer + MAX (0, pd.offset),
|
||||
- sizeof (buffer - MAX (0, pd.offset)),
|
||||
+ sizeof (buffer)
|
||||
+ - MAX (0, pd.offset),
|
||||
MAX (0, -pd.offset));
|
||||
if (len <= 0
|
||||
|| len < (pd.size - MAX (0, -pd.offset)))
|
||||
@@ -2461,7 +2464,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree
|
||||
{
|
||||
pd_data pd;
|
||||
pd.rhs = build_constructor (NULL_TREE, NULL);
|
||||
- pd.offset = offset2i - offseti;
|
||||
+ pd.offset = (offset2i - offseti) / BITS_PER_UNIT;
|
||||
pd.size = leni;
|
||||
return data->push_partial_def (pd, vuse, maxsizei);
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
diff -Nurp a/gcc/fold-const.c b/gcc/fold-const.c
|
||||
--- a/gcc/fold-const.c 2020-06-16 22:27:46.116000000 -0400
|
||||
+++ b/gcc/fold-const.c 2020-06-16 22:27:58.412000000 -0400
|
||||
--- a/gcc/fold-const.c 2020-09-17 02:26:36.900000000 -0400
|
||||
+++ b/gcc/fold-const.c 2020-09-17 02:27:57.368000000 -0400
|
||||
@@ -7165,15 +7165,9 @@ fold_plusminus_mult_expr (location_t loc
|
||||
increased the number of multiplications necessary. */
|
||||
&& TREE_CODE (arg10) != INTEGER_CST)
|
||||
@ -20,9 +20,9 @@ diff -Nurp a/gcc/fold-const.c b/gcc/fold-const.c
|
||||
same = maybe_same;
|
||||
if (swap)
|
||||
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-06-16 22:27:46.116000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-06-16 22:33:18.968000000 -0400
|
||||
@@ -112,6 +112,23 @@ is_va_list_type (tree type)
|
||||
--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-09-17 02:26:36.900000000 -0400
|
||||
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c 2020-09-17 02:34:04.040000000 -0400
|
||||
@@ -112,6 +112,29 @@ is_va_list_type (tree type)
|
||||
return TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (va_list_type_node);
|
||||
}
|
||||
|
||||
@ -30,6 +30,12 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
+get_type_name (tree type)
|
||||
+{
|
||||
+ const char *tname = NULL;
|
||||
+
|
||||
+ if (type == NULL)
|
||||
+ {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (TYPE_NAME (type) != NULL)
|
||||
+ {
|
||||
+ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
|
||||
@ -46,12 +52,12 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
|
||||
/* Return the inner most type for arrays and pointers of TYPE. */
|
||||
|
||||
@@ -463,10 +480,10 @@ srtype::analyze (void)
|
||||
@@ -463,10 +486,10 @@ srtype::analyze (void)
|
||||
if (fields.length () == 2)
|
||||
fields[1]->clusternum = 1;
|
||||
|
||||
- /* REMOVEME: FIXME: this is here for testing more testcases. */
|
||||
+ /* FIXME: Currently Return. */
|
||||
+ /* Otherwise we do nothing. */
|
||||
if (fields.length () >= 3)
|
||||
{
|
||||
- fields[1]->clusternum = 1;
|
||||
@ -59,7 +65,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
}
|
||||
}
|
||||
|
||||
@@ -875,6 +892,7 @@ private:
|
||||
@@ -875,6 +898,7 @@ private:
|
||||
void analyze_types (void);
|
||||
void clear_visited (void);
|
||||
bool create_new_types (void);
|
||||
@ -67,7 +73,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
void create_new_decls (void);
|
||||
srdecl *find_decl (tree);
|
||||
void create_new_functions (void);
|
||||
@@ -1096,6 +1114,11 @@ ipa_struct_reorg::record_type (tree type
|
||||
@@ -1096,6 +1120,11 @@ ipa_struct_reorg::record_type (tree type
|
||||
{
|
||||
tree t = TREE_TYPE (field);
|
||||
process_union (t);
|
||||
@ -79,7 +85,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
if (isvolatile_type (t))
|
||||
type1->mark_escape (escape_volatile, NULL);
|
||||
escape_type e = escape_type_volatile_array_or_ptrptr (t);
|
||||
@@ -2818,6 +2841,49 @@ ipa_struct_reorg::analyze_types (void)
|
||||
@@ -2818,6 +2847,49 @@ ipa_struct_reorg::analyze_types (void)
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +135,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
/* Create all new types we want to create. */
|
||||
|
||||
bool
|
||||
@@ -3669,7 +3735,7 @@ ipa_struct_reorg::rewrite_functions (voi
|
||||
@@ -3669,7 +3741,7 @@ ipa_struct_reorg::rewrite_functions (voi
|
||||
{
|
||||
unsigned retval = 0;
|
||||
|
||||
@ -139,7 +145,7 @@ diff -Nurp a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-
|
||||
then don't rewrite any accesses. */
|
||||
if (!create_new_types ())
|
||||
diff -Nurp a/gcc/testsuite/gcc.c-torture/compile/20170404-1.c b/gcc/testsuite/gcc.c-torture/compile/20170404-1.c
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20170404-1.c 2020-06-16 22:27:46.120000000 -0400
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20170404-1.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.c-torture/compile/20170404-1.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1,19 +0,0 @@
|
||||
-struct a
|
||||
@ -162,15 +168,15 @@ diff -Nurp a/gcc/testsuite/gcc.c-torture/compile/20170404-1.c b/gcc/testsuite/gc
|
||||
- return b->t;
|
||||
-}
|
||||
diff -Nurp a/gcc/testsuite/gcc.c-torture/compile/nested-3.c b/gcc/testsuite/gcc.c-torture/compile/nested-3.c
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/nested-3.c 2020-06-16 22:27:46.120000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.c-torture/compile/nested-3.c 2020-06-16 22:27:58.416000000 -0400
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/nested-3.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.c-torture/compile/nested-3.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -1,4 +1,3 @@
|
||||
-/* This used to crash Struct reorg. */
|
||||
struct a
|
||||
{
|
||||
int t;
|
||||
diff -Nurp a/gcc/testsuite/gcc.c-torture/compile/struct-reorg-1.c b/gcc/testsuite/gcc.c-torture/compile/struct-reorg-1.c
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/struct-reorg-1.c 2020-06-16 22:27:46.120000000 -0400
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/struct-reorg-1.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.c-torture/compile/struct-reorg-1.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1,18 +0,0 @@
|
||||
-#include <stdlib.h>
|
||||
@ -192,7 +198,7 @@ diff -Nurp a/gcc/testsuite/gcc.c-torture/compile/struct-reorg-1.c b/gcc/testsuit
|
||||
- * sizeof (compile_stack_elt_t));
|
||||
-}
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/pr33136-4.c b/gcc/testsuite/gcc.dg/pr33136-4.c
|
||||
--- a/gcc/testsuite/gcc.dg/pr33136-4.c 2020-06-16 22:27:46.120000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/pr33136-4.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/pr33136-4.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1,59 +0,0 @@
|
||||
-/* PR tree-optimization/33136 */
|
||||
@ -256,7 +262,7 @@ diff -Nurp a/gcc/testsuite/gcc.dg/pr33136-4.c b/gcc/testsuite/gcc.dg/pr33136-4.c
|
||||
-}
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-1.c b/gcc/testsuite/gcc.dg/struct/struct_reorg-1.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/struct_reorg-1.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-1.c 2020-06-16 22:27:58.436000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-1.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -0,0 +1,24 @@
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O3 -flto-partition=one -fipa-struct-reorg -fdump-ipa-all" }
|
||||
@ -284,7 +290,7 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-1.c b/gcc/testsuite/gcc.dg
|
||||
+/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-2.c b/gcc/testsuite/gcc.dg/struct/struct_reorg-2.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/struct_reorg-2.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-2.c 2020-06-16 22:27:58.440000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-2.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -0,0 +1,29 @@
|
||||
+// { dg-do run }
|
||||
+
|
||||
@ -317,7 +323,7 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-2.c b/gcc/testsuite/gcc.dg
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 2" "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-3.c b/gcc/testsuite/gcc.dg/struct/struct_reorg-3.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/struct_reorg-3.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-3.c 2020-06-16 22:27:58.440000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-3.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -0,0 +1,23 @@
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O3 -flto-partition=one -fipa-struct-reorg -fdump-ipa-all" }
|
||||
@ -344,7 +350,7 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-3.c b/gcc/testsuite/gcc.dg
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-4.c b/gcc/testsuite/gcc.dg/struct/struct_reorg-4.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/struct_reorg-4.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-4.c 2020-06-16 22:27:58.440000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct_reorg-4.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -0,0 +1,59 @@
|
||||
+/* { dg-do run } */
|
||||
+
|
||||
@ -406,8 +412,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct_reorg-4.c b/gcc/testsuite/gcc.dg
|
||||
+
|
||||
+/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct-reorg.exp b/gcc/testsuite/gcc.dg/struct/struct-reorg.exp
|
||||
--- a/gcc/testsuite/gcc.dg/struct/struct-reorg.exp 2020-06-16 22:27:46.120000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct-reorg.exp 2020-06-16 22:27:58.440000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/struct-reorg.exp 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/struct-reorg.exp 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -1,5 +1,4 @@
|
||||
-# Copyright (C) 2007, 2008, 2009, 2010
|
||||
-# Free Software Foundation, Inc.
|
||||
@ -500,8 +506,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/struct-reorg.exp b/gcc/testsuite/gcc.dg
|
||||
-}
|
||||
+dg-finish
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c 2020-06-16 22:27:46.120000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c 2020-06-16 22:27:58.440000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -28,4 +28,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -509,8 +515,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_str_init.c b/gcc/testsui
|
||||
-/* { dg-final { scan-ipa-dump "has escaped...Type is used in an array" "struct_reorg" } } */
|
||||
+/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c b/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c 2020-06-16 22:27:46.120000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c 2020-06-16 22:27:58.440000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -38,5 +38,5 @@ main ()
|
||||
}
|
||||
|
||||
@ -520,8 +526,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c b/gcc/test
|
||||
+/* Two more fields structure is not splitted. */
|
||||
+/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c b/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c 2020-06-16 22:27:46.120000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c 2020-06-16 22:27:58.440000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c 2020-09-17 02:26:36.904000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -26,4 +26,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -529,8 +535,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_global_array.c b/gcc/testsuite/g
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" { xfail *-*-* } } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" { xfail *-*-* } } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c b/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c 2020-06-16 22:27:46.120000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c 2020-06-16 22:27:58.440000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -39,4 +39,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -538,8 +544,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c b/gcc/testsuite/gcc
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c b/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c 2020-06-16 22:27:46.124000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c 2020-06-16 22:27:58.472000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -34,4 +34,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -547,8 +553,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c b/gcc/testsuite/gc
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" { xfail *-*-* } } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" { xfail *-*-* } } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c b/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c 2020-06-16 22:27:46.124000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c 2020-06-16 22:27:58.472000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -37,4 +37,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -556,8 +562,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c b/gcc/testsuite/gcc.
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c b/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c 2020-06-16 22:27:46.124000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c 2020-06-16 22:27:58.472000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -28,4 +28,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -565,8 +571,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c b/gcc/testsu
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c b/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c 2020-06-16 22:27:46.124000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c 2020-06-16 22:27:58.472000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -61,4 +61,4 @@ main ()
|
||||
}
|
||||
|
||||
@ -574,8 +580,8 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c b/gcc/testsuite/gcc.d
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 2" "struct_reorg" } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 2" "struct_reorg" } } */
|
||||
diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c b/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c 2020-06-16 22:27:46.124000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c 2020-06-16 22:27:58.472000000 -0400
|
||||
--- a/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c 2020-09-17 02:27:57.372000000 -0400
|
||||
@@ -40,4 +40,4 @@ main ()
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@ -583,7 +589,7 @@ diff -Nurp a/gcc/testsuite/gcc.dg/struct/w_ratio_cold_str.c b/gcc/testsuite/gcc.
|
||||
-/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" { xfail *-*-* } } } */
|
||||
+/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "struct_reorg" { xfail *-*-* } } } */
|
||||
diff -Nurp a/gcc/testsuite/g++.dg/torture/pr38355.C b/gcc/testsuite/g++.dg/torture/pr38355.C
|
||||
--- a/gcc/testsuite/g++.dg/torture/pr38355.C 2020-06-16 22:27:46.124000000 -0400
|
||||
--- a/gcc/testsuite/g++.dg/torture/pr38355.C 2020-09-17 02:26:36.908000000 -0400
|
||||
+++ b/gcc/testsuite/g++.dg/torture/pr38355.C 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1,25 +0,0 @@
|
||||
-// { dg-do run }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user