On 11/30/2011 12:09 AM, Jeff Law wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/29/11 15:03, Vladimir Makarov wrote:
This patch contains a part of my several last weeks work on LRA.
1. The major change is to add pseudo live range split
transformation to the existing inheritance transformations. The
idea is to create a new split pseudo, add save/restore code using
the split pseudo in EBB for a pseudo got hard register which
intersects a few reload pseudos live ranges with high register
pressure, and assign the original pseudo hard register to the split
pseudo. The transformation is undone if the split pseudo did not
change his hard register or was not spilled in the assignment pass
which is between the passes doing and undoing inheritance/split
transformations.
This new functionality of LRA (pseudo range splitting) permits to
move a separate caller saves pass into inheritance/split
transformation pass. This makes LRA smaller and a bit faster.
2. The patch adds the code for correct update of debug insns for
inheritance/split transformations. So I believe that now LRA
deals with debug info not worse than reload pass.
3. The patch rewrite the way of dealing with the secondary memory
moves in constraint pass of LRA. Previously we generated
secondary moves if macro SECONDARY_MEMORY_NEEDED says so.
Unfortunately, the macro is usually defined inaccurately.
Therefore now we emit secondary moves only if insn constraints are
not satisfied (in other words we need reloads for given move).
This change permitted to solve last degradations on GCC testsuite
for x86-64/x86 in comparison when the reload pass is used.
4. The patch also rewrites code for dealing with secondary memory
moves in PPC. PPC port is single one allocating explicitly stack
slot for secondary memory of given mode through using macro
SECONDARY_MEMORY_NEEDED_RTX. The patch rejects this approach for
LRA and uses a pseudo for secondary memory and this pseudo gets
memory as in standard mechanism for spilling in LRA. This permits
reuse the slots allocated for secondary memory for other spilled
pseudo decreasing allocated stack slot size in some case. This
change will permit to remove SECONDARY_MEMORY_NEEDED_RTX (as many
others) if LRA is in GCC finally.
5. There are other small and insignificant changes in the patch
mostly to fix some bugs and testsuite degradations.
The patch was successfully bootstrapped on x86/x86-64, ppc64, and
itanium. Arm bootstrap is still going.
Committed to LRA branch as rev. 181820.
BTW, have you noticed the regressions creeping up on the lra branch
relative to the mainline? We also need to merge in the api change to
pass in address spaces to base_reg_class. I've avoided merging in
that specific change during my weekly merges.
Yes, the trunk even now is not stable. I was struggling with itanium
and shrink-wrapping optimizations. I guess there were a lot of changes
last minutes on stage1 on the trunk which should still be addressed.
Thanks for your regular work on merging the branch, Jeff.
I haven't looked at the overall framework you've built for splitting,
but the obvious question, can your framework handle splitting
unallocated pseudos on EBB boundaries?
LRA can split now pseudos assigned to hard registers in EBB including on
EBB borders. The analogous effect of splitting spilled pseudos (and
further assignment to its part in the EBB) can be achieved by already
existing inheritance in EBB.