This is the mail archive of the 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: New attempt: subword-based DCE, PR42575

> Or something else may happen entirely.  Can you enumerate all the ways dead
> code can happen for non-subregs and fix each in a way that does not involve
> running DCE? I'm sure you'll agree that attempting this would be absurd.

All certainly not, indeed, the significant ones would be good enough as a 
first approach.  If, in the process of doing that, there is some evidence 
that there are too many of them, then, yes, adding a custom pass is probably 
the best approach.

> As for effort - for reference, below is the lower-subreg patch I
> experimented with (and intend to finish, eventually) after you suggested
> your second patch.  You can judge for yourself whether that constitutes
> trying very hard.

Indeed, now I see it, thanks for posting the patch.

> Well, we can _never_ know what it would take to enhance existing code,
> unless you manage to enumerate every way dead code can appear in the
> RTL.  Your approach can never fix the problem entirely, since it would
> only add one band-aid for every instance of the problem we find.

No band-aids, just small improvements.  This is the way I think production 
compilers should evolve, unless there is clear evidence that some "quantum 
leap" is required.  PR42575 wasn't such a clear evidence to me.

> I don't disagree that we should be doing these kinds of fixes if we find
> they make the compiler better (again, see the patch below), but it can
> never fix the _class_ of problems.

If there is a class of problems.  So you're thinking that eliminating dead 
word-sized subregs of multi-word registers is a class of problems on its own, 
whereas I'm thinking that it's the intersection of other classes of problems.
That would indeed sort of explain the total disagreement.

Eric Botcazou

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