This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [v3] libstdc++/12854


On Mon, May 17, 2004 at 08:52:18AM -0500, Benjamin Kosnik wrote:
> >There is at least one case of the changes that makes me very uneasy
> >because it hurts performance for no perceived benefit: The change to
> >__normal_iterator. 
> >
> >Declaring copy-constructor for __normal_iterator *is* a hurting
> >pessimization: 
> >The compiler is no longer going to treat it as "normal" C-struct and
> >pass it in register on plateforms (like PowerPC) it fits in a
> >register. Instead, return-values or function arguments of that type
> >would unconditionally be pushed on stack. That would be a step to make
> >our std::vector<T>::iterator more inefficient.  It hurts effort
> >like ADDRESSOF, designed precisely to remove the "abstraction penalty"
> >in putting simple data in structs like __normal_iterator.
> 
> I don't this is the case any more. 
> 
> I was under the impression that tree-ssa would scalarize even C++
> objects with 2-8 members. I've asked rth for clarification, but maybe
> jason would know this too.

Maybe it will scalarize them, but Gabriel is still right that it will
hurt anyway.  The ABI documents that this sort of object (which is
sensitive to being copied) must be passed by invisible reference
instead of by value in a register.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]