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: RFA: tree DSE bug


On Thu, Nov 10, 2005 at 03:50:01PM -0700, Jeffrey A Law wrote:
> On Thu, 2005-11-10 at 17:45 -0500, Daniel Jacobowitz wrote:
> > On Thu, Nov 10, 2005 at 03:43:20PM -0700, Jeffrey A Law wrote:
> > > On Thu, 2005-11-10 at 17:23 -0500, Daniel Jacobowitz wrote:
> > > > > So a potentially simpler solution may be to not allow walking through
> > > > > a PHI when the argument is associated with a back edge in the CFG.
> > > > 
> > > > This I don't know enough to have an opinion on :-)  But it seems like
> > > > it would be unduly pessimal.  For instance, if the array subscript in
> > > > my testcase is changed to be a loop invariant, this would prevent the
> > > > dead store elimination, even though it would be valid.
> > > True, but I really doubt it matters.  DSE doesn't catch a lot of stuff
> > > as it is (we've discussed removing it on this list in the past, which
> > > I've argued against :-).
> > > 
> > > I'd wager there isn't a single real world instance where it would miss
> > > an optimization due to such a change.
> > 
> > Would you like me to test this change instead?
> Let me ponder overnight :-)  My gut tells me it's going to be quite a
> bit simpler.  But I want to let the issue simmer a little while to
> see if I can punch any holes in it.

I got a lot of feedback about this on IRC, so:

What advantage does the simpler test have, if any, now that I've gone
and figured out the correct fix to the existing algorithm?

All the rest of this is independent of the CFG; it seems a bit unclean
to me to rely on backedge detection for an otherwise dominance-based
algorithm.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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