156 Commits

Author SHA1 Message Date
郑晨卉
a9c5574f8f [Sync] Sync patch from openeuler/gcc 2024-04-12 15:10:59 +08:00
郑晨卉
3ee8545fc2 [Sync] Sync patch from openeuler/gcc 2024-04-11 19:37:37 +08:00
openeuler-ci-bot
5db544f251
!407 [SYNC]Sync patch from openeuler/gcc
From: @zhenyu--zhao_admin 
Reviewed-by: @xiongzhou4 
Signed-off-by: @xiongzhou4
2024-04-11 11:19:12 +00:00
zhenyu--zhao_admin
cda59b581e [SYNC] Sync patch from openeuler/gcc 2024-04-11 16:47:29 +08:00
openeuler-ci-bot
fa340d47b2
!401 SPEC: fix libcc1 file path for LoongArch
From: @ticat-fp 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-04-01 06:27:08 +00:00
ticat_fp
0232b24327 SPEC: fix libcc1 file path for LoongArch
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
2024-04-01 10:40:11 +08:00
openeuler-ci-bot
1dc8dd9fd8
!400 LoongArch: Sync patch from gcc upstream
From: @ticat-fp 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-03-28 01:42:52 +00:00
ticat_fp
7e7be47bfd LoongArch: Sync patch from gcc upstream
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
2024-03-27 09:22:13 +08:00
openeuler-ci-bot
18582a2742
!385 riscv64: set -march default to rv64gc
From: @laokz 
Reviewed-by: @xiongzhou4, @cf-zhao 
Signed-off-by: @cf-zhao
2024-03-07 03:43:59 +00:00
laokz
a3c64818f2 riscv64: -march default to rv64gc 2024-01-15 14:16:10 +08:00
openeuler-ci-bot
cc9cae1049
!344 [sync] PR-343: [Sync] Sync patch from openeuler/gcc
From: @openeuler-sync-bot 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-11-21 11:33:09 +00:00
dingguangya
80f4718498 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc

(cherry picked from commit b9aefd9d9cd4b10ae4b7939f6fd37da432b02116)
2023-09-11 15:22:25 +08:00
openeuler-ci-bot
8a24ab6ea1
!342 [sync] PR-341: Enable strip on x86
From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-09-07 07:03:00 +00:00
zhenyu--zhao
1ec7783640 !334[SPEC] Enable Sirp on aarch64 and x86
(cherry picked from commit 21298a720abe9d312129532f995fa3c943b71f59)
2023-09-07 11:40:38 +08:00
openeuler-ci-bot
3777516d7d
!339 [SPEC] Package simdmath.h and simdmath_f.h
From: @eastb233 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-09-06 12:26:17 +00:00
eastb233
f3d7c8e424 [SPEC] Package simdmath.h and simdmath_f.h 2023-09-06 17:13:23 +08:00
openeuler-ci-bot
7e4a27a141
!337 [sync] PR-336: [SPEC] Remove installed but unpacked files
From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-09-06 06:59:03 +00:00
liyancheng
956e2880a6 [SPEC] Remove installed but unpacked files
Remove installed but unpacked files

(cherry picked from commit 9172a0f24153c8ce1d31974aaf39cabe7c8647e7)
2023-09-06 09:28:20 +08:00
openeuler-ci-bot
6454920a96
!335 [sync] PR-334: [SPEC] Enable strip on gcc and %{_target_platform}-gcc
From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-09-06 01:15:55 +00:00
zhenyu--zhao
05db73e18a [SPEC] Enable strip on gcc and %{_target_platform}-gcc
Enable strip on gcc and %{_target_platform}-gcc

(cherry picked from commit da577ebd493da6751eb3f870cafc9425c52181c9)
2023-09-05 23:06:23 +08:00
openeuler-ci-bot
4a678c4275
!332 [sync] PR-329: [Sync] Sync patch from openeuler/gcc
From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-09-05 15:06:07 +00:00
h00564365
a52b07486c [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20230905

(cherry picked from commit 6aadb648e6a0b7aef781fd4ea47c92c34e75d3c1)
2023-09-05 20:03:39 +08:00
openeuler-ci-bot
47180897e5
!330 [sync] PR-327: [Sync] Sync patch from openeuler/gcc
From: @openeuler-sync-bot 
Reviewed-by: @huang-xiaoquan 
Signed-off-by: @huang-xiaoquan
2023-09-05 06:21:23 +00:00
dingguangya
124654232c [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc

(cherry picked from commit 95427adf7d16bbb61ae3ced9c64aacbaf53dce72)
2023-09-05 11:04:21 +08:00
openeuler-ci-bot
677f05d3bf
!326 [sync] PR-325: [Sync] Sync patch from openeuler/gcc
From: @openeuler-sync-bot 
Reviewed-by: @huang-xiaoquan 
Signed-off-by: @huang-xiaoquan
2023-08-31 12:02:33 +00:00
huang-xiaoquan
24601f9e37 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20230829 part 2

(cherry picked from commit 609cef8ac6ca4de64bed245700975082853ad49a)
2023-08-30 09:22:08 +08:00
openeuler-ci-bot
00d8ee9c5a
!324 [sync] PR-323: [Sync] Sync patch from openeuler/gcc
From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-08-30 01:21:44 +00:00
h00564365
adacc909ea [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20230829

(cherry picked from commit 5e9724992d967ef598d70c92c5c936ebbf828946)
2023-08-29 20:59:41 +08:00
openeuler-ci-bot
a8340ebb3e
!320 Backport some patches on EPOL gcc-12 to GCC-12 for openEuler.
From: @github-27907959 
Reviewed-by: @huang-xiaoquan 
Signed-off-by: @huang-xiaoquan
2023-08-17 07:59:35 +00:00
Hongyu Wang
ad4ee2e6e9 [Sync] i386: Only enable small loop unrolling in backend [PR
107692]

Followed by the discussion in pr107692, -munroll-only-small-loops
Does not turns on/off -funroll-loops, and current check in
pass_rtl_unroll_loops::gate would cause -fno-unroll-loops do not take
effect. Revert the change about targetm.loop_unroll_adjust and apply
the backend option change to strictly follow the rule that
-funroll-loops takes full control of loop unrolling, and
munroll-only-small-loops just change its behavior to unroll small size
loops.

gcc/ChangeLog:

	PR target/107692
	* common/config/i386/i386-common.cc (ix86_optimization_table):
	Enable loop unroll O2, disable -fweb and -frename-registers
	by default.
	* config/i386/i386-options.cc
	(ix86_override_options_after_change):
	Disable small loop unroll when funroll-loops enabled, reset
	cunroll_grow_size when it is not explicitly enabled.
	(ix86_option_override_internal): Call
	ix86_override_options_after_change instead of calling
	ix86_recompute_optlev_based_flags and ix86_default_align
	separately.
	* config/i386/i386.cc (ix86_loop_unroll_adjust): Adjust unroll
	factor if -munroll-only-small-loops enabled.
	* loop-init.cc (pass_rtl_unroll_loops::gate): Do not enable
	loop unrolling for -O2-speed.
	(pass_rtl_unroll_loops::execute): Rmove
	targetm.loop_unroll_adjust check.

gcc/testsuite/ChangeLog:

	PR target/107692
	* gcc.dg/guality/loop-1.c: Remove additional option for ia32.
	* gcc.target/i386/pr86270.c: Add -fno-unroll-loops.
	* gcc.target/i386/pr93002.c: Likewise.
2023-08-11 11:25:43 +08:00
Hongyu Wang
79c6c64bfe [Sync] Enable small loop unrolling for O2
Modern processors has multiple way instruction decoders
For x86, icelake/zen3 has 5 uops, so for small loop with <= 4
instructions (usually has 3 uops with a cmp/jmp pair that can be
macro-fused), the decoder would have 2 uops bubble for each iteration
and the pipeline could not be fully utilized.

Therefore, this patch enables loop unrolling for small size loop at O2
to fullfill the decoder as much as possible. It turns on rtl loop
unrolling when targetm.loop_unroll_adjust exists and O2 plus speed only.
In x86 backend the default behavior is to unroll small loops with less
than 4 insns by 1 time.

This improves 548.exchange2 by 9% on icelake and 7.4% on zen3 with
0.9% codesize increment. For other benchmarks the variants are minor
and overall codesize increased by 0.2%.

The kernel image size increased by 0.06%, and no impact on eembc.

gcc/ChangeLog:

	* common/config/i386/i386-common.cc (ix86_optimization_table):
	Enable small loop unroll at O2 by default.
	* config/i386/i386.cc (ix86_loop_unroll_adjust): Adjust unroll
	factor if -munroll-only-small-loops enabled and -funroll-loops/
	-funroll-all-loops are disabled.
	* config/i386/i386.h (struct processor_costs): Add 2 field
	small_unroll_ninsns and small_unroll_factor.
	* config/i386/i386.opt: Add -munroll-only-small-loops.
	* doc/invoke.texi: Document -munroll-only-small-loops.
	* loop-init.cc (pass_rtl_unroll_loops::gate): Enable rtl
	loop unrolling for -O2-speed and above if target hook
	loop_unroll_adjust exists.
	(pass_rtl_unroll_loops::execute): Set UAP_UNROLL flag
	when target hook loop_unroll_adjust exists.
	* config/i386/x86-tune-costs.h: Update all processor costs
	with small_unroll_ninsns = 4 and small_unroll_factor = 2.

gcc/testsuite/ChangeLog:

	* gcc.dg/guality/loop-1.c: Add additional option
	-mno-unroll-only-small-loops.
	* gcc.target/i386/pr86270.c: Add -mno-unroll-only-small-loops.
	* gcc.target/i386/pr93002.c: Likewise.
2023-08-11 11:25:18 +08:00
Cui,Lili
8cf4a6a8c3 [Sync] Add attribute hot judgement for INLINE_HINT_known_hot hint.
We set up INLINE_HINT_known_hot hint only when we have profile feedback,
now add function attribute judgement for it, when both caller and callee
have __attribute__((hot)), we will also set up INLINE_HINT_known_hot hint
for it.

With this patch applied,
ADL Multi-copy:    538.imagic_r  16.7%
ICX Multi-copy:    538.imagic_r  15.2%
CLX Multi-copy:    538.imagic_r  12.7%
Znver3 Multi-copy: 538.imagic_r  10.6%
Arm Multi-copy:    538.imagic_r  13.4%

gcc/ChangeLog

	* ipa-inline-analysis.cc (do_estimate_edge_time): Add function attribute
	judgement for INLINE_HINT_known_hot hint.

gcc/testsuite/ChangeLog:

	* gcc.dg/ipa/inlinehint-6.c: New test.
2023-08-11 11:24:59 +08:00
openeuler-ci-bot
110ceef4aa
!317 [SPEC] Enable libquadmath on kunpeng
From: @huang-xiaoquan 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-07-17 08:27:49 +00:00
huang-xiaoquan
a84864a09a [SPEC] Enable libquadmath on kunpeng 2023-07-17 09:36:54 +08:00
openeuler-ci-bot
5f6931e0f1
!316 [Sync] Enable libquadmath on kunpeng
From: @huang-xiaoquan 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-07-15 08:31:53 +00:00
huang-xiaoquan
199eae7853 [Sync] Enable libquadmath on kunpeng 2023-07-14 18:21:47 +08:00
openeuler-ci-bot
577a463f57
!315 [Init] Init GCC 12.3.0 repository
From: @huang-xiaoquan 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-07-12 01:21:06 +00:00
huang-xiaoquan
375fae7b07 [Sync] Set version to 12.3.1 2023-07-11 23:10:33 +08:00
huang-xiaoquan
6b4316197e [Init] Init GCC 12.3.0 repository
Initialize the GCC 12.3.0 repository with gcc-12.3.0.tar.xz
and the gcc.spec.
2023-07-11 20:49:28 +08:00
openeuler-ci-bot
7c8c5ad23a
!271 [Sync] Sync patch from openeuler/gcc
From: @huang-xiaoquan 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-05-23 07:03:40 +00:00
huang-xiaoquan
1e715174c3 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20230522
2023-05-22 11:27:59 +08:00
openeuler-ci-bot
4b0cc3f915
!266 [sync] PR-265: [SPEC] Enable isl and add --with-isl
From: @openeuler-sync-bot 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-04-14 03:18:23 +00:00
huang-xiaoquan
725f6d7286 [SPEC] Enable isl and add --with-isl
(cherry picked from commit 3911186fc058bc0e03d9a2de6fa58e67f3f12ffa)
2023-04-13 11:46:19 +08:00
openeuler-ci-bot
8fa171e5d1
!261 [SPEC] Enable-languages uses variables
From: @huang-xiaoquan 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-03-25 06:16:41 +00:00
huang-xiaoquan
3901d8a9c1 [SPEC] Enable-languages uses variables
In enable-languages, switch non-default languages to use variables
2023-03-25 10:33:37 +08:00
openeuler-ci-bot
876a0850fc
!258 [Revert] Revert without pie option
From: @huang-xiaoquan 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-03-25 01:43:08 +00:00
huang-xiaoquan
430515b4b4 [Revert] Revert without pie option
Revert without pie option in OPT_LDFLAGS
2023-03-24 11:11:59 +08:00
openeuler-ci-bot
e95213c039
!251 [sync] PR-250: [RPM] Add pie and delete rpath in libgfortran
From: @openeuler-sync-bot 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2023-03-17 07:24:18 +00:00
huang-xiaoquan
3691b150f1 [RPM] Add pie and delete rpath in libgfortran
(cherry picked from commit d1eef1aca9003ee64cd3d50b9bdc566a1e3486ac)
2023-03-09 19:15:34 +08:00
openeuler-ci-bot
0f3c849db8
!247 [Backport] State --sysroot option as validated once processed
From: @huitailangzju 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-03-06 01:25:34 +00:00