This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A problem with the loop structure
- From: "Vladimir Yanovsky" <volodyan at gmail dot com>
- To: "Zdenek Dvorak" <rakdver at kam dot mff dot cuni dot cz>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 7 Jun 2007 15:52:45 +0300
- Subject: Re: A problem with the loop structure
- References: <48ee23ef0704281453s4de4120evfd605de0ec853f54@mail.gmail.com> <20070428224306.GA31398@atrey.karlin.mff.cuni.cz> <48ee23ef0705011423o773500ar58046ed6d63fe252@mail.gmail.com> <20070504001209.GA3976@kam.mff.cuni.cz>
Hi,
The problem with the ICE after the loop versioning in SMS was caused
because the header of the versioned loop was at the same time the
latch of the outer loop. After the versioning the nodes of the newly
created loop could not be accessed by a DFS traversal of the outer
loop starting from its latch (header of the versioned loop), leading
to the ICE on assert that the number of nodes reported by DFS is
nloop->outer->num_nodes.
Solution (for the case of the call in SMS): call
canon_loop(loop->outer) before the call to versioning in the
sms_schedule so that a new empty latch is created for the outer loop.
Thanks,
Vladimir
On 5/4/07, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:
Hello,
> ii)
> In loop_version there are two calls to loop_split_edge_with
> 1. loop_split_edge_with (loop_preheader_edge (loop), NULL);
> 2. loop_split_edge_with (loop_preheader_edge (nloop), NULL);
> nloop is the versioned loop, loop is the original.
>
> loop_split_edge_with has the following:
> new_bb = split_edge (e);
> add_bb_to_loop (new_bb, loop_c);
>
> 1) When we get to the fist call, nloop->outer->num_nodes = 8 while dfs
> returns 6.
then the problem is before this call; you need to check which two blocks
that are marked as belonging to nloop->outer in fact do not belong to
this loop, and why.
Zdenek