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.)