This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH 0/2] Loop distribution for memset zero


On Sat, Jul 31, 2010 at 05:01, Richard Guenther
<richard.guenther@gmail.com> wrote:
> The new pass should be disabled when loop-distribution is enabled, no?
> Thus, I think it would make more sense to fold it into the existing pass
> which then runs in different modes depending on the flags used.

I will do that and resubmit the patch.

>
> The flag should be named more general, like -ftree-loop-distribute-patterns

What about adding both -ftree-loop-distribute-patterns and
-ftree-loop-distribute-memset-zero, such that we can control what
patterns are detected, and to enable all these patterns together we'll
have -ftree-loop-distribute-patterns.

> as we probably want to add memcpy or array sin/cos operations as well
> here.

I can imagine the memcpy pattern, but could you please provide an
example for sin/cos patterns?

> Now the code looks very specific at the moment, with
> stores_zero_from_loop. ?I suppose we can't ask loop distribution
> to separate stores as is but then only generate separate code for
> the memset and ask it to keep the other pieces together?

That is the intent of the worklist: the worklist contains the roots of
the partitions that have to be generated.  The partitions are then
augmented with only those dependences that form a cycle (SCC) around
the root.  For A[i] = 0, there is no way to aggregate around it
anything else.  The rest of the loop is generated in the default
remaining partition.

Sebastian


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