Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
45baac3cbe
!537 fix: function missing return value
From: @rfwang07 
Reviewed-by: @li-yancheng, @xiongzhou4 
Signed-off-by: @li-yancheng, @xiongzhou4
2025-01-23 12:40:43 +00:00
rfwang07
ba97a2e89b fix: function missing return value 2024-12-21 18:37:39 +08:00
openeuler-ci-bot
d5a755a47d
!536 [Sync] Sync patches from openEuler/gcc
From: @wumingchuan 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-12-18 07:26:56 +00:00
Mingchuan Wu
4b4bd247d2 [sync] Sync patches from openeuler/gcc. 2024-12-18 14:18:31 +08:00
openeuler-ci-bot
59b84c63c7
!534 [Bugfix] if-split Added checking for ssa_name
From: @huzife 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-12-16 13:37:13 +00:00
huangzifeng
28e2cb5f31 [Bugfix] if-split Added checking for ssa_name 2024-12-16 20:10:24 +08:00
openeuler-ci-bot
b3c94890ef
!532 [Bugfix] Adjust the same gate to use struct option
From: @huang-xiaoquan 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-12-16 11:46:25 +00:00
huang-xiaoquan
f14abd9e8f [Bugfix] Adjust the same gate to use struct option. 2024-12-16 14:56:07 +08:00
openeuler-ci-bot
89ad5ae069
!529 [Sync] Sync patch from openeuler/gcc
From: @zhenyu--zhao_admin 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-12-11 08:19:38 +00:00
zhenyu--zhao_admin
56d5fcee2a [Sync] sync patches from openeuler/gcc. 2024-12-11 15:00:53 +08:00
9 changed files with 1629 additions and 2 deletions

View File

@ -0,0 +1,52 @@
From 8f5c12954adb237685c837cb37c98b7594e9fa61 Mon Sep 17 00:00:00 2001
From: Mingchuan Wu <wumingchuan1992@foxmail.com>
Date: Tue, 10 Dec 2024 15:50:16 +0800
Subject: [PATCH] [bugfix] fix vector costs for hip09.
---
gcc/config/aarch64/aarch64-cost-tables.h | 6 +++++-
gcc/config/aarch64/aarch64.cc | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-cost-tables.h b/gcc/config/aarch64/aarch64-cost-tables.h
index dc51d9c2c..06da1b271 100644
--- a/gcc/config/aarch64/aarch64-cost-tables.h
+++ b/gcc/config/aarch64/aarch64-cost-tables.h
@@ -872,7 +872,11 @@ const struct cpu_cost_table hip09_extra_costs =
},
/* Vector */
{
- COSTS_N_INSNS (1) /* alu. */
+ COSTS_N_INSNS (1), /* alu. */
+ COSTS_N_INSNS (4), /* mult. */
+ COSTS_N_INSNS (1), /* movi. */
+ COSTS_N_INSNS (2), /* dup. */
+ COSTS_N_INSNS (2) /* extract. */
}
};
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 829e0da8f..f2444a039 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -499,6 +499,8 @@ static const struct cpu_addrcost_table hip09_addrcost_table =
},
0, /* pre_modify */
0, /* post_modify */
+ 0, /* post_modify_ld3_st3 */
+ 0, /* post_modify_ld4_st4 */
0, /* register_offset */
1, /* register_sextend */
1, /* register_zextend */
@@ -1910,7 +1912,7 @@ static const struct tune_params hip09_tunings =
&hip09_extra_costs,
&hip09_addrcost_table,
&hip09_regmove_cost,
- &hip09_vector_cost,
+ &generic_vector_cost,
&generic_branch_cost,
&generic_approx_modes,
SVE_256, /* sve_width */
--
2.33.0

View File

