[LLVMdev] Problem with variable argument intrinsics
Dan Gohman
gohman at apple.com
Tue Feb 19 10:48:17 PST 2008
On Feb 19, 2008, at 1:11 AM, aditya vishnubhotla wrote:
> Hi,
> I tried creating variable argument intrinsics which
> are to be placeholders for some instructions which
> should not be executed by the backend.
>
> Kindly help me with the errors in my "migrate_begin"
> intrinsic creation
>
> //Additions made to Intrinsics.td file:
>
> def llvm_migrate_begin : LLVMType<iAny>;
> def int_migrate_begin :
> Intrinsic<[llvm_migrate_begin,llvm_vararg_ty],
> [IntrWriteMem],"llvm.migrate_begin">;
This says that the return type is overloaded (because it's iAny). But
that's
the only overloaded part here; using variadic argument lists is
different
from overloading.
>
>
> Overloaded intrinsic has incorrect suffix: '.i32.i32'.
> It should be '.i32'
> i32 (...)* @llvm.migrate_begin.i32.i32
>
> Overloaded intrinsic has incorrect suffix:
> '.i32.i32.i32'. It should be '.i32'
> i32 (...)* @llvm.migrate_begin.i32.i32.i32
The suffix has a part for each overloaded type in the function type.
Since only
the return type is overloaded, the verifier is expecting only one type
to be passed
into getDeclaration.
Dan
More information about the llvm-dev
mailing list