Fix PR 65177: diamonds are not valid execution threads for jump threading
Sebastian Pop
sebpop@gmail.com
Wed Mar 25 23:09:00 GMT 2015
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
More information about the Gcc-patches
mailing list