This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [C++ PATCH] Don't create an INTEGER_CST for aggregates (emptystructs)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>,GCC Patches <gcc-patches at gcc dot gnu dot org>,libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sat, 12 Mar 2005 10:34:44 +0100
- Subject: Re: [C++ PATCH] Don't create an INTEGER_CST for aggregates (emptystructs)
- References: <9a23c41857b1b1161e9d02c278ba5592@physics.uc.edu> <42308EA6.1010408@suse.de> <85c98d4cd9d0e7435f8517e9a69ac136@physics.uc.edu> <m3ll8ty00m.fsf@uniton.integrable-solutions.net>
Gabriel Dos Reis wrote:
There is no way (C++-wise and ABI-wise) you tell when a value of empty
class has been loaded in a register or not. An empty class does not
contain any data: Everything is in the type -- which is a purely
compile-time construct.
Thanks Gaby (and Andrew) for your clarifications about the C++
front-end: I'm a novice, indeed, and appreciate that.
What I'm missing, now, but I don't think it's a purely front-end issue
(I'm also implicitly taking into account you message to the library
reflector) is whether optimizers downstream, in the middle-end, can
factor out the ABI prescriptions about argument passing. In other terms:
if something can figure that there is *nothing* to pass, actually,
neither in registers nor in stack! Is middle-end/20408 really fixable on
x86 or not?
If it's really impossible to optimize out the difference, maybe we have
to live with it and go ahead anyway with the clean-ups that started the
issue (in that case, the negative impact is small). If, on the other
hand, it's only a matter of waiting for some optimizations to be
implemented we have to *seriously* take care of that, making sure that
the libstdc++-v3 development in that specific area doesn't proceed "too
fast", assuming unreasonable optimizations.
Third possibility: a new attribute of sort (you suggested that, I
think), but I'm not sure whether it's really doable: even an extension
cannot be against the ABI, if the ABI is the real issue.
Yes, I'm confused: anyone willing to clarify??
Thanks in advance,
Paolo.