This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lno] [patch] vectorization with unknown loop bound

On May 18, 2004, at 21:13 PM, Devan Patel wrote:

> > How would you suggest to use tree_ssa_loop_version () function?
> >
> > I looked at it before starting implementation also as at
> > tree-duplicate-loop-to-header-edge () and
> > duplicate-loop-to-header-edge ().
> >
> > In my understanding, later two function in general
> > do the following:
> >      - sequentially concatenate basic blocks of loop
> > a given number of times
> >      - straiten loop latch edges in order to generate one loop
> >      - update ssa info (phis, names,...) of loop copies

> tree_ssa_loop_version () uses loopify ()
> loopify () uses tree_duplicate_loop_to_header_edge ()

In current version the tree_duplicate_loop_to_header_edge () uses
duplicate_loop_to_header_edge () and loopify () does not.

> tree_duplicate_loop_to_header_edge () uses
> duplicate_loop_to_header_edge ()

> tree_duplicate_loop_to_header_edge () handles copying basic blocks
> and fixing phis.

duplicate_loop_to_header_edge () called from
tree_duplicate_loop_to_header_edge () handles copying basic blocks,
while tree_duplicate_loop_to_header_edge () handles changes of ssa
info (names, phis, ...)

>                  If you can use it directly and write generic
> transformation, as Zdenek suggested, then lot of code duplication can
> be avoided.

While I cannot use tree_duplicate_loop_to_header_edge ()
directly, there is a lot of auxiliary functions from
tree-ssa-loop-manip.c I am using.

Unfortunately, both tree_duplicate_loop_to_header_edge () and
duplicate_loop_to_header_edge () actually duplicate loop
BODY ( loop unrolling ) generating as a result one loop
while what I need is duplication of the whole loop and two loops
as a result. Thus, for example, fixing phis in
tree_duplicate_loop_to_header_edge () is different also
as control flow changes in duplicate_loop_to_header_edge ().


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]