variable arguement intrinsics

hi

I want to use two intrinsic functions which should be
placeholders
for some instructions which should not be executed by
the backend.

So these two intrinsics should just keep the data
dependencies while i
try to
separate set of instructions(with more of data flow)
to be executed on
hardware.

One intrinsic which takes care of the data
dependencies required for
proper
execution of the hardware set and the second intrinsic
which takes care
of
the data dependencies of other instructions on this
hardware set.

My question is can we create intrinsics with variable
number of
arguments? if
so, how?

My other question is can we use the data type "void"
to represent the
datatype
of the arguments instead of creating multiple
intrinsic for each
possible
type of the dependencies?

thank you
aditya

P.S:

hi

I want to use two intrinsic functions which should be
placeholders
for some instructions which should not be executed by
the backend.

So these two intrinsics should just keep the data
dependencies while i
try to
separate set of instructions(with more of data flow)
to be executed on
hardware.

One intrinsic which takes care of the data
dependencies required for
proper
execution of the hardware set and the second intrinsic
which takes care
of
the data dependencies of other instructions on this
hardware set.

My question is can we create intrinsics with variable
number of
arguments? if
so, how?

Yes, you can use llvm_vararg_ty to do this; see llvm/include/Intrinsics.td
for an example.

My other question is can we use the data type "void"
to represent the
datatype
of the arguments instead of creating multiple
intrinsic for each
possible
type of the dependencies?

No, the "void" type in LLVM is only used for the return type of
a function with no return value. A variadic intrinsic with
llvm_vararg_ty may be useful though.

Depending on what you want, llvm_anyint_ty and llvm_anyfloat_ty may
alternatively be useful. These allow you to create overloaded
intrinsics.

Dan