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
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
openeuler-ci-bot
25a7512d71
!246 [Backport] libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
...
From: @li-yancheng
Reviewed-by: @benniaobufeijiushiji
Signed-off-by: @benniaobufeijiushiji
2023-01-10 12:22:16 +00: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
openeuler-ci-bot
2727f4613d
!243 [sync] PR-239: [Sync] Sync patch from openeuler/gcc.
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2023-01-06 02:55:07 +00:00
xiongzhou4
1cf8937271
[Sync] Sync patch from openeuler/gcc.
...
(cherry picked from commit 312a836cd881325790aa341a08161bb5b7bfdd2a)
2023-01-06 10:51:31 +08:00
openeuler-ci-bot
3cc9a52f06
!242 [sync] PR-235: [Sync] Sync patch from openeuler/gcc
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2023-01-06 02:50:11 +00: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
openeuler-ci-bot
18ee7261fc
!241 [sync] PR-231: [RPM] Delete rpath in liblsan libasan libubsan libtsan
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2023-01-06 02:46:44 +00:00
liyancheng
ef9a21e6f1
[RPM] Delete rpath in liblsan libasan libubsan libtsan
...
(cherry picked from commit e21ed8e40c1f9d306aed9e8b3007fdc37b292911)
2023-01-06 10:45:56 +08:00
openeuler-ci-bot
9a577e6bdc
!240 [sync] PR-229: [Sync] Sync patch from openeuler/gcc and fix wrong date
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2023-01-06 02:43:09 +00: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
openeuler-ci-bot
227af93f20
!227 [sync] PR-225: [Sync] Sync patch from openeuler/gcc
...
From: @openeuler-sync-bot
Reviewed-by: @eastb233
Signed-off-by: @eastb233
2022-12-20 09:05:17 +00: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
openeuler-ci-bot
404b6b59b8
!210 [sync] PR-201: [Sync] Sync patch from openeuler/gcc
...
From: @openeuler-sync-bot
Reviewed-by: @eastb233
Signed-off-by: @eastb233
2022-09-24 02:53:52 +00: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
openeuler-ci-bot
06e0f33f43
!198 [sync] PR-191: [Sync] Sync patch from openeuler/gcc
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2022-09-15 12:16:40 +00: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
openeuler-ci-bot
140c60bd01
!196 [sync] PR-187: [Revert] Remove 2 patches
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2022-09-15 12:14:25 +00:00
benniaobufeijiushiji
b63e4c9f9a
[Revert] Remove 2 patches
...
Remove 2 backport patches
(cherry picked from commit 55e6b3c41ff8ff81578079da330ae919f7a0b7fc)
2022-09-15 20:13:21 +08:00
openeuler-ci-bot
0c24e155b2
!192 [sync] PR-186: [Sync] Sync patch from openeuler/gcc
...
From: @openeuler-sync-bot
Reviewed-by: @li-yancheng
Signed-off-by: @li-yancheng
2022-09-15 12:04:01 +00: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
openeuler-ci-bot
5d8f974a90
!183 [SPEC] Add support for libgccjit
...
From: @mmzzmm
Reviewed-by: @eastb233
Signed-off-by: @eastb233
2022-07-11 11:27:18 +00:00
zhaomengmeng
72209e0643
[SPEC] Add support for libgccjit.
2022-07-08 17:01:07 +08:00
openeuler-ci-bot
fa2aa9efd6
!174 [Sync] Sync patch from openeuler/gcc
...
From: @li-yancheng
Reviewed-by: @benniaobufeijiushiji, @eastb233
Signed-off-by: @eastb233
2022-05-06 11:03:44 +00: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
openeuler-ci-bot
03165599dd
!157 [sync] PR-155: [Sync] Sync patch from openeuler/gcc
...
From: @openeuler-sync-bot
Reviewed-by: @eastb233
Signed-off-by: @eastb233
2022-03-23 03:40:54 +00: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
openeuler-ci-bot
3f6d66fd01
!144 [Sync] Sync patch from openeuler/gcc
...
From: @benniaobufeijiushiji
Reviewed-by: @eastb233
Signed-off-by: @eastb233
2022-03-03 01:52:41 +00:00
benniaobufeijiushiji
635a0d4206
[Sync] Sync patch from openeuler/gcc
...
Sync patch from openeuler/gcc - 20220302
2022-03-02 14:52:11 +08:00
openeuler-ci-bot
a0e2855fa8
!141 [SPEC] Remove DATE in release info
...
From: @benniaobufeijiushiji
Reviewed-by: @eastb233
Signed-off-by: @eastb233
2022-03-01 08:21:09 +00:00