public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/114532] New: gcc -fno-common option causes performance degradation on certain architectures
@ 2024-03-30  9:47 h13958451065 at 163 dot com
  2024-03-30 18:48 ` [Bug middle-end/114532] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: h13958451065 at 163 dot com @ 2024-03-30  9:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114532

            Bug ID: 114532
           Summary: gcc -fno-common option causes performance degradation
                    on certain architectures
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: h13958451065 at 163 dot com
  Target Milestone: ---

gcc 10.3 has turnd off -fcommon into fno-common by default, which led to
performance decrease about 7% (CPU intel sapphire rapids) on UnixBench dhry2reg
subtest.

We found that L1-dcache-load-misses increased under -fno-common option than
-fcommon, which we  suspect is the cause of the performance decrease. 
L1 dcache size is 48K per core in CPU intel sapphire rapids (32 KB instruction
+ 48 KB data).

We have compared the binary layout of the executables generated under -fcommon
and -fno-common, we found that the location offset of XXX_Time and XXX_Glob
global variables in BSS section increased about 10K under -fno-common.
Maybe the increase of bss gap influence the probability of L1-dcache-load-miss.

I am not sure about this conclusion, is there any way to verify our conjecture?

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-05  9:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-30  9:47 [Bug c/114532] New: gcc -fno-common option causes performance degradation on certain architectures h13958451065 at 163 dot com
2024-03-30 18:48 ` [Bug middle-end/114532] " pinskia at gcc dot gnu.org
2024-06-04  1:38 ` zhaohaifeng4 at huawei dot com
2024-06-04  1:41 ` sjames at gcc dot gnu.org
2024-06-04 11:19 ` david at westcontrol dot com
2024-06-05  4:12 ` zhaohaifeng4 at huawei dot com
2024-06-05  5:46 ` xry111 at gcc dot gnu.org
2024-06-05  8:24 ` david at westcontrol dot com
2024-06-05  8:46 ` zhaohaifeng4 at huawei dot com
2024-06-05  9:26 ` xry111 at gcc dot gnu.org
2024-06-05  9:29 ` xry111 at gcc dot gnu.org
2024-06-05  9:30 ` david at westcontrol dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).