This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Avoid use of "register" as optimization hint


> * Code from GMP, which also has lots of uses of "register".  I don't
>   know if GMP upstream has since cleaned them up; we don't actually
>   try to stay in sync with GMP upstream (updating GMP code from there
>   would require FSF permission to use the current GMP versions of the
>   relevant code under LGPLv2.1+).

I think the permission granted way back when applies just as well to newer
GMP versions.  If you have a particular reason to think it wouldn't, then
you should ask the appropriate FSF contact.  But I'm confident enough to
just do whatever we want with FSF-owned code from recent GMP versions.

> * Cases where use of "register" on a variable seems to serve as
>   documentation that this variable is being used as an asm input or
>   output that needs to be in a register for the asm, although not
>   assigned to a particular register, rather than being used as an
>   obsolete optimization hint.

I don't really think this should be an exception.  The asm constraint is
what matters, and the "register" keyword as implicit documentation does not
really seem like it adds anything.  (In fact, it seems more likely to be
left behind as bit rot when the code changes later than to really be
helpful to anyone reading the code.)


Neither of these constitutes anything wrong with the change you've posted
(just more that can be done in the future).  I think it's fine as it is.


Thanks,
Roland


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