[PATCH]: Rewrite tree level PRE

Daniel Berlin dberlin@dberlin.org
Mon Jul 7 16:49:00 GMT 2008


I've attached the latest, and what i plan on committing, which also
fixes a speed issue Richard found in interpert.ii from libjava.

The differences between thisand the last one is that
iterative_hash_hashval_t is made externally visible in tree.c.



On Sun, Jul 6, 2008 at 3:30 PM, Daniel Berlin <dberlin@dberlin.org> wrote:
> I got it going on my home machine.
> The attached fixes the problem.
>
>
> On Sun, Jul 6, 2008 at 1:46 PM, Daniel Berlin <dberlin@dberlin.org> wrote:
>> On Sun, Jul 6, 2008 at 10:32 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Sun, Jul 6, 2008 at 6:33 AM, Daniel Berlin <dberlin@dberlin.org> wrote:
>>>> This patch effectively rewrites tree PRE to share datastructures with
>>>> tree-vn, instead of copying statements and modifying trees (which
>>>> don't work so well in a tuples world :P).
>>>>
>>>> As part of the rewrite, it also fixes a bunch of missed optimizations
>>>> because PRE will now move globals.
>>>> It also uses roughly half as much memory as before (since PRE no
>>>> longer copies statements but instead shares the vn structures with the
>>>> vn).
>>>> The fundamentals are the same as they were before, it simply no longer
>>>> does it's own value numbering.
>>>> Since PRE was the only user of VALUE_HANDLES, i have removed them as
>>>> part of this patch.
>>>> Since PRE was the only user of most of tree-vn.c, i removed it and
>>>> moved the 3 still-used functions to tree-ssa-sccvn.c
>>>> PRE is also now type correct, in that the insertions it creates should
>>>> have matched types, whereas before they were generally a mismash (it
>>>> would happily create phi nodes whose arguments had mixed types, etc).
>>>>
>>>> This patch will cause some FRE failures due to a small bit of code i
>>>> disabled in tree-ssa-sccvn.c.  I have discussed this with richard
>>>> guenther and he has said he will fix it up, so the ssa-fre-* failures
>>>> are temporary.
>>>>
>>>> Other than than PRE of globals, it should PRE all of the expressions
>>>> we used to, plus a few more in the way of loads.  I have verified this
>>>> by hand comparing the eliminations performed during a bootstrap of
>>>> gcc.
>>>> I have not performed more benchmarking than that, as the main goal was
>>>> a feature equivalent rewrite that would enable tuple conversion to
>>>> procede. The fact that it will PRE globals is simply a side effect of
>>>> sharing a representation with the VN.
>>>>
>>>> The patch is large but 99% of it is the rewritten tree-ssa-pre.c.
>>>>
>>>> Bootstrapped and regtested on i686-darwin (With the safe-ctype change
>>>> reverted) and i686-linux.
>>>> I will wait a few days for comments before committing it (All the code
>>>> outside of PRE that I am removing was added as part of PRE, but if
>>>> someone wants to object to it's removal, please let me know).
>>>
>>> This triggers a latent issue in SCCVN (it breaks bootstrap on x86_64 with Ada).
>>>
>>
>> I don't have an ada compiler on my x86_64. If i send you an updated
>> patch, can you test it for me with ada?
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newpre.diff
Type: text/x-diff
Size: 181325 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080707/2229ba9e/attachment.bin>


More information about the Gcc-patches mailing list