I am developing a small custom compiler using OCaml / llvm. So far, everything is working fine, but I linger on the IEE-754 semantics for my floating point operations.
There is a way to specify fast math flags for each floating point command according to the llvm document:
http://llvm.org/docs/LangRef.html#fastmath
Unfortunately, I could not figure out how to set these flags using OCaml. All I can use is:
val build_fadd : llvalue -> llvalue -> string -> llbuilder -> llvalue
So, is a command tagged that is not implemented in OCaml bindings? If this is not the case, how to change the flag using an external C function for an existing statement?
source
share