[llvm-dev] LLVM v3.9.0 and math built-ins
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 20 10:13:31 PDT 2016
On 9/20/2016 4:12 AM, Martin J. O'Riordan via llvm-dev wrote:
> I modified my sources to force ‘readnone’ and even tried
> ‘setDoesNotAccessMemory()’ on the math functions, but this still
> results in one call occurring and the code generated is effectively:
> return 0;
> %1 = tail call float @exp(float 1.000000e+00)
> ; Function Attrs: readnone
> declare float @exp(float) local_unnamed_addr #1
You have to set readonly on the call, not the function ("tail call float
@exp(float 1.000000e+00) readonly") ; the attributes on a function
declaration are generally ignored by LLVM.
For the difference between 3.8 and 3.9, see
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev