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 PR82163]Rewrite loop into lcssa form instantly


On Fri, Sep 15, 2017 at 12:49 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Thu, Sep 14, 2017 at 5:02 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>> Hi,
>> Current pcom implementation rewrites into lcssa form after all loops are transformed, this is
>> not enough because unrolling of later loop checks lcssa form in function tree_transform_and_unroll_loop.
>> This simple patch rewrites loop into lcssa form if store-store chain is handled.  I think it doesn't
>> affect compilation time since rewrite_into_loop_closed_ssa_1 is only called for store-store chain
>> transformation and only the transformed loop is rewritten.
>
> Well, it may look like only the transformed loop is rewritten -- yes,
> it is, but rewrite_into_loop_closed_ssa
> calls update_ssa () which operates on the whole function.
I see.
>
> So I'd rather _not_ do this.
>
> Is there a real problem or is it just the overly aggressive checking
> done?  IMHO we should remove
In this case, it's the check itself.
> the checking or pass in a param whether to skip the checking.  Or even
> better, restrict the
> checking to those loops trans_form_and_unroll actually touches.
Yes, will see if we can check loops only related to trans_form_and_unroll.

Thanks,
bin
>
> Richard.
>
>> Bootstrap and test ongoing on x86_64.  is it OK if no failures?
>>
>> Thanks,
>> bin
>> 2017-09-14  Bin Cheng  <bin.cheng@arm.com>
>>
>>         PR tree-optimization/82163
>>         * tree-predcom.c (tree_predictive_commoning_loop): Rewrite into
>>         loop closed ssa instantly.  Return boolean true if loop is unrolled.
>>         (tree_predictive_commoning): Return TODO_cleanup_cfg if loop is
>>         unrolled.
>>
>> gcc/testsuite
>> 2017-09-14  Bin Cheng  <bin.cheng@arm.com>
>>
>>         PR tree-optimization/82163
>>         * gcc.dg/tree-ssa/pr82163.c: New test.


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