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: New attempt: subword-based DCE, PR42575


> Previously I made the mistake of letting myself get influenced by
> worries about compile-time performance which are IMO completely
> overblown.  There are a number of reasons why compile-time is a
> non-issue in this case, never mind the general observation that
> compilation is embarrassingly parallel in practice:
>
> * the code is guarded by a test in lower-subreg which verifies that
> multiword pseudos exist in the function; that alone makes the
> compile-time impact exactly nil for the majority of code
> * it's replacing an existing, more expensive pass which was approved
> (although later disabled)

A figure is worth a thousand words when it comes to compilation time.  Did you 
measure the impact on a bootstrap of the core compiler on x86 for example?

> This triggers in several testcases other than the one in PR42575, for
> example in crafty or the XFS filesystem (tested with an ARM compiler).
> This demonstrates that it fixes a real-world, general problem that can
> occur for more than one reason.

What reasons?  There are 2 ways to "fix" problems: analyzing the causes and 
eliminating them, or treating the symptoms.  I'm fond of the former approach, 
you're apparently more fond of the latter.

> Last time, Eric posted counter-patches which tried hackish ways of
> tweaking the generated RTL so that the problem is hidden for the PR42575
> testcase; both of these made code generation worse on average and failed
> to fix the more general issue of dead stores into subwords.

Well, I first asked you to investigate why lower-subreg + DCE couldn't achieve 
what you were looking for and whether this could be fixed.  You apparently 
didn't try very hard so I had to; early patches may indeed resemble hacks.

We already run 2 lower-subreg passes and 2+ DCE passes so we should be able to 
eliminate dead assignments to subwords of multiword pseudo-registers with a 
few efforts.  Instead we now have a new DCE pass and we still don't know what 
it would have taken to enhance existing lower-subreg and DCE passes.

-- 
Eric Botcazou


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