@ -0,0 +1,54 @@
From 14457b169e1e4cb372d165de3bbdde391e8b817f Mon Sep 17 00:00:00 2001
From: YunQiang Su <yunqiang@isrc.iscas.ac.cn>
Date: Tue, 8 Oct 2024 18:04:01 +0800
Subject: [PATCH] gcc/opts-common.cc: Fix build with clang
1. For putenv ("AI_INFER_LEVEL=1"), clang complains that C++11 deprecates
convert string literal to char *, while putenv expcets "char *".
Let's use setenv, which expects "const char *".
2. Ditto for char *lan in handle_lto_option.
3. In `handle_machine_option`, there is a variable length array,
int64_t argv_hw[argc_hw]
clang complains about it, and in fact, argc_hw can be an const var.
---
gcc/opts-common.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc
index 12c3f7299..33c696f3d 100644
--- a/gcc/opts-common.cc
+++ b/gcc/opts-common.cc
@@ -1053,7 +1053,7 @@ ai_infer_optimization (int argc, const char **argv,
dlclose (onnxruntime_lib_handle);
if (model_pred == 1)
- putenv ("AI_INFER_LEVEL=1");
+ setenv ("AI_INFER_LEVEL", "1", 1);
return model_pred;
}
@@ -1065,9 +1065,8 @@ handle_lto_option (unsigned int lang_mask,
struct cl_decoded_option *&opt_array)
{
int ret = 0;
- char *lan = "";
char *compiler = xstrdup (argv[0]);
- lan = strrchr (compiler, '/');
+ char *lan = strrchr (compiler, '/');
if (lan != NULL)
lan ++;
else
@@ -1125,7 +1124,7 @@ handle_machine_option (unsigned int lang_mask,
{
return ret;
}
- int argc_hw = 6;
+ const int argc_hw = 6;
int64_t argv_hw[argc_hw] = {
global_options.x_param_simultaneous_prefetches,
global_options.x_param_l1_cache_size,
--
2.33.0

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,81 @@
From 861ddfd90d86215a573a7614f49d572f1e03be6f Mon Sep 17 00:00:00 2001
From: huang-xiaoquan <huangxiaoquan1@huawei.com>
Date: Mon, 16 Dec 2024 11:34:06 +0800
Subject: [PATCH] [Bugfix] Adjust the same gate to use struct option
---
gcc/gimple-ssa-warn-access.cc | 7 ++++++-
gcc/ipa-free-lang-data.cc | 5 +++--
gcc/symbol-summary.h | 8 +++++++-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc
index a24645783..3d80590ee 100644
--- a/gcc/gimple-ssa-warn-access.cc
+++ b/gcc/gimple-ssa-warn-access.cc
@@ -56,6 +56,9 @@
#include "attr-fnspec.h"
#include "pointer-query.h"
+/* Check whether in C language or LTO with only C language. */
+extern bool lang_c_p (void);
+
/* Return true if tree node X has an associated location. */
static inline location_t
@@ -2198,7 +2201,9 @@ pass_waccess::gate (function *)
In pass waccess, it will traverse all SSA and cause ICE
when handling these unused SSA. So temporarily disable
pass waccess when enable structure optimizations. */
- if (flag_ipa_struct_reorg)
+ if (optimize >= 3 && flag_ipa_struct_reorg && !seen_error ()
+ && flag_lto_partition == LTO_PARTITION_ONE && lang_c_p ()
+ && (in_lto_p || flag_whole_program))
return false;
return (warn_free_nonheap_object
diff --git a/gcc/ipa-free-lang-data.cc b/gcc/ipa-free-lang-data.cc
index 801e95cea..17e3f43b3 100644
--- a/gcc/ipa-free-lang-data.cc
+++ b/gcc/ipa-free-lang-data.cc
@@ -108,8 +108,9 @@ fld_simplified_type_name (tree type)
/* Simplify type will cause that struct A and struct A within
struct B are different type pointers, so skip it in structure
optimizations. */
- if (flag_ipa_struct_reorg && lang_c_p ()
- && flag_lto_partition == LTO_PARTITION_ONE)
+ if (optimize >= 3 && flag_ipa_struct_reorg && !seen_error ()
+ && flag_lto_partition == LTO_PARTITION_ONE && lang_c_p ()
+ && (in_lto_p || flag_whole_program))
return TYPE_NAME (type);
if (!TYPE_NAME (type) || TREE_CODE (TYPE_NAME (type)) != TYPE_DECL)
diff --git a/gcc/symbol-summary.h b/gcc/symbol-summary.h
index 4f896f4e4..06a1c7fff 100644
--- a/gcc/symbol-summary.h
+++ b/gcc/symbol-summary.h
@@ -21,6 +21,10 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_SYMBOL_SUMMARY_H
#define GCC_SYMBOL_SUMMARY_H
+#include "diagnostic.h"
+/* Check whether in C language or LTO with only C language. */
+extern bool lang_c_p (void);
+
/* Base class for function_summary and fast_function_summary classes. */
template <class T>
@@ -109,7 +113,9 @@ protected:
: m_allocator.allocate ();
/* In structure optimizatons, we call memset to ensure that
the allocated memory is initialized to 0. */
- if (flag_ipa_struct_reorg)
+ if (optimize >= 3 && flag_ipa_struct_reorg && !seen_error ()
+ && flag_lto_partition == LTO_PARTITION_ONE && lang_c_p ()
+ && (in_lto_p || flag_whole_program))
memset (allocated, 0, sizeof (T));
return allocated;
}
--
2.33.0

View File

@ -0,0 +1,248 @@
From e2896c73513cfb2dfd7c4796effef6ba06396f35 Mon Sep 17 00:00:00 2001
From: Zinin Ivan WX1305386 <zinin.ivan@huawei-partners.com>
Date: Fri, 13 Dec 2024 10:52:08 +0300
Subject: [PATCH] [Bugfix][if-split] Added checking for ssa_name
Added checking if part of OR complex condition is really an ssa
name in necessary_complex_cond_p(). Besides, made var_n_cst
structure, which replaced var_cst and cond_parts_defs structures.
---
gcc/gimple-if-split.cc | 123 +++++++++++++++++++----------------------
1 file changed, 56 insertions(+), 67 deletions(-)
diff --git a/gcc/gimple-if-split.cc b/gcc/gimple-if-split.cc
index 351515435..914b65d47 100644
--- a/gcc/gimple-if-split.cc
+++ b/gcc/gimple-if-split.cc
@@ -61,14 +61,14 @@ Example:
//-------------------------------------------------------------------------
/* Check if arg list of call got n. */
bool
-got_in_args_p (gimple* call, tree n)
+got_in_args_p (gimple *call, tree n)
{
unsigned num_args = gimple_call_num_args (call);
for (int i = 0; i < num_args; i++)
{
if (n == gimple_call_arg (call, i))
- return true;
+ return true;
}
return false;
@@ -142,19 +142,24 @@ bb_got_necessary_call_p (basic_block bb, tree n, unsigned nesting)
//-------------------------------------------------------------------------
// Complex conditions
//-------------------------------------------------------------------------
-/* Auxiliary struct which contains var and its constant of comaprison
- * of expr: n == cst. */
-struct var_const
+/* Auxiliary struct which contains tree nodes of such statements:
+ * var = (n == cst). Actually in some cases var field can be not an ssa
+ * name and/or it's rhs can be not "comparison with constant"
+ * expression. However, we need to fill var field of such structures
+ * in necessary_complex_cond_p () to build/change conditions in
+ * process_complex_cond (). */
+struct var_n_const
{
+ tree var = NULL_TREE;
tree n = NULL_TREE;
tree cst = NULL_TREE;
};
/* Check if var_def stmt got this pattern:
* var = (n == const);
- * If it does, we need to set var_cst struct. */
+ * If it does, we need to set n and cst in var_n_cst struct. */
static bool
-comp_with_const_p (gimple *var_def, var_const *var_cst)
+comp_with_const_p (gimple *var_def, var_n_const *var_n_cst)
{
if (gimple_expr_code (var_def) != EQ_EXPR)
return false;
@@ -164,33 +169,24 @@ comp_with_const_p (gimple *var_def, var_const *var_cst)
if (TREE_CODE (var_def_rhs2) != INTEGER_CST)
return false;
- var_cst->n = gimple_assign_rhs1 (var_def);
- var_cst->cst = var_def_rhs2;
+ var_n_cst->n = gimple_assign_rhs1 (var_def);
+ var_n_cst->cst = var_def_rhs2;
return true;
}
-/* Auxiliary struct which contains defenition of each part of
- * complex condition, like:
- * a = ... <- a_def
- * b = ... <- b_def
- * c = a | b <- complex_cond. */
-struct cond_parts_defs
-{
- gimple *a_def = NULL;
- gimple *b_def = NULL;
-};
-
/* Check if cond got this pattern:
* a = ...; <- a_def
* b = ...; <- b_def
- * c = a | b;
+ * c = a | b; <- c_def
* if (c != 0)
- * and a_def or b_def is comparison with constant. If it does,
- * we need to set a with a_def and b with b_def. */
+ * and a_def or b_def is comparison with constant.
+ * If it does, we need to set a_var_n_cst and b_var_n_cst.
+ * Also set a_var_n_cst->var as gimple_assign_rhs1 (c_def),
+ * b_var_n_cst->var as gimple_assign_rhs2 (c_def). */
static bool
necessary_complex_cond_p (const gimple *cond, basic_block then_bb,
- cond_parts_defs *defs)
+ var_n_const *a_var_n_cst, var_n_const *b_var_n_cst)
{
tree lhs = gimple_cond_lhs (cond);
tree rhs = gimple_cond_rhs (cond);
@@ -207,27 +203,25 @@ necessary_complex_cond_p (const gimple *cond, basic_block then_bb,
|| gimple_expr_code (c_def) != BIT_IOR_EXPR)
return false;
- tree a_var = gimple_assign_rhs1 (c_def);
- tree b_var = gimple_assign_rhs2 (c_def);
- gimple *a_def = SSA_NAME_DEF_STMT (a_var);
- gimple *b_def = SSA_NAME_DEF_STMT (b_var);
-
- if (!a_def || !is_gimple_assign (a_def) || !b_def
- || !is_gimple_assign (b_def))
- return false;
-
- var_const var_cst;
-
- if (!(comp_with_const_p (a_def, &var_cst)
- && bb_got_necessary_call_p (then_bb, var_cst.n, SCALAR_NESTING))
- && !(comp_with_const_p (b_def, &var_cst)
- && bb_got_necessary_call_p (then_bb, var_cst.n, SCALAR_NESTING)))
- return false;
-
- defs->a_def = a_def;
- defs->b_def = b_def;
-
- return true;
+ bool result = false;
+
+ gimple *a_def;
+ a_var_n_cst->var = gimple_assign_rhs1 (c_def);
+ if (TREE_CODE (a_var_n_cst->var) == SSA_NAME
+ && (a_def = SSA_NAME_DEF_STMT (a_var_n_cst->var))
+ && is_gimple_assign (a_def) && comp_with_const_p (a_def, a_var_n_cst)
+ && bb_got_necessary_call_p (then_bb, a_var_n_cst->n, SCALAR_NESTING))
+ result = true;
+
+ gimple *b_def;
+ b_var_n_cst->var = gimple_assign_rhs2 (c_def);
+ if (TREE_CODE (b_var_n_cst->var) == SSA_NAME
+ && (b_def = SSA_NAME_DEF_STMT (b_var_n_cst->var))
+ && is_gimple_assign (b_def) && comp_with_const_p (b_def, b_var_n_cst)
+ && bb_got_necessary_call_p (then_bb, b_var_n_cst->n, SCALAR_NESTING))
+ result = true;
+
+ return result;
}
/* Check if our complex condition seems to be "necessary"
@@ -253,11 +247,10 @@ process_complex_cond (basic_block cond_bb, basic_block then_bb,
basic_block else_bb)
{
gimple *cond = last_stmt (cond_bb);
- cond_parts_defs defs;
+ var_n_const a_var_n_cst, b_var_n_cst;
- if (!can_duplicate_block_p (then_bb)
- || !single_succ_p (then_bb)
- || !necessary_complex_cond_p (cond, then_bb, &defs))
+ if (!can_duplicate_block_p (then_bb) || !single_succ_p (then_bb)
+ || !necessary_complex_cond_p (cond, then_bb, &a_var_n_cst, &b_var_n_cst))
return;
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -267,19 +260,16 @@ process_complex_cond (basic_block cond_bb, basic_block then_bb,
print_gimple_stmt (dump_file, cond, 0, TDF_NONE);
}
- var_const var_cst;
-
/* Setting cond. */
- if (comp_with_const_p (defs.a_def, &var_cst))
- /* Setting cond as: if (n == const). */
- gimple_cond_set_condition (as_a<gcond *> (cond), EQ_EXPR, var_cst.n,
- var_cst.cst);
+ if (a_var_n_cst.n != NULL_TREE && a_var_n_cst.cst != NULL_TREE)
+ /* Setting cond as: if (n == const). */
+ gimple_cond_set_condition (as_a<gcond *> (cond), EQ_EXPR, a_var_n_cst.n,
+ a_var_n_cst.cst);
else
{
/* Setting cond as: if (a != 0). */
- tree cond_lhs = gimple_assign_lhs (defs.a_def);
- gimple_cond_set_condition (as_a<gcond *> (cond), NE_EXPR, cond_lhs,
- build_zero_cst (TREE_TYPE (cond_lhs)));
+ gimple_cond_set_condition (as_a<gcond *> (cond), NE_EXPR, a_var_n_cst.var,
+ build_zero_cst (TREE_TYPE (a_var_n_cst.var)));
}
update_stmt (cond);
@@ -290,19 +280,18 @@ process_complex_cond (basic_block cond_bb, basic_block then_bb,
/* Setting inner_cond. */
gcond *inner_cond = NULL;
- if (comp_with_const_p (defs.b_def, &var_cst))
+ if (b_var_n_cst.n != NULL_TREE && b_var_n_cst.cst != NULL_TREE)
{
- /* Setting inner cond as: if (b == const). */
- inner_cond = gimple_build_cond (EQ_EXPR, var_cst.n, var_cst.cst,
+ /* Setting inner cond as: if (n == const). */
+ inner_cond = gimple_build_cond (EQ_EXPR, b_var_n_cst.n, b_var_n_cst.cst,
NULL_TREE, NULL_TREE);
}
else
{
/* Setting inner cond as: if (b != 0). */
- tree inner_cond_lhs = gimple_assign_lhs (defs.b_def);
inner_cond = gimple_build_cond (
- NE_EXPR, inner_cond_lhs, build_zero_cst (TREE_TYPE (inner_cond_lhs)),
- NULL_TREE, NULL_TREE);
+ NE_EXPR, b_var_n_cst.var,
+ build_zero_cst (TREE_TYPE (b_var_n_cst.var)), NULL_TREE, NULL_TREE);
}
gimple_stmt_iterator gsi = gsi_last_bb (inner_cond_bb);
gsi_insert_after (&gsi, inner_cond, GSI_NEW_STMT);
@@ -362,7 +351,7 @@ make_two_separate_calls (basic_block outer_cond_bb, basic_block inner_cond_bb,
if (single_succ (then_bb) == EXIT_BLOCK_PTR_FOR_FN (cfun))
{
gcc_assert (gimple_code (last_stmt (then_bb)) == GIMPLE_RETURN);
- ret_val = gimple_return_retval (as_a<greturn*>(last_stmt (then_bb)));
+ ret_val = gimple_return_retval (as_a<greturn *> (last_stmt (then_bb)));
then_bb_succ_edge_flags = single_succ_edge (then_bb)->flags;
}
@@ -373,7 +362,7 @@ make_two_separate_calls (basic_block outer_cond_bb, basic_block inner_cond_bb,
* if now merge_bb is pred of EXIT_BLOCK. */
if (single_succ (merge_bb) == EXIT_BLOCK_PTR_FOR_FN (cfun))
{
- gimple* ret = gimple_build_return (ret_val);
+ gimple *ret = gimple_build_return (ret_val);
gimple_stmt_iterator gsi = gsi_last_bb (merge_bb);
gsi_insert_after (&gsi, ret, GSI_NEW_STMT);
@@ -400,7 +389,7 @@ make_two_separate_calls (basic_block outer_cond_bb, basic_block inner_cond_bb,
single_succ (merge_bb));
if (get_immediate_dominator (CDI_POST_DOMINATORS, outer_cond_bb) == then_bb)
- set_immediate_dominator (CDI_POST_DOMINATORS, outer_cond_bb, merge_bb);
+ set_immediate_dominator (CDI_POST_DOMINATORS, outer_cond_bb, merge_bb);
return then_bb1;
}
--
2.33.0

View File

@ -0,0 +1,90 @@
From 66e1c68b47a1fd889e206be5572a2ba5d62afb4d Mon Sep 17 00:00:00 2001
From: Zinin Ivan WX1305386 <zinin.ivan@huawei-partners.com>
Date: Tue, 17 Dec 2024 22:07:36 +0800
Subject: [PATCH] [if-split][BugFix]Fixed work with loops in
process_complex_cond()
Signed-off-by: zhenyu--zhao_admin <zhaozhenyu17@huawei.com>
---
gcc/gimple-if-split.cc | 17 +++++++++++++++--
gcc/tree-loop-distribution.cc | 6 ++++++
gcc/tree-vect-loop.cc | 4 ----
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/gcc/gimple-if-split.cc b/gcc/gimple-if-split.cc
index 914b65d4782..b535ffab1c3 100644
--- a/gcc/gimple-if-split.cc
+++ b/gcc/gimple-if-split.cc
@@ -262,9 +262,11 @@ process_complex_cond (basic_block cond_bb, basic_block then_bb,
/* Setting cond. */
if (a_var_n_cst.n != NULL_TREE && a_var_n_cst.cst != NULL_TREE)
- /* Setting cond as: if (n == const). */
- gimple_cond_set_condition (as_a<gcond *> (cond), EQ_EXPR, a_var_n_cst.n,
+ {
+ /* Setting cond as: if (n == const). */
+ gimple_cond_set_condition (as_a<gcond *> (cond), EQ_EXPR, a_var_n_cst.n,
a_var_n_cst.cst);
+ }
else
{
/* Setting cond as: if (a != 0). */
@@ -276,8 +278,19 @@ process_complex_cond (basic_block cond_bb, basic_block then_bb,
/* Creating inner_cond_bb. */
edge then_e = find_edge (cond_bb, then_bb);
edge else_e = find_edge (cond_bb, else_bb);
+
+ bool inner_cond_bb_need_set_loop = false;
+ if (else_e->dest->loop_father != else_e->src->loop_father)
+ inner_cond_bb_need_set_loop = true;
+
basic_block inner_cond_bb = split_edge (else_e);
+ if (inner_cond_bb_need_set_loop)
+ {
+ remove_bb_from_loops (inner_cond_bb);
+ add_bb_to_loop (inner_cond_bb, cond_bb->loop_father);
+ }
+
/* Setting inner_cond. */
gcond *inner_cond = NULL;
if (b_var_n_cst.n != NULL_TREE && b_var_n_cst.cst != NULL_TREE)
diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc
index 8d118e98739..f7a4690246c 100644
--- a/gcc/tree-loop-distribution.cc
+++ b/gcc/tree-loop-distribution.cc
@@ -5265,10 +5265,16 @@ loop_distribution::execute (function *fun)
bool destroy_p;
int nb_generated_loops, nb_generated_calls;
+
+ vect_slp_init ();
+
nb_generated_loops
= distribute_loop (loop, work_list, cd, &nb_generated_calls,
&destroy_p, (!optimize_loop_for_speed_p (loop)
|| !flag_tree_loop_distribution));
+
+ vect_slp_fini ();
+
if (destroy_p)
loops_to_be_destroyed.safe_push (loop);
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index f296e9415c4..7f75779519a 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -3016,10 +3016,6 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared,
opt_loop_vec_info first_loop_vinfo = opt_loop_vec_info::success (NULL);
/* Loop_vinfo for loop-distribution pass. */
opt_loop_vec_info fail_loop_vinfo = opt_loop_vec_info::success (NULL);
- if (result_only_p)
- {
- vect_slp_init ();
- }
unsigned int mode_i = 0;
unsigned HOST_WIDE_INT simdlen = loop->simdlen;
--
Gitee

View File

@ -0,0 +1,25 @@
From 843b7577b5b255806978f338f6f99863693509d6 Mon Sep 17 00:00:00 2001
From: Mingchuan Wu <wumingchuan1992@foxmail.com>
Date: Wed, 18 Dec 2024 10:10:30 +0800
Subject: [PATCH] [bugfix] fix typo error.
---
gcc/opts-common.cc | 2 --
1 file changed, 2 deletions(-)
diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc
index 35db76b84..ee94723fc 100644
--- a/gcc/opts-common.cc
+++ b/gcc/opts-common.cc
@@ -1070,8 +1070,6 @@ handle_machine_option (unsigned int lang_mask,
global_options.x_param_ipa_prefetch_distance_factor};
int64_t output_pred = get_optimize_decision_from_optimizer (
argc, argv, "hip09", argc_hw, argv_hw);
- if (output_pred == 1)
- return output_pred;
if (output_pred != 1)
return ret;
--
2.33.0

View File

@ -0,0 +1,25 @@
From 8d8dff2b18de8149b4f9f03968abd1b6f4b8cc69 Mon Sep 17 00:00:00 2001
From: rfwang07 <wangrufeng5@huawei.com>
Date: Sat, 21 Dec 2024 18:29:10 +0800
Subject: [PATCH] fix: function missing return value
---
gcc/final.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/final.cc b/gcc/final.cc
index e4bfceabc..0252250ba 100644
--- a/gcc/final.cc
+++ b/gcc/final.cc
@@ -4443,7 +4443,7 @@ dump_direct_callee_info_to_asm (basic_block bb, gcov_type call_count)
}
/* Dump the edge info into asm. */
-static int
+static void
dump_edge_jump_info_to_asm (basic_block bb, gcov_type bb_count)
{
edge e;
--
2.39.5 (Apple Git-154)

View File

@ -2,7 +2,7 @@
%global gcc_major 12
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 58
%global gcc_release 63
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
@ -429,6 +429,14 @@ Patch320: 0320-if-split-fix-bugs.patch
Patch321: 0321-Struct-reorg-Avoid-doing-struct-split-and-reorder_fi.patch
Patch322: 0322-Bugfix-Create-POINTER_PLUS_EXPR-for-REFERENCE_TYPE.patch
Patch323: 0323-Bugfix-replace-tmp-pattern-split.patch
Patch324: 0324-bugfix-fix-vector-costs-for-hip09.patch
Patch325: 0325-gcc-opts-common.cc-Fix-build-with-clang.patch
Patch326: 0326-BUGFIX-Fix-build-error-on-risv_64.patch
Patch327: 0327-Bugfix-Adjust-the-same-gate-to-use-struct-option.patch
Patch328: 0328-Bugfix-if-split-Added-checking-for-ssa_name.patch
Patch329: 0329-Fixed-work-with-loops-in-process_complex_cond.patch
Patch330: 0330-bugfix-fix-typo-error.patch
Patch331: 0331-fix-function-missing-return-value.patch
# Part 1001-1999
%ifarch sw_64
@ -1538,6 +1546,14 @@ not stable, so plugins must be rebuilt any time GCC is updated.
%patch -P321 -p1
%patch -P322 -p1
%patch -P323 -p1
%patch -P324 -p1
%patch -P325 -p1
%patch -P326 -p1
%patch -P327 -p1
%patch -P328 -p1
%patch -P329 -p1
%patch -P330 -p1
%patch -P331 -p1
%ifarch sw_64
%patch -P1001 -p1
@ -3163,7 +3179,8 @@ end
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto-wrapper
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so*
%{_libdir}/bfd-plugins/liblto_plugin.so
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/onnx.fdata
%{_prefix}/libexec/gcc/onnx.fdata
%{_prefix}/libexec/gcc/optimizer.fdata
%ifarch aarch64
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/libbolt_plugin.so*
%endif
@ -4160,6 +4177,36 @@ end
%doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog
* Sat Dec 21 2024 rfwang07 <wangrufeng5@huawei.com> - 12.3.1-63
- Type:Bugfix
- ID:NA
- SUG:NA
- DESC:Fix function missing return value.
* Wed Dec 18 2024 Mingchuan Wu <wumingchuan1992@foxmail.com> - 12.3.1-62
- Type:Sync
- ID:NA
- SUG:NA
- DESC: Sync patches from openeuler/gcc.
* Mon Dec 16 2024 huzife <634763349@qq.com> - 12.3.1-61
- Type:Bugfix
- ID:NA
- SUG:NA
- DESC:Add checking for ssa_name in if-split
* Mon Dec 16 2024 huang-xiaoquan <huangxiaoquan1@huawei.com> - 12.3.1-60
- Type:Bugfix
- ID:NA
- SUG:NA
- DESC:Adjust the same gate to use struct option.
* Wed Dec 11 2024 Zhenyu Zhao <zhaozhenyu17@huawei.com> - 12.3.1-59
- Type:Sync
- ID:NA
- SUG:NA
- DESC: Sync patches from openeuler/gcc.
* Tue Dec 10 2024 huzife <634763349@qq.com> - 12.3.1-58
- Type:Bugfix
- ID:NA