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: PR 23551: why should we coalesce inlined variables?

On Jul  9, 2007, "Richard Guenther" <> wrote:

> On 7/9/07, Alexandre Oliva <> wrote:
>> On Jul  9, 2007, "Richard Guenther" <> wrote:
>> > So improve the way we are collecting information to produce debug info,
>> > but not disable optimizations.
>> +1
>> The patch I proposed has already been shown to not disable
>> optimizations, so I don't see what you're arguing for.

> It disables variable coalescing which is an optimization.

Make that "transformation".  It was shown to decrease overall
performance on few-register arches, and to do so even on many-register
arches for some specific testcases.

> Well, I see no reason we need to increase memory usage for the case
> '-g' is not specified.

Because GCC is by design a compiler that generates the very same code
regardless of -g.  We can't refrain from making certain
transformations depending on -g, because they might change the
generated code.  The mere presence of line number notes or other
annotations has been shown to have effects on certain other
transformations.  For example, the presence of trees holding location
information could affect decisions about inlining or loop unrolling,
and the presence of line number notes in RTL did cause some
differences in code with or without -g in the past.

>> Or should we instead take a more constructive approach and try to find
>> out why memory use exploded because of an increase in the number of
>> user variables inside a function?

> No, we instead should take a more constructive approach and fix the
> problem the right way.  Which is the part of my message you chose to
> not reply to.

The only reason I didn't respond to that portion of your e-mail was
because I'd just responded to similar claims in other e-mails I'd just

But then, what is "the right way"?  If adding a few thousand variables
to a function causes memory use to explode from 1GB to 2GB, and we
manage to avoid that with some variable coalescing, should we take
that as "problem solved" and hope nobody ever comes up with a case in
which coalescing does *not* address it?  Or should we try to find out
what is taking up all this memory, and try to improve *that*, such
that we no longer depend on coalescing to reduce memory use in this
and other cases?

Alexandre Oliva
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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