[PATCH] D39611: [CodeGen] change const-ness of complex calls
Hal Finkel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 10 10:22:57 PST 2017
hfinkel added a comment.
In https://reviews.llvm.org/D39611#921923, @spatel wrote:
> Thanks for the clarification!
>
> If I'm reading this properly, we should make the same kind of change as in https://reviews.llvm.org/D39481 ('c' -> 'e') for most of complex.h. Ie, the standard allows errno-setting, and it's (unfortunately for optimization) even more clearly stated in the newer additions to the standards.
>
> We can leave these functions as always constant ('c') because they don't actually do any math and therefore won't set errno:
> cimag ( http://en.cppreference.com/w/c/numeric/complex/cimag )
> creal ( http://en.cppreference.com/w/c/numeric/complex/creal )
> cproj ( http://en.cppreference.com/w/c/numeric/complex/cproj )
> conj (http://en.cppreference.com/w/c/numeric/complex/conj )
Sounds right to me.
https://reviews.llvm.org/D39611
More information about the cfe-commits
mailing list