This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, PR61776] verify_flow_info failed: control flow in the middle of basic block with -fprofile-generate
- From: Wei Mi <wmi at google dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, David Li <davidxl at google dot com>, Martin Jambor <mjambor at suse dot cz>
- Date: Tue, 12 Aug 2014 13:56:25 -0700
- Subject: Re: [PATCH, PR61776] verify_flow_info failed: control flow in the middle of basic block with -fprofile-generate
- Authentication-results: sourceware.org; auth=none
- References: <CA+4CFy7sLjEWstfiHGYAv77iXitaYbRBTRpi+JUwz641VSFhBQ at mail dot gmail dot com> <CAFiYyc3TO_o1_taze9F6h+-qNOxmMqCDJ_VZLdDz17MmUfXJzA at mail dot gmail dot com> <CA+4CFy7a=CbTVSnpchKBqQjomw8Fc6kHWK2BkVDBVddyCRwO5A at mail dot gmail dot com>
On Sun, Jul 27, 2014 at 11:08 PM, Wei Mi <firstname.lastname@example.org> 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?