84 Commits

Author SHA1 Message Date
huang-xiaoquan
cae11fd7cf [BUGFIX] StructReorderFields-Fix-gimple-call-not-rewritten. 2024-04-29 14:53:18 +08:00
zhenyu--zhao_admin
7dd679d56c [BUGFIX] Update the configure file for BOLT. 2024-04-27 21:13:32 +08:00
郑晨卉
34c4e5913a Revert Intel patches. 2024-04-26 09:43:50 +08:00
wangding16
1e2398a6a8 [Sync] Sync patch from openeuler/gcc 2024-04-24 12:57:04 +08:00
laokz
32ffb36ccb riscv64: enable libasan, libusan package 2024-04-23 18:00:20 +08:00
ticat_fp
eaea42573e LoongArch: add 3a6000 support
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
2024-04-23 09:07:30 +08:00
郑晨卉
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
zhenyu--zhao_admin
cda59b581e [SYNC] Sync patch from openeuler/gcc 2024-04-11 16:47:29 +08: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
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
laokz
a3c64818f2 riscv64: -march default to rv64gc 2024-01-15 14:16:10 +08: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
zhenyu--zhao
1ec7783640 !334[SPEC] Enable Sirp on aarch64 and x86
(cherry picked from commit 21298a720abe9d312129532f995fa3c943b71f59)
2023-09-07 11:40:38 +08:00
eastb233
f3d7c8e424 [SPEC] Package simdmath.h and simdmath_f.h 2023-09-06 17:13:23 +08: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
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
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
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
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
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
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
huang-xiaoquan
a84864a09a [SPEC] Enable libquadmath on kunpeng 2023-07-17 09:36:54 +08:00
huang-xiaoquan
199eae7853 [Sync] Enable libquadmath on kunpeng 2023-07-14 18:21:47 +08: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
huang-xiaoquan
1e715174c3 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20230522
2023-05-22 11:27:59 +08:00
huang-xiaoquan
725f6d7286 [SPEC] Enable isl and add --with-isl
(cherry picked from commit 3911186fc058bc0e03d9a2de6fa58e67f3f12ffa)
2023-04-13 11:46:19 +08: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
huang-xiaoquan
430515b4b4 [Revert] Revert without pie option
Revert without pie option in OPT_LDFLAGS
2023-03-24 11:11:59 +08: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
huitailangzju
ff72fea4ac [Backport] State --sysroot option as validated once processed
[Reference] https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=8e86086bd33134467cc9c2a75327d1238dc71df9
State --sysroot option as validated once processed
2023-02-26 21:26:07 +08:00
liyancheng
15f0df8aa0 [Backport] libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
[Reference] https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=2701442d0cf6292f6624443c15813d6d1a3562fe
[sanitizer] Remove #include <linux/fs.h> to resolve
fsconfig_command/mount_attr conflict with glibc 2.36
2023-01-10 19:23:47 +08:00
xiongzhou4
1cf8937271 [Sync] Sync patch from openeuler/gcc.
(cherry picked from commit 312a836cd881325790aa341a08161bb5b7bfdd2a)
2023-01-06 10:51:31 +08:00
benniaobufeijiushiji
3df8980f1f [Sync] Sync patch from openeuler/gcc
Bugfix for loop-distribution, semi-relayout and MULL64.

(cherry picked from commit 206c98c7c8ceca539ffc063e8c09135fb5cf1248)
2023-01-06 10:47:41 +08:00
liyancheng
ef9a21e6f1 [RPM] Delete rpath in liblsan libasan libubsan libtsan
(cherry picked from commit e21ed8e40c1f9d306aed9e8b3007fdc37b292911)
2023-01-06 10:45:56 +08:00
liyancheng
c5632ba4ef [Sync] Sync patch from openeuler/gcc and fix wrong date
Sync patch from openeuler/gcc - 20221208 and fix wrong date

(cherry picked from commit 95b5a6d0f08784a98daa5650f0597617aa64a27c)
2023-01-06 10:41:26 +08:00
benniaobufeijiushiji
a41360f2fb [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20221201

(cherry picked from commit 5487e8942c694fd317f2cbf1662e9eaf33f2f612)
2022-12-01 11:56:57 +08:00
eastb233
3c6b009f79 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220916

(cherry picked from commit cee88578d148dee16a4afc86a51e60fafbe95755)
2022-09-23 15:28:25 +08:00
benniaobufeijiushiji
60d1565517 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220908

(cherry picked from commit 7709b3554c276ea273838e29fa6db318ca41f187)
2022-09-15 20:15:05 +08:00
benniaobufeijiushiji
b63e4c9f9a [Revert] Remove 2 patches
Remove 2 backport patches

(cherry picked from commit 55e6b3c41ff8ff81578079da330ae919f7a0b7fc)
2022-09-15 20:13:21 +08:00
benniaobufeijiushiji
1080ba4291 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220808

(cherry picked from commit 3d663928609a23db4fc8b4ba1039a53a943ac1ed)
2022-09-13 10:18:57 +08:00
zhaomengmeng
72209e0643 [SPEC] Add support for libgccjit. 2022-07-08 17:01:07 +08:00
liyancheng
f084694152 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220506
Including:
  [Backport] sanitizer: Fix asan against glibc 2.34 [PR100114]
2022-05-06 14:33:53 +08:00
benniaobufeijiushiji
8721999032 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220322

(cherry picked from commit f5f215d1e83483976021d60dd23ae5bd534420c8)
2022-03-23 10:14:32 +08:00
benniaobufeijiushiji
635a0d4206 [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220302
2022-03-02 14:52:11 +08:00
benniaobufeijiushiji
fd39bb4457 [SPEC] Remove date info
Remove date in release info and some lib file names
2022-03-01 15:22:31 +08:00
benniaobufeijiushiji
9cc7c99d7c [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20220223
2022-02-23 20:55:42 +08:00