public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/18576] missing jump threading because of type changes Date: Sat, 20 Nov 2004 17:01:00 -0000 [thread overview] Message-ID: <20041120170130.29288.qmail@sourceware.org> (raw) In-Reply-To: <20041120062915.18576.pinskia@gcc.gnu.org> ------- Additional Comments From steven at gcc dot gnu dot org 2004-11-20 17:01 ------- I have the following in the .optimized dump: flow_bb_inside_loop_p (loop, source_loop) { unsigned char D.1171; struct loop * D.1170; struct loop * * D.1169; struct loop * * D.1168; unsigned int D.1167; unsigned int D.1166; struct loop * * D.1165; int D.1164; int D.1163; int iftmp.0; int D.1161; struct loop * outer; struct loop * loop; unsigned char D.1146; unsigned char D.1145; int iftmp.1; int D.1140; int D.1160; # BLOCK 0 # PRED: ENTRY [100.0%] (fallthru,exec) if (loop == source_loop) goto <L8>; else goto <L0>; # SUCC: 6 [10.4%] (true,exec) 1 [89.6%] (false,exec) # BLOCK 1 # PRED: 0 [89.6%] (false,exec) <L0>:; D.1164 = loop->depth; if (source_loop->depth <= D.1164) goto <L4>; else goto <L1>; # SUCC: 4 [50.0%] (true,exec) 2 [50.0%] (false,exec) # BLOCK 2 # PRED: 1 [50.0%] (false,exec) <L1>:; if (loop != *(source_loop->pred + (struct loop * *) ((unsigned int) D.1164 * 4))) goto <L4>; else goto <L2>; # SUCC: 4 [81.0%] (true,exec) 3 [19.0%] (false,exec) # BLOCK 3 # PRED: 2 [19.0%] (false,exec) <L2>:; iftmp.0 = 1; goto <bb 7> (<L14>); # SUCC: 7 [100.0%] (fallthru,exec) # BLOCK 4 # PRED: 1 [50.0%] (true,exec) 2 [81.0%] (true,exec) <L4>:; iftmp.0 = 0; # SUCC: 7 [100.0%] (fallthru) # BLOCK 7 # PRED: 4 [100.0%] (fallthru) 3 [100.0%] (fallthru,exec) <L14>:; if ((unsigned char) (int) (unsigned char) iftmp.0 != 0) goto <L8>; else goto <L7>; # SUCC: 6 [33.0%] (true,exec) 5 [67.0%] (false,exec) # BLOCK 5 # PRED: 7 [67.0%] (false,exec) <L7>:; iftmp.1 = 0; goto <bb 8> (<L15>); # SUCC: 8 [100.0%] (fallthru,exec) # BLOCK 6 # PRED: 0 [10.4%] (true,exec) 7 [33.0%] (true,exec) <L8>:; iftmp.1 = 1; # SUCC: 8 [100.0%] (fallthru) # BLOCK 8 # PRED: 6 [100.0%] (fallthru) 5 [100.0%] (fallthru,exec) <L15>:; return (int) (unsigned char) iftmp.1; # SUCC: EXIT [100.0%] } Control flow graph: ENTRY | 0 |\ | \ 1 \ |\ \ | \ \ 2 \ \ |\ | | | \| | 3 4 | | / | |/ | 7 / |\ / | \ / 5 6 | / |/ 8 | EXIT Dominator tree: 0 /|\ 6 8 1 /|\ 4 7 2 | | 5 3 The problematic part is here: # BLOCK 3 # PRED: 2 [19.0%] (false,exec) <L2>:; iftmp.0 = 1; goto <bb 7> (<L14>); # SUCC: 7 [100.0%] (fallthru,exec) # BLOCK 4 # PRED: 1 [50.0%] (true,exec) 2 [81.0%] (true,exec) <L4>:; iftmp.0 = 0; # SUCC: 7 [100.0%] (fallthru) # BLOCK 7 # PRED: 4 [100.0%] (fallthru) 3 [100.0%] (fallthru,exec) <L14>:; if ((unsigned char) (int) (unsigned char) iftmp.0 != 0) goto <L8>; else goto <L7>; # SUCC: 6 [33.0%] (true,exec) 5 [67.0%] (false,exec) Possible causes of the missed jump thread: 1) Are casts getting in the way? 2) Do we need that one of edges into the condition we want to thread through dominates the block? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18576
next prev parent reply other threads:[~2004-11-20 17:01 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-20 6:29 [Bug tree-optimization/18576] New: " pinskia at gcc dot gnu dot org 2004-11-20 6:37 ` [Bug tree-optimization/18576] " pinskia at gcc dot gnu dot org 2004-11-20 6:43 ` pinskia at gcc dot gnu dot org 2004-11-20 16:44 ` steven at gcc dot gnu dot org 2004-11-20 17:01 ` steven at gcc dot gnu dot org [this message] 2004-11-20 17:11 ` pinskia at gcc dot gnu dot org 2004-11-20 17:11 ` steven at gcc dot gnu dot org 2004-11-20 17:57 ` [Bug tree-optimization/18576] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org 2004-11-24 22:38 ` steven at gcc dot gnu dot org 2004-11-25 0:22 ` law at redhat dot com 2004-12-12 17:26 ` kazu at cs dot umass dot edu 2004-12-12 17:42 ` kazu at cs dot umass dot edu 2004-12-13 16:33 ` law at redhat dot com 2004-12-13 17:13 ` kazu at cs dot umass dot edu 2004-12-13 17:28 ` law at redhat dot com 2004-12-22 14:08 ` kazu at cs dot umass dot edu 2005-01-06 14:43 ` tobi at gcc dot gnu dot org 2005-03-22 19:26 ` pinskia at gcc dot gnu dot org 2005-05-19 17:38 ` mmitchel at gcc dot gnu dot org 2005-07-22 21:12 ` pinskia at gcc dot gnu dot org 2005-09-27 16:17 ` mmitchel at gcc dot gnu dot 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=20041120170130.29288.qmail@sourceware.org \ --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).