This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Removing redundant loads
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Jason Merrill <jason at redhat dot com>,Diego Novillo <dnovillo at redhat dot com>,gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 03 Jun 2003 14:45:52 -0400
- Subject: Re: [tree-ssa] Removing redundant loads
- References: <200306010205.h5125Q8G024851@speedy.slc.redhat.com> <1054657691.3227.387.camel@p4>
On Tue, 2003-06-03 at 12:28, Andrew MacLeod wrote:
> So, this removing redundant loads patch is what is causing the bootstrap
> failure with overlapping live ranges, so it would appear that there is
> more to this than meets the eye...
> And of course Jeff isn't around all this week :-)
> I will look at it for a bit... but If I dont get anywhere with it
> perhaps we ought to revert it until we can look at it closer...
As usual, its much better to investigate than jump to conclusions :-)
Jeff's off the hook. I took a quick look at the redundant loads, and
they all *seemed* fine...
Turns out the problem was in my live on entry code. It was suppose to
process all the PHI nodes for a basic block, and then all the stmts.
Furthermore, it was suppose to do the PHI nodes in two parts, the
arguments first, then the DEFs. This makes the PHI nodes look
simultaneous. This is not what it was doing. It was processing DEF's as
it saw them. So
a_3 = PHI <a_1, a_2>
b_3 = PHI <b_2, a_3>
were processed sequentially. It thought it had seen a defintion of a_3,
so it didnt make a_3 live on the incoming edge for b_3's PHI... a_3 was
suppose to be live all around the loop, but it wasn't being marked as
This is what was causing the problem in combination with the opportunity
presented by copyprop and redundant loads. There was a b_5 = a_3, and
copy prop moved the a_3 into the PHI node to replace b_5, et voila.
Hopefully thats the last one. :-)
Bootstrap is underway... again.