This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR 65177: diamonds are not valid execution threads for jump threading
- From: Sebastian Pop <sebpop at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Mar 2015 23:09:17 +0000
- Subject: Re: Fix PR 65177: diamonds are not valid execution threads for jump threading
- Authentication-results: sourceware.org; auth=none
- References: <20150318223541 dot GA17168 at f1 dot c dot bardezibar dot internal> <CAFiYyc04U3Yvji=jp+A3shgR+fgZp4fF9A_C2KVGeTd6uDF47A at mail dot gmail dot com> <20150319195402 dot GA21421 at f1 dot c dot bardezibar dot internal> <5512A850 dot 8040805 at redhat dot com>
Jeff Law wrote:
> > PR tree-optimization/65177
> > * tree-ssa-threadupdate.c (verify_seme): Renamed verify_jump_thread.
> > (bb_in_bbs): New.
> > (duplicate_seme_region): Renamed duplicate_thread_path. Redirect all
> > edges not adjacent on the path to the original code.
> OK for the trunk.
Committed r221675.
> Though I think there's some stage1 refactoring that we're going to want to do.
Agreed.
> Specifically, it seems to me that copy_bbs should be refactored into
> copy_bbs and copy_bbs_for_threading or somesuch. Where those
> routines call into refactored common subroutines, but obviously
> handle wiring up the outgoing edges from the copied blocks
> differently.
>
That would be a good cleanup: I don't like to arbitrarily redirect edges in
copy_bbs just to redirect them back to their initial place in the caller.
> The goal would be to eliminate the overly complex block copy/CFG
> update scheme in tree-ssa-threadupdate.c as part of a larger project
> to convert to a backward threader that can run independently of DOM.
I have a start of a patch for that cleanup, it currently runs wild as it would
replace the existing threadupdate code generator with a call to the new
duplicate_thread_path. I think we should take smaller more manageable steps to
ease the review and to not destabilize the jump-threader. In particular I think
we should have both code generators for a while and turn one on/off with an option.
Sebastian