[LLVMdev] Adding custom operation intrinsic for ASIP architectures.
Mikael Lepistö
mikael.lepisto at tut.fi
Tue Jul 31 04:58:38 PDT 2007
Hi,
I was talking with aKor in #llvm how we could implement custom operation
support for our ASIP architecture. We came into solution that the best
way would be to write new custom operation intrinsic and optimization
pass for raising certain type of function calls to those intrinsics
(similar to raising mallocs).
Basically our custom operation are like calls, with operand name and
multiple inputs and outputs. e.g. C code:
__llvm__custom_op_add(a,b,c) would be raised to customop add(i32 %tmp1,
i32 %tmp24 , i32 %tmp25). Those "__llvm__custom_op_" prefixed function
will not have function body, but pure declarations in C code level.
Comments are welcome, especially if there anyone else, that needs this
kind of functionality or if people has already implemented something
similar.
Mikael Lepistö
More information about the llvm-dev
mailing list