public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/64817] [5 Regression] compilation hangs at -O3 with -g enabled on x86_64-linux-gnu Date: Tue, 27 Jan 2015 12:02:00 -0000 [thread overview] Message-ID: <bug-64817-4-yQnstYVzsN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64817-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64817 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The problem is that expand_debug_expr follows all TER definitions for SSA_NAMEs, and in this testcase it just creates really huge expression that we then try to simplify, and nonzero_bits have bad time complexity for such large expressions. pretmp_33 = a; a.1_6 = pretmp_33 & 231; a.2_21 = a.1_6 ^ 14; a.1_22 = a.2_21 & 231; a.2_17 = a.1_22 ^ 14; a.1_19 = a.2_17 & 231; a.2_37 = a.1_19 ^ 14; a.1_28 = a.2_37 & 231; a.2_29 = a.1_28 ^ 14; a.1_42 = a.2_29 & 231; a.5_41 = a.1_42 ^ 15; # DEBUG D#1 => a.5_41 < 0 # DEBUG e => (int) D#1 a.1_14 = a.5_41 & 231; a.2_25 = a.1_14 ^ 14; a.1_13 = a.2_25 & 231; a.2_44 = a.1_13 ^ 14; a.1_45 = a.2_44 & 231; a.2_46 = a.1_45 ^ 14; a.1_47 = a.2_46 & 231; a.2_48 = a.1_47 ^ 14; a.1_49 = a.2_48 & 231; a.5_51 = a.1_49 ^ 15; # DEBUG D#1 => a.5_51 < 0 # DEBUG e => (int) D#1 a.1_56 = a.5_51 & 231; a.2_57 = a.1_56 ^ 14; a.1_58 = a.2_57 & 231; a.2_59 = a.1_58 ^ 14; a.1_60 = a.2_59 & 231; a.2_61 = a.1_60 ^ 14; a.1_62 = a.2_61 & 231; a.2_63 = a.1_62 ^ 14; a.1_64 = a.2_63 & 231; a.5_66 = a.1_64 ^ 15; # DEBUG D#1 => a.5_66 < 0 # DEBUG e => (int) D#1 ... Best would be to limit somehow the number of nested: case SSA_NAME: { gimple g = get_gimple_for_ssa_name (exp); if (g) { op0 = expand_debug_expr (gimple_assign_rhs_to_tree (g)); if (!op0) return NULL; } levels, perhaps by adding DEBUG_EXPR_DECLs to break too deep chains. Supposedly it would need to be done at the end of TER or so, simply for all debug stmts, look at the nesting depth of get_gimple_for_ssa_name links from their expressions, and if it goes over say 5 or 10, add some DEBUG_EXPR_DECLs and debug stmts for them right after the corresponding SSA_NAME definitions and replace all debug uses of the SSA_NAME with that DEBUG_EXPR_DECL. Alex, what do you think about that?
next prev parent reply other threads:[~2015-01-27 12:02 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-27 7:04 [Bug debug/64817] New: " su at cs dot ucdavis.edu 2015-01-27 8:56 ` [Bug debug/64817] [5 Regression] " jakub at gcc dot gnu.org 2015-01-27 11:10 ` rguenth at gcc dot gnu.org 2015-01-27 12:02 ` jakub at gcc dot gnu.org [this message] 2015-01-30 10:10 ` jakub at gcc dot gnu.org 2015-01-30 12:51 ` jakub at gcc dot gnu.org 2015-02-01 17:26 ` jakub at gcc dot gnu.org 2015-02-01 22:02 ` jakub at gcc dot gnu.org 2015-02-04 14:24 ` aoliva at gcc dot gnu.org 2015-02-04 14:24 ` aoliva at gcc dot gnu.org 2015-02-06 11:37 ` jakub 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-64817-4-yQnstYVzsN@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: linkBe 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).