[LLVMdev] Instruction Implementation
Tim Northover
t.p.northover at gmail.com
Tue Apr 2 08:28:37 PDT 2013
Hi,
> #include "math.h"
[...]
>declare float @_Z8ff_ceilff(float)
It looks like your math.h is not declaring "ceilf" with C language
linkage (i.e. 'extern "C"') so it's getting name-mangled (and in an
extremely odd way I'm not familiar with, unless your math.h contains
"#define ceilf ff_ceilf" -- which would also be bad); this means LLVM
can't recognise it as the ceiling function and just assumes it's some
unknown call.
What you're looking for is:
declare float @ceilf(float)
being given a set of attributes almost certainly including "readnone"
(though "readonly" would be sufficient).
Cheers.
Tim.
More information about the llvm-dev
mailing list