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] Make tree-ssa-pre FRE/PRE handle load after store


On Tue, 2005-09-06 at 19:25 +0200, Steven Bosscher wrote:
> On Tuesday 06 September 2005 19:20, Steven Bosscher wrote:
> > Hi,
> >
> > This patch allows the FRE and PRE passes in tree-ssa-pre.c to
> > look through loads.  This should subsume the things DOM does
> > with create_artificial_load_stmt, which I hope to remove.
> >
> > It also makes DOM iterate a bit less often in a few cases.
> >
> > Bootstrapped&tested on x86_64-unknown-linux-gnu.  OK?
> >
> > Gr.
> > Steven
> >
> >
> > 	* tree-ssa-pre.c (try_look_through_load): New function.
> > 	(compute_avail): Use it to try to look through loads for some
> > 	more useful expressions.
> 
> I see I attached the wrong patch.  The ChangeLog is the same, but
> the remnants of earlier iterations are cleaned up in this one :-)
> 


The only part i don't quite understand is why you wait till you see a
load.
In fact, that seems like it will not handle copies of copies of
copies, ....
We already value number loads on the RHS, so if you just set the value
number of the store expression to the right thing, it should come up
with the right answer for those loads.

So is there something i have missed?

(Though i can imagine you may have tried this and discovered it will try
to use vuses on the store statement if you pass it to vn_lookup, but i
can fix that for you post-haste)


--Dan



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