[patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Fri Oct 26 05:44:00 GMT 2007


Hi,

> >> That doesn't seem like
> >> much of a win, since there are no vectorizable accesses in the loop that
> >> I can see.  If there's not a speed improvement, then this is just a
> >> speed/space pessimization -- compounded by the code that you're adding
> >> to check for NULLs.
> > 
> > I don't think the speed is important in this case.  Space might be,
> > though.
> 
> Both matter, but space is a bigger concern; we use GCC on systems with
> just a couple of kilobytes, and we need to be reducing overhead for
> these sorts of things, not increasing it.
> 
> So, I think we should just turn the vectorizer off when compiling this file.

I don't agree -- that does not solve anything.  Any time in the future
we may add another optimization that changes the alignment of global
variables, and the problem will repeat (it seems even possible that some
change in as could expose this problem).  We need to stop crtstuff from
relying on the alignment (whether by making it work even if padding is
added, or by preventing the padding to be added, somehow).

I am not all that familiar with the way crtstuff works, though; perhaps
someone who knows more about it should propose some solution.

Zdenek



More information about the Gcc-patches mailing list