public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/96979] Switch with case values derived from constexpr function takes unreasonable time to compile
Date: Tue, 08 Sep 2020 13:12:47 +0000	[thread overview]
Message-ID: <bug-96979-4-14rraF8H9j@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96979-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
          Component|c++                         |tree-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-09-08

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  Interestingly -fsyntax-only is fast.  So we're in
switch-conversion:

    at /home/rguenther/src/gcc2/gcc/tree.h:5919
#2  0x0000000000e051a5 in wi::to_wide (t=<integer_cst 0x7ffff66659a8>, prec=64)
    at /home/rguenther/src/gcc2/gcc/tree.h:5930
#3  0x000000000111c193 in int_const_binop (code=MINUS_EXPR, 
    arg1=<integer_cst 0x7ffff66b4078>, arg2=<integer_cst 0x7ffff66659a8>, 
    overflowable=1) at /home/rguenther/src/gcc2/gcc/fold-const.c:1185
#4  0x000000000111c4a5 in const_binop (code=MINUS_EXPR, 
    arg1=<integer_cst 0x7ffff66b4078>, arg2=<integer_cst 0x7ffff66659a8>)
    at /home/rguenther/src/gcc2/gcc/fold-const.c:1242
#5  0x000000000111e901 in const_binop (code=MINUS_EXPR, 
    type=<integer_type 0x7ffff66270a8 u64>, arg1=<integer_cst 0x7ffff66b4078>, 
    arg2=<integer_cst 0x7ffff66659a8>)
    at /home/rguenther/src/gcc2/gcc/fold-const.c:1720
#6  0x00000000011444e6 in fold_binary_loc (loc=0, code=MINUS_EXPR, 
    type=<integer_type 0x7ffff66270a8 u64>, op0=<integer_cst 0x7ffff66b4078>, 
    op1=<integer_cst 0x7ffff66659a8>)
    at /home/rguenther/src/gcc2/gcc/fold-const.c:10286
#7  0x00000000011531b5 in fold_build2_loc (loc=0, code=MINUS_EXPR, 
    type=<integer_type 0x7ffff66270a8 u64>, op0=<integer_cst 0x7ffff66b4078>, 
--Type <RET> for more, q to quit, c to continue without paging--
    op1=<integer_cst 0x7ffff66659a8>)
    at /home/rguenther/src/gcc2/gcc/fold-const.c:13256
#8  0x00000000017fa079 in tree_switch_conversion::cluster::get_range (
    low=<integer_cst 0x7ffff66659a8>, high=<integer_cst 0x7ffff66b4078>)
    at /home/rguenther/src/gcc2/gcc/tree-switch-conversion.h:87
#9  0x00000000017f45e1 in
tree_switch_conversion::bit_test_cluster::can_be_handled (clusters=...,
start=168, end=839)
    at /home/rguenther/src/gcc2/gcc/tree-switch-conversion.c:1392
#10 0x00000000017f42b7 in
tree_switch_conversion::bit_test_cluster::find_bit_tests (clusters=...) at
/home/rguenther/src/gcc2/gcc/tree-switch-conversion.c:1322
#11 0x00000000017f5d0c in
tree_switch_conversion::switch_decision_tree::analyze_switch_statement
(this=0x7fffffffd990)

where tree_switch_conversion::bit_test_cluster::find_bit_tests takes ages
to complete.

  reply	other threads:[~2020-09-08 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 12:40 [Bug c++/96979] New: " gcc at magey dot org
2020-09-08 13:12 ` rguenth at gcc dot gnu.org [this message]
2020-09-08 13:13 ` [Bug tree-optimization/96979] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2020-09-08 13:30 ` jakub at gcc dot gnu.org
2020-09-21  8:32 ` marxin at gcc dot gnu.org
2020-09-22 12:39 ` cvs-commit at gcc dot gnu.org
2020-09-22 12:43 ` [Bug tree-optimization/96979] [9/10/11 " marxin at gcc dot gnu.org
2020-09-29  7:26 ` cvs-commit at gcc dot gnu.org
2020-10-01 19:19 ` cvs-commit at gcc dot gnu.org
2020-10-02 10:04 ` marxin 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-96979-4-14rraF8H9j@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).