public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/99862] New: [meta-issue] various missed optimizations for dead code elimination
@ 2021-04-01  7:59 zhendong.su at inf dot ethz.ch
  2021-04-01  8:01 ` [Bug ipa/99862] " zhendong.su at inf dot ethz.ch
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-04-01  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99862
           Summary: [meta-issue] various missed optimizations for dead
                    code elimination
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

[561] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.1 20210401 (experimental) [master revision
e4bb1bd60a9:c23a685bf70:95d217ab52d31dc06fda42fc136dea165909e88b] (GCC) 
[562] % 
[562] % gcctk -O1 -S -o O1.s small.c
[563] % gcctk -O3 -S -o O3.s small.c
[564] % 
[564] % wc O1.s O3.s
  23   45  420 O1.s
  39   74  669 O3.s
  62  119 1089 total
[565] % 
[565] % grep foo O1.s
[566] % grep foo O3.s
        call    foo
[567] % 
[567] % cat small.c
extern void foo(void);
static int a, b;
static int c() {
  foo();
  while (1)
    while (b)
      foo();
}
void d() {
  if (a)
    c();
}
int main() {
  d();
  return 0;
}

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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  7:59 [Bug ipa/99862] New: [meta-issue] various missed optimizations for dead code elimination zhendong.su at inf dot ethz.ch
2021-04-01  8:01 ` [Bug ipa/99862] " zhendong.su at inf dot ethz.ch
2021-04-01  8:06 ` zhendong.su at inf dot ethz.ch
2021-04-02  0:28 ` egallager at gcc dot gnu.org
2021-04-02 17:02 ` zhendong.su at inf dot ethz.ch
2021-04-09 11:37 ` rguenth at gcc dot gnu.org
2021-04-09 11:39 ` rguenth at gcc dot gnu.org
2021-04-09 11:42 ` rguenth at gcc dot gnu.org
2021-04-09 11:53 ` rguenth at gcc dot gnu.org
2021-04-09 11:59 ` zhendong.su at inf dot ethz.ch
2021-04-10 10:12 ` egallager 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).