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 May 10, 2007, Andrew MacLeod <> wrote:

> On Thu, 2007-05-10 at 04:39 -0300, Alexandre Oliva wrote:
>> We're discarding useful debug info by SSA-coalescing inlined
>> variables.  The reason we refrain from coalescing non-inlined
>> variables is for better debug info.  No other pass pays attention to
>> DECL_FROM_INLINE, and it doesn't look like we generate significantly
>> worse code if we refrain from coalescing these variables.

> Not without some real performance measurement.  We originally added this
> specifically to remove a number of excess copies that heavy inlining
> produces.

But how does this argument not apply to coalescing of variables that
are NOT inlined?  If we are intentionally generating sub-optimal code
for the sake of better debug info in one case, but not in another, and
I don't see that this distinction is defensible.

> It might also be possible to 'save' the original name in a table, and if
> a useful coalesce was not performed at out of ssa time, rename the
> variable back, or choose the most 'useriest' name amongst a coalesce
> group... That might also help debug info a bit.

Yup, I've been pondering about this and other approaches to avoid
discarding useful information even while optimizing.  Any pointers and
suggestions are welcome.

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]