public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94092] New: Code size and performance degradations after -ftree-loop-distribute-patterns was enabled at -O[2s]+
@ 2020-03-09  6:06 bina2374 at gmail dot com
  2020-03-09  6:17 ` [Bug tree-optimization/94092] " pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: bina2374 at gmail dot com @ 2020-03-09  6:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94092
           Summary: Code size and performance degradations after
                    -ftree-loop-distribute-patterns was enabled at -O[2s]+
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bina2374 at gmail dot com
  Target Milestone: ---
            Target: riscv64-unknown-elf

Since https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88440,
loop-distribute-patterns was enabled at -O[2s]+. We understand that this patch
is helpful in some cases, but not for all.
In the original bugzilla, the loop count is known, and the performance and code
size are all improved finally. However, if loop count is unknown, the results
may become worse.

void init_array(int N, int *array) {
  int i;
  for (i = 0; i < N; i++)
    array[i] = 0;
}

init_array:
        mv      a2,a0
        mv      a0,a1
        ble     a2,zero,.L1
        slli    a2,a2,2
        li      a1,0
        tail    memset
.L1:
        ret

For coremark, this is not only harmful to performance, but also code size.
Therefore, I suggest that we have to discuss how to resolve the case of unknown
loop count.

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

end of thread, other threads:[~2021-05-04 12:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09  6:06 [Bug tree-optimization/94092] New: Code size and performance degradations after -ftree-loop-distribute-patterns was enabled at -O[2s]+ bina2374 at gmail dot com
2020-03-09  6:17 ` [Bug tree-optimization/94092] " pinskia at gcc dot gnu.org
2020-03-09  6:29 ` pinskia at gcc dot gnu.org
2020-03-09  6:30 ` pinskia at gcc dot gnu.org
2020-03-09  7:37 ` glisse at gcc dot gnu.org
2020-03-09  9:48 ` rguenth at gcc dot gnu.org
2021-02-19  8:05 ` aoliva at gcc dot gnu.org
2021-02-23 23:57 ` wilson at gcc dot gnu.org
2021-02-24  7:43 ` rguenth at gcc dot gnu.org
2021-02-24  9:05 ` bina2374 at gmail dot com
2021-02-24  9:20 ` rguenth at gcc dot gnu.org
2021-02-26  6:35 ` bina2374 at gmail dot com
2021-03-03  6:30 ` bina2374 at gmail dot com
2021-03-03  8:03 ` rguenther at suse dot de
2021-04-29  4:24 ` aoliva at gcc dot gnu.org
2021-04-30 14:38 ` law at gcc dot gnu.org
2021-05-03  6:28 ` rguenther at suse dot de
2021-05-04 12:26 ` rguenth at gcc dot gnu.org

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).