[C++ PATCH] Don't create an INTEGER_CST for aggregates (empty structs)
Paolo Carlini
pcarlini@suse.de
Sat Mar 12 09:34:00 GMT 2005
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.
More information about the Gcc-patches
mailing list