This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Proposal for path splitting for reduction in register pressure for Loops.
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>,"vmakarov at redhat dot com" <vmakarov at redhat dot com>,Jeff Law <law at redhat dot com>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Vinod Kathail <vinodk at xilinx dot com>,Shail Aditya Gupta <shailadi at xilinx dot com>,Vidhumouli Hunsigida <vidhum at xilinx dot com>,Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Sun, 08 Mar 2015 19:13:32 +0100
- Subject: RE: Proposal for path splitting for reduction in register pressure for Loops.
- Authentication-results: sourceware.org; auth=none
- References: <BN1AFFO11OLC004D84D26C6A4468398AD3DAE1A0 at BN1AFFO11OLC004 dot protection dot gbl> <7A0E44F9-1DB4-44C6-85C6-B8DF48E5B589 at gmail dot com> <BY2FFO11OLC0045AF32468170562DF25ACAE1A0 at BY2FFO11OLC004 dot protection dot gbl>
On March 8, 2015 4:58:49 PM CET, Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com> wrote:
>
>
>-----Original Message-----
>From: Richard Biener [mailto:richard.guenther@gmail.com]
>Sent: Sunday, March 08, 2015 9:05 PM
>To: Ajit Kumar Agarwal; vmakarov@redhat.com; Jeff Law; gcc@gcc.gnu.org
>Cc: Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju
>Mekala
>Subject: Re: Proposal for path splitting for reduction in register
>pressure for Loops.
>
>On March 8, 2015 3:39:08 PM CET, Ajit Kumar Agarwal
><ajit.kumar.agarwal@xilinx.com> wrote:
>>Hello All:
>>
>>The path splitting that replicates the code for better Data flow
>>Analysis available. One of the properties of path splitting removes
>the
>>joining nodes for the forked path like IF-THEN-ELSE and the Loops.
>>
>>The removal of joining nodes makes the path splitted into two
>>independent paths.
>>
>>The increase in register Pressures for the loops are the performance
>>bottleneck and sometimes lead to spill code in loops.
>>
>>The removal of joining nodes like loops and IF-THEN-ELSE makes the
>>target independent optimization like CSE and Partial redundancy
>>Elimination effective. Along with ease of these optimization the path
>>splitting reduces the registers because Of the Liveness wont intersect
>
>>because of independent splitted path. The ease of less intersection of
>
>>liveness Reduces the register pressure for the Loops, thus better
>>register allocation and less spilling code for Loops.
>>
>>The heuristics used in IRA code for register pressure will have better
>
>>impact on the splitted path and thus optimized code.
>>
>>Thoughts Please?
>
>>>Are you talking about loop unswitching?
>
>Loop unswitching is a way of path splitting but I am proposing about
>the path splitting for the removal of joining node for the FOR Loops
>with IF-THEN-ELSE path.
>The tail of loop there is a joining node for the iF-THEN-ELSE forked at
>the header or the IF Region. The path splitting removes the joining
>node by splitting the
>path by replicating the code and joining nodes which leads to
>independent path(removing the joining node), thus the live ranges wont
>intersects and there is a
>reduction in the register pressure for the Loops.
>
>The Loop unswitching move the For Loops inside the IF-THEN and IF-ELSE
>path but the path splitting I am proposing would still have the
>IF-THEN-ELSE region
>Inside the loop instead of Loop unswitching but replicate the code for
>the joining nodes and splitting the path into two independent paths.
>Though there is
>Performance bottleneck with the replication of the code and spliiting
>the joining nodes and thus there wont be any joining node. This will
>makes the Live
>Ranges not intersecting thus reducing the register pressure and better
>register allocations.
>
>This makes it to check for the profitability for the reduction in
>register pressure with the replication of joining nodes thus removing
>the joining node.
>I am sure this makes the reduction in register pressure through the
>loops and IF-THEN-ELSE regions inside the Loops and thus better
>register allocation.
>
>Some profitability heuristics need to be added with this optimization.
I see. This basically creates two loop latches and thus will make our loop detection code turn the loop into a fake loop nest. Not sure if that is a good idea.
Richard.
>Thanks & Regards
>Ajit
>
>Richard.
>
>>Thanks & Regards
>>Ajit
>>
>>