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: [tree-ssa] Removing redundant loads


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
such. Doh!

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.

Andrew


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