[LLVMdev] replace hardcoded function names by intrinsics

Jochen Wilhelmy j.wilhelmy at arcor.de
Sat Mar 3 12:28:17 PST 2012


Hi!

The main problem I currently see is that frontend/language specific
assumptions are hardcoded inside the constant folding, namely
that a function named sin calculates the sine. languages with some
kind of name mangling don't benefit from this. so another solution
would be making the constant folding extendable, i.e. that a table
of function names and evaluators can be passed in from the outside.
this way the c-specific stuff is removed from llvm and other functions
like e.g. convert_int_rte() of opencl could be constant folded too.
maybe this table can be per llvmContext so that InlineCost.cpp can
accessed it too.

-Jochen




More information about the llvm-dev mailing list