This is the mail archive of the gcc@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: [RFC] Contributing tree-ssa to mainline



On Jan 17, 2004, at 8:47 AM, Florian Weimer wrote:


Diego Novillo wrote:

On Fri, 2004-01-16 at 22:24, Richard Kenner wrote:

Remember that the last time we had the discussion of the timing of tree-ssa,
people claimed it was "essential" for 3.5 since there was a tremendous
improvement on some C++ cases. So let's see those cases.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12747

I've been toying with boost::tie() lately, and the temporary tuple is still *not* eleminated in the interesting cases, unfortunately.

For an example, look at the code generated for bar(foo&) and baz(foo&)
below, which should be quite similar once the template metaprogram has
been expanded.  However, in the template case, indirection through
references still clutters the generated machine code.

We can do better; bar_neg(foo&) and baz_neg(foo&) show this.  The
template version results in identical code in this case, except that
unnecessary space is allocated on the stack.  (However, this
optimization happens on mainline, too, not just on the branch.)

(Probably this is a different issue, but I had hoped that the tree-ssa
branch would somehow improve things in this area.)

As Diego stated when SRA was committed, the following limitation exists:
/* Maximum number of fields that a structure should have to be scalarized.
FIXME This limit has been arbitrarily set to 5. Experiment to find a
sensible setting. */
#define MAX_NFIELDS_FOR_SRA 5


This was done, IIRC, to avoid severely increased register pressure.

If you want SRA to do something on your structure, you'll need to increase that limit
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]