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: Proposal for path splitting for reduction in register pressure for Loops.

-----Original Message-----
From: Richard Biener [] 
Sent: Sunday, March 08, 2015 9:05 PM
To: Ajit Kumar Agarwal;; Jeff Law;
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 <> 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.

Thanks & Regards


>Thanks & Regards

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