public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: Andreas Schwab <schwab@suse.de>,
	       Richard Biener <richard.guenther@gmail.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix middle-end/67133, part 1
Date: Thu, 20 Aug 2015 16:59:00 -0000	[thread overview]
Message-ID: <55D60759.6020107@redhat.com> (raw)
In-Reply-To: <20150820165145.GF2729@redhat.com>

On 08/20/2015 10:51 AM, Marek Polacek wrote:
>>
>> Based on the error, I suspect we've got a block ending with a GIMPLE_COND
>> with no successors in the CFG.
>
> Except that I'm also seeing a different error:
> /home/brq/mpolacek/gcc/libgo/go/text/template/exec.go:303:1: error: wrong
> outgoing edge flags at end of bb 6
> We have this bb:
>
> <bb 6>:
> # iftmp.1693_53 = PHI <0B(4)>
> _54 = t_5(D)->Pipe;
> GOTMP.163 = template.evalPipeline.pN19_text_template.state (s_7(D), dot, _31);
> [return slot optimization]
> dot = GOTMP.163;
> _61 = __go_new (&__go_tdn_text_template..text_template.state, 64);
> *_35 = *s_7(D);
> # DEBUG newState => _35
> _35->tmpl = iftmp.1693_55;
> GOTMP.166.value = dot;
> _66 = __go_new (&__go_td_AN22_text_template.variable1e, 40);
> SR.4170_67 = "$";
> SR.4171_68 = 1;
> MEM[(struct .text/template.variable *)&GOTMP.166] = "$";
> MEM[(struct .text/template.variable *)&GOTMP.166 + 8B] = 1;
> MEM[(struct .text/template.variable[1] *)_40][0] = GOTMP.166;
> _35->vars.__values = _40;
> _35->vars.__count = 1;
> _35->vars.__capacity = 1;
> _75 ={v} iftmp.1693_55->Tree;
> __builtin_trap ();
> _76 = _46->Root;
> D.8248.__methods =
> &__go_pimt__I25_.text_template_parse.treeFrpN24_text_template_parse.Treeee4_CopyFrN24_text_template_parse.Nodeee8_PositionFrN23_text_template_parse.Posee6_StringFrN6_stringee4_TypeFrN28_text_template_parse.NodeTypeeee__N28_text_template_parse.ListNode;
> D.8248.__object = _47;
> template.walk.pN19_text_template.state (_35, dot, D.8248);
> return;
>
> and single_succ_p (bb) is not satisfied, so it must have more outgoing edges.
> Not sure how can that happen...
OK, iftmp.1693_55 is NULL (via the PHI).  We inserted the trap.  That 
looks reasonable.

What does the CFG look like after splitting the block?   There should be 
flags you can pass to get the edges & flags as part of the debugging output.

My first guess would be some kind of exception handling edge, but I 
thought we avoided the transformation in that case.

Hmm, maybe seeing the CFG with edges & flags at the time of trap 
insertion would be useful too.


Jeff

  reply	other threads:[~2015-08-20 16:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14 11:51 Marek Polacek
2015-08-14 13:19 ` Richard Biener
2015-08-14 13:36   ` Marek Polacek
2015-08-14 14:54     ` Jeff Law
2015-08-14 15:33       ` Marek Polacek
2015-08-14 15:39         ` Jeff Law
2015-08-14 20:12           ` Marek Polacek
2015-08-14 20:36             ` Jeff Law
2015-08-14 21:48               ` Marek Polacek
2015-08-17 17:47                 ` Jeff Law
2015-08-17 18:01                   ` Marek Polacek
2015-08-18  8:47                   ` Richard Biener
2015-08-18 20:09                     ` Marek Polacek
2015-08-19  9:54                       ` Richard Biener
2015-08-19 10:39                         ` Marek Polacek
2015-08-19 14:25                       ` Jeff Law
2015-08-20  9:05                       ` Andreas Schwab
2015-08-20 10:50                         ` Marek Polacek
2015-08-20 10:58                           ` Andreas Schwab
2015-08-20 16:42                           ` Jeff Law
2015-08-20 16:59                             ` Marek Polacek
2015-08-20 16:59                               ` Jeff Law [this message]
2015-08-20 17:02                               ` Marek Polacek
2015-08-20 17:11                                 ` Jeff Law
2015-08-23 10:54                         ` Jan-Benedict Glaw
2015-08-24 15:55                           ` Jeff Law
2015-08-24 16:15                             ` Marek Polacek

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=55D60759.6020107@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=polacek@redhat.com \
    --cc=richard.guenther@gmail.com \
    --cc=schwab@suse.de \
    /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).