[patch] fix PR65048: check that jump-thread paths are still valid
Jeff Law
law@redhat.com
Tue Feb 17 06:58:00 GMT 2015
On 02/13/15 16:50, Sebastian Pop wrote:
> Hi,
>
> the attached patch fixes PR65048 by checking before jump-threading that a path
> to be threaded is still valid: as the testcase shows, there may be paths that
> are not connected anymore because the cfg has changed in a previous jump-thread.
>
> PR tree-optimization/65048
> * tree-ssa-threadupdate.c (valid_jump_thread_path): New.
> (thread_through_all_blocks): Call valid_jump_thread_path.
> Remove invalid FSM jump-thread paths.
>
> * gcc.dg/tree-ssa/ssa-dom-thread-9.c: New.
>
> The patch passed bootstrap and regression tests on x86_64-linux.
> Ok for trunk?
These kinds of situations are normally pruned out in mark_threaded_blocks.
The dumps for the FSM threads are a bit sparse -- they don't show the
entire path. That makes it much harder to see what's going on.
It also appears that FSM is registering lots of duplicate paths.
grep Registering j*.dom1 | grep -v PHI | sort
Registering FSM jump thread: (10, 12) incoming edge; (15, 3) nocopy;
Registering FSM jump thread: (11, 12) incoming edge; (15, 16) nocopy;
Registering FSM jump thread: (16, 3) incoming edge; (15, 16) nocopy;
Registering FSM jump thread: (5, 10) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (5, 10) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (5, 11) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (5, 11) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (6, 14) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (6, 14) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (6, 3) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (6, 3) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (7, 10) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (7, 10) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (7, 11) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (7, 11) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (8, 14) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (8, 14) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (8, 3) incoming edge; (13, 14) nocopy;
Registering FSM jump thread: (8, 3) incoming edge; (13, 14) nocopy;
Something seems wrong there.
Anyway, so what node precisely is not connected? Is that happening as a
result of the duplicated jump threads or is it something else?
Jeff
More information about the Gcc-patches
mailing list