!536 [Sync] Sync patches from openEuler/gcc
From: @wumingchuan Reviewed-by: @li-yancheng Signed-off-by: @li-yancheng
This commit is contained in:
commit
d5a755a47d
90
0329-Fixed-work-with-loops-in-process_complex_cond.patch
Normal file
90
0329-Fixed-work-with-loops-in-process_complex_cond.patch
Normal 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
|
||||
|
||||
25
0330-bugfix-fix-typo-error.patch
Normal file
25
0330-bugfix-fix-typo-error.patch
Normal 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
|
||||
|
||||
12
gcc.spec
12
gcc.spec
@ -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 61
|
||||
%global gcc_release 62
|
||||
|
||||
%global _unpackaged_files_terminate_build 0
|
||||
%global _performance_build 1
|
||||
@ -434,6 +434,8 @@ 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
|
||||
|
||||
# Part 1001-1999
|
||||
%ifarch sw_64
|
||||
@ -1548,6 +1550,8 @@ not stable, so plugins must be rebuilt any time GCC is updated.
|
||||
%patch -P326 -p1
|
||||
%patch -P327 -p1
|
||||
%patch -P328 -p1
|
||||
%patch -P329 -p1
|
||||
%patch -P330 -p1
|
||||
|
||||
%ifarch sw_64
|
||||
%patch -P1001 -p1
|
||||
@ -4171,6 +4175,12 @@ end
|
||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user