libgcc: strange optimization
Ian Lance Taylor
iant@google.com
Tue Aug 2 13:23:00 GMT 2011
Richard Guenther <richard.guenther@gmail.com> writes:
> Or go one step further and deprecate local register variables alltogether
> (they IMHO don't make much sense, and rather the targets should provide
> a way to properly constrain asm inputs and outputs).
No, local register variables are documented as working and many programs
rely on them. They are a straightforward way to get an asm argument in
a specific register, and I don't see any reason to break that.
> I suggest to amend the documentation for local call-clobbered register
> variables to say that the only valid sequence using them is from a
> non-inlinable function that contains only direct initializations of the
> register variables from constants or parameters.
Let's just implement those requirements in the compiler itself.
Ian
More information about the Gcc
mailing list