This is the mail archive of the
mailing list for the GCC project.
Re: Proposal for path splitting for reduction in register pressure for Loops.
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>, "vmakarov at redhat dot com" <vmakarov 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 11:37:12 -0600
- 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>
On 03/08/15 09:35, Richard Biener wrote:
It's more like superblock formation. You duplicate from the join point
into the predecessors. The actual transformation is very similar to
what we do for join blocks in jump threading paths, though we do it in
two steps (first we duplicate the entire join point, then let later
passes merge that into the predecessor if it's profitable to do so)
On March 8, 2015 3:39:08 PM CET, Ajit Kumar Agarwal <email@example.com> wrote:
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
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
Are you talking about loop unswitching?
I'm not sure how much a more generalized path splitter buys us -- PRE
picks up a lot of the redundancies that were traditionally exposed by
superblock formation. And jump threading picks up the branching
redundancies that tend to get exposed.
I've pondered from time to time using jump threader to guide this kind
of transformation -- it actually has enough knowledge to say "hey,
instructions I1, I3, I5 in this this block are actually redundant when
the block is reached via path P". But I've never bothered to implement.
It also doesn't fit well into the long term plans to change the
threader from a forward walk to a backward walk.
LLVM has integrated a very limited form of this transformation into
their jump threader, specifically for memory loads.