[LLVMdev] Adding custom operation intrinsic for ASIP architectures.

David Greene dag at cray.com
Tue Jul 31 10:06:56 PDT 2007


On Tuesday 31 July 2007 06:58, Mikael Lepistö wrote:

> 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.

Yes, this is very useful.  Can we somehow integrate this into tblgen so that
targets can declare intrinsics they are interested in capturing and map them
to machine instruction sequences?  I think a lot of architectures have need
for stuff like this and I would hate for a solution that only addresses those
needs in a piecemeal fashion.

                                                -Dave




More information about the llvm-dev mailing list