[LLVMdev] About implementing new intrinsic

Ferad Zyulkyarov ferad.zyulkyarov at bsc.es
Sat Mar 31 06:34:06 PDT 2007


Hi,

I want to implement a new intrinsic in llvm that will denote a
parallel section within a function. I followed the documentation for
extending llvm (http://llvm.org/docs/ExtendingLLVM.html) but there is
something about the working mechanism that is not clear for me.

1. Why do we have to add support for the C backend? Is this only
necessary to transform the llvm assembly (bytecode) into C code by
using the library APIs?

2. Is the support that we add for the specific target the one that
takes part in generating the target specific code (native) from the
llvm bytecode?

3. Can I introduce an intrinsic that is actually a call to my function
that implements the logic? I suppose it is possible but unfortunately
I couldn't figure it out. For example, in GCC we can write an
intrinsic that translates to a C code.

Thanks,
Ferad
-- 
Ferad Zyulkyarov
Barcelona Supercomputing Center



More information about the llvm-dev mailing list