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] New loop flattening pass on tree-ssa


On Wed, Oct 27, 2010 at 2:32 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> On Wed, Oct 27, 2010 at 13:23, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Tue, Oct 26, 2010 at 4:49 PM, Sebastian Pop <sebpop@gmail.com> wrote:
>>> On Tue, Oct 26, 2010 at 14:44, Richard Guenther
>>> <richard.guenther@gmail.com> wrote:
>>>> What's the motivation for adding a 2nd unconditional if-conversion pass?
>>>
>>> I guess we could make the second if-conversion a sub-pass of
>>> loop-flat, such that it applies only if we flattened some loop.
>>
>> At least that. ?Why does loop flattening not remove the forward edges itself?
>
> Because we already have the if-conversion pass that does that.
>
> We could make loop flattening directly call the if-conversion
> of the loop that was flattened. ?Then loop flattening would look
> like what you suggest. ?Do you want me to implement this change?

Well, loop flattening knows exactly which things to if-convert so it is very
wasteful to throw a full if-conversion on the whole function.  It seems
loop flattening could simply use the if-conversion infrastructure to
if-convert the forward edges that are needed to be converted (and
eventually avoid flattening if if-conversion isn't possible).

Note that I didn't look into the flattening pass itself yet.  It'll also
prevent prefetching and unrolling I guess?

Richard.

> Thanks,
> Sebastian
>


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