This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH]: Rewrite tree level PRE


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?


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