[LLVMdev] replace the intrinsic call by a C function call
t.p.northover at gmail.com
Wed Oct 15 08:28:04 PDT 2014
> Is there anyway to replace a intrinsic call by a “normal” function call?
An LLVM IR pass could do it easily, or XYZISelLowering.cpp a bit more
messily once you get that far (AArch64 does something similar in
If it's a custom intrinsic though, you could consider emitting the
call in the first place. You don't *have* to use an intrinsic for
functions with special handling: most of the libm functions don't have
special intrinsics in LLVM for example, but do get special treatment
I suppose I'd make the decision based on whether the front-end easily
knew the final call, or whether it was sometimes a real instruction
(in some subtarget).
More information about the llvm-dev