public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dimhen at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/102814] New: [12 regression] quadratique/exponential time complexity for max-jump-thread-duplication-stmts
Date: Mon, 18 Oct 2021 17:32:25 +0000	[thread overview]
Message-ID: <bug-102814-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 102814
           Summary: [12 regression] quadratique/exponential time
                    complexity for max-jump-thread-duplication-stmts
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimhen at gmail dot com
  Target Milestone: ---

r12-4256 FAST
r12-4444 SLOW

g++ -fpreprocessed -std=c++98 -O2 --param max-jump-thread-duplication-stmts=NNN
-c x.ii

     r12-4256 r12-4444
180    0.5s     0.21s
181    0.8s     > 100s
190    1.0s     52s

cat x.ii # cvise'd from proprietary codebase
struct a {
  a operator+(int);
};
void *operator new(unsigned long, void *c) { return c; }
struct d {
  void h(int *j) { new (j) int(); }
};
struct k {
  struct {
    int e;
    int f;
  } g;
};
struct n : k {
  a m_fn2();
  a o();
  int m_fn4();
  int operator[](int);
  int ae;
  void s() {
    if (g.e != g.f) {
      d l;
      int *b;
      l.h(b);
    }
    a m = o();
    t(m, ae);
  }
  template <typename af> void u(a, af, af);
  void t(a, unsigned char);
};
int ah;
struct v {
  n w();
};
void x() {
  v p;
  n ak = p.w(), al, rapdu;
  int q(ak.m_fn4());
  int r;
  for (int i = 0; q; i++) {
    if (i == q - 1) {
      al.s();
      r = ak.m_fn4();
    }
    al.s();
    al.s();
    al.s();
    al.s();
    a am, an = ak.m_fn2(), ao = an + 1, ap = ak.m_fn2(), aq = ap + ah,
          ar = aq + r;
    al.u(am, ao, ar);
    if (i == q - 1)
      al.s();
    i &&rapdu[1];
  }
}

g++ -v
Using built-in specs.
COLLECT_GCC=/home/dimhen/arch-gcc/gcc_current/bin/g++
COLLECT_LTO_WRAPPER=/home/dimhen/arch-gcc/gcc_current/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-pc-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/home/dimhen/arch-gcc/gcc_current
--enable-checking=yes,df,fold,rtl,extra --enable-languages=c,c++,lto
--disable-multilib --enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --enable-cet --with-tune=native
--enable-libstdcxx-debug
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211015 (experimental) [master r12-4444-ga01704fc45a] (GCC)

             reply	other threads:[~2021-10-18 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 17:32 dimhen at gmail dot com [this message]
2021-10-18 21:06 ` [Bug tree-optimization/102814] " pinskia at gcc dot gnu.org
2021-10-19  7:20 ` aldyh at gcc dot gnu.org
2021-10-19  7:40 ` rguenth at gcc dot gnu.org
2021-10-19  7:45 ` aldyh at gcc dot gnu.org
2021-10-20  7:10 ` aldyh at gcc dot gnu.org
2021-10-20  7:10 ` aldyh at gcc dot gnu.org
2021-10-20  9:09 ` cvs-commit at gcc dot gnu.org
2021-10-20  9:10 ` aldyh at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102814-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).