public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Wei Mi <wmi@google.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Jan Hubicka <hubicka@ucw.cz>, 	David Li <davidxl@google.com>,
	Martin Jambor <mjambor@suse.cz>
Subject: Re: [PATCH, PR61776] verify_flow_info failed: control flow in the middle of basic block with -fprofile-generate
Date: Tue, 12 Aug 2014 20:56:00 -0000	[thread overview]
Message-ID: <CA+4CFy48pjzgSGyhF4eWVZokSDD87PcJ0YQvRZz2KhuE3F8yxQ@mail.gmail.com> (raw)
In-Reply-To: <CA+4CFy7a=CbTVSnpchKBqQjomw8Fc6kHWK2BkVDBVddyCRwO5A@mail.gmail.com>

Ping.

On Sun, Jul 27, 2014 at 11:08 PM, Wei Mi <wmi@google.com> wrote:
>> But fact is that it is _not_ necessary to split the block because there
>> are no outgoing abnormal edges from it.
>>
>> The verifier failure is an artifact from using the same predicates during
>> CFG building and CFG verifying (usually ok, but for this particular
>> case it leads to this issue).
>>
>> So I don't think your patch is the proper way to address this issue
>> (while it certainly works).
>>
>> Instead whether a call can make abnormal gotos should be recorded
>> per-call and stored on the gimple-call.  Martin - this is exactly
>> one of the cases your patch would address?
>>
>
> Thanks for the comment and thanks to Martin's patch. I try the patch.
> It works well to address both pr60449 and pr61776 after some
> extension. One extension is to replace GF_CALL_LEAF attribute using
> GF_CALL_NO_ABNORMAL_GOTO. That is because not only dropping "leaf"
> attribute in lto symbol merge could introduce the control flow
> verification problem in pr60449, dropping "const/pure" attributes
> could introduce the same problem too. It is unnecessary to introduce
> per-call attributes for all these three: ECF_LEAF/ECF_CONST/ECF_PURE,
> so GF_CALL_NO_ABNORMAL_GOTO is introduced to indicate that a call stmt
> has no abnormal goto.
>
> GF_CALL_NO_ABNORMAL_GOTO will be set according to gimple_call_flags()
> once gimple call stmt is created, then updated in execute_fixup_cfg
> and cleanup_tree_cfg.
>
> I posted the extended patch here. I didn't add the noreturn part in
> because it has no direct impact on pr60449 and pr61776. I can help
> Martin to test and post that part as an independent patch later.
>
> bootstrap and regression pass on x86_64-linux-gnu. Is it ok?
>
> Thanks,
> Wei.

  reply	other threads:[~2014-08-12 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 18:21 Wei Mi
2014-07-21 18:21 ` Wei Mi
2014-07-23  9:58 ` Richard Biener
2014-07-23 12:48   ` Martin Jambor
2014-07-23 13:47     ` Richard Biener
2014-07-28  6:40   ` Wei Mi
2014-08-12 20:56     ` Wei Mi [this message]
2014-08-14 14:32     ` Richard Biener
2014-08-19 18:46       ` Wei Mi
2014-08-20 14:18         ` Richard Biener

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=CA+4CFy48pjzgSGyhF4eWVZokSDD87PcJ0YQvRZz2KhuE3F8yxQ@mail.gmail.com \
    --to=wmi@google.com \
    --cc=davidxl@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=mjambor@suse.cz \
    --cc=richard.guenther@gmail.com \
    /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).