search for: resultty

Displaying 20 results from an estimated 26 matches for "resultty".

2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...s early exits. In this code you should be able to do something like: if (ID.ConstantVal->getType() != Ty) if (Constant *Elt = TryConvertingSingleElementStructToUnion(...)) return Elt; +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) @@ -584,6 +584,13 @@ ResultTy = StructType::get(Context, EltTys, Record[0]); break; } + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] + std::vector<const Type*> EltTys; + for (unsigned i = 0, e = Record.size(); i != e; ++i) + EltTys.push_back(getTypeByID(Record[i], true)); + R...
2010 Dec 26
0
[LLVMdev] Generating target dependent function calls
...er, pointer) you could declare in a function that would then inquire pointer size from TargetData like: FunctionType *geti8LongLong() { const PointerType *LongTy = Type::getIntNPtrTy(Context, TD.getPointerSizeInBits()); std::vector<const Type*> Params = { LongTy, LongTy }; const Type *ResultTy = Type::getInt8Ty(Context); return FunctionType::get(ResultTy, ArgTys, 0); } and then just use the return from geti8LongLong() as the function type when you declare the function. Or you can abstract out away the LongTy and use it in general. -eric
2010 Dec 26
2
[LLVMdev] Generating target dependent function calls
On 12/22/2010 03:12 PM, Peter Collingbourne wrote: > On Wed, Dec 22, 2010 at 01:38:06PM -0500, Tobias Grosser wrote: >> Hi, >> >> raghesh and I are working in Polly on automatically generating OpenMP >> calls. This works nicely on a 64bit architecture, >> however the functions we need to generate are slightly different on >> different platforms. >>
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...able to do something like: > > if (ID.ConstantVal->getType() != Ty) > if (Constant *Elt = TryConvertingSingleElementStructToUnion(...)) > return Elt; > > > > +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) > @@ -584,6 +584,13 @@ > ResultTy = StructType::get(Context, EltTys, Record[0]); > break; > } > + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] > + std::vector<const Type*> EltTys; > + for (unsigned i = 0, e = Record.size(); i != e; ++i) > + EltTys.push_back(getTypeByID(R...
2015 Jan 26
2
[LLVMdev] RFC: Native Windows C++ exception handling
...pads from the parent function to the outlined handlers. I propose doing this by extending the syntax of the landing pad instruction to allow the address of an outlined handler to be attached to catch and cleanup clauses. The current syntax for landingpad is: <resultval> = landingpad <resultty> personality <type> <pers_fn> <clause>+ <resultval> = landingpad <resultty> personality <type> <pers_fn> cleanup <clause>* <clause> := catch <type> <value> <clause> := filter <array constant type> <array cons...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...able to do something like: > > if (ID.ConstantVal->getType() != Ty) > if (Constant *Elt = TryConvertingSingleElementStructToUnion(...)) > return Elt; > > > > +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) > @@ -584,6 +584,13 @@ > ResultTy = StructType::get(Context, EltTys, Record[0]); > break; > } > + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] > + std::vector<const Type*> EltTys; > + for (unsigned i = 0, e = Record.size(); i != e; ++i) > + EltTys.push_back(getTypeByID(R...
2009 Apr 15
0
[LLVMdev] Tablegen question
I still think there is a bug somewhere, but not sure where yet. This is what is generated in intrinsic.gen: case Intrinsic::opencl_math_fdistance: // llvm.opencl.math.fdistance ResultTy = Type::FloatTy; ArgTys.push_back(Tys[0]); ArgTys.push_back(Tys[0]); break; This is the intrinsic definition: def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty], [llvm_anyfloat_ty, LLVMMatchType<0>]>; The problem comes when I try to...
2010 Dec 26
1
[LLVMdev] Generating target dependent function calls
...n a function that would then inquire pointer size > from TargetData like: > > FunctionType *geti8LongLong() { > const PointerType *LongTy = Type::getIntNPtrTy(Context, TD.getPointerSizeInBits()); > std::vector<const Type*> Params = { LongTy, LongTy }; > const Type *ResultTy = Type::getInt8Ty(Context); > return FunctionType::get(ResultTy, ArgTys, 0); > } > > and then just use the return from geti8LongLong() as the function type when you declare the function. Or you can abstract out away the LongTy and use it in general. Hey Eric, thanks for this hint....
2009 Apr 15
1
[LLVMdev] Tablegen question
...Wed, Apr 15, 2009 at 11:15 AM, Villmow, Micah <Micah.Villmow at amd.com> wrote: > I still think there is a bug somewhere, but not sure where yet. > This is what is generated in intrinsic.gen: > case Intrinsic::opencl_math_fdistance:          // > llvm.opencl.math.fdistance >    ResultTy = Type::FloatTy; >    ArgTys.push_back(Tys[0]); >    ArgTys.push_back(Tys[0]); >    break; > > This is the intrinsic definition: > def int_opencl_math_fdistance_fast   : Intrinsic<[llvm_float_ty], >                           [llvm_anyfloat_ty, LLVMMatchType<0>]>; &g...
2009 Apr 15
3
[LLVMdev] Tablegen question
Oops. That was premature. I think your original question was on the right track. TableGen distinguishes between known and "overloaded" types (like "llvm_anyfloat_ty" in your example). The overloaded types are numbered separately, and the argument to LLVMMatchType is an index into these overloaded types, ignoring the known types. So, in your case, the first
2007 Nov 25
2
[LLVMdev] C embedded extensions and LLVM
...TypeVals.push_back(VE.getTypeID(cast<PointerType>(T)- >getElementType())); The code to read them look like this: case bitc::TYPE_CODE_POINTER: // POINTER: [pointee type] if (Record.size() < 1) return Error("Invalid POINTER type record"); ResultTy = PointerType::get(getTypeByID(Record[0], true)); break; The interesting point here is that PointerType currently has one field (that it push_back's onto TypeVals). The reader requires this field to be present, but ignores any additional fields. You should just be able to add an...
2009 Apr 15
2
[LLVMdev] Tablegen question
On Apr 15, 2009, at 11:15 AM, Villmow, Micah wrote: > I still think there is a bug somewhere, but not sure where yet. > This is what is generated in intrinsic.gen: > case Intrinsic::opencl_math_fdistance: // > llvm.opencl.math.fdistance > ResultTy = Type::FloatTy; > ArgTys.push_back(Tys[0]); > ArgTys.push_back(Tys[0]); > break; OK. That looks right to me. > This is the intrinsic definition: > def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty], > [llvm_anyfloat_ty, LLVMM...
2010 Jan 16
0
[LLVMdev] [patch] Union Types - work in progress
OK here's the patch for real this time :) On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test "union.ll" > does not work, so you probably don't want to check this in as is. However, > I'd be interested in any feedback you're willing to give. > > -- > -- Talin
2010 Jan 16
2
[LLVMdev] [patch] Union Types - work in progress
Here's a work in progress of the union patch. Note that the test "union.ll" does not work, so you probably don't want to check this in as is. However, I'd be interested in any feedback you're willing to give. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Sep 30
0
[LLVMdev] long double type on ARM
Hi Jin-Gu Kang! It are possible that the problem you are experiencing have already been solved in the current llvm 2.6 release tree and the current svn trunk. So try using llc from llvm 2.6 release branch or llvm pre2.7 svn trunk! It would be helpful if you could open a bugreport for this issue and attach the problematic od.bc since we need a testcase from the bitcode that exposes the bug inorder
2015 Jan 27
2
[LLVMdev] RFC: Native Windows C++ exception handling
...pads from the parent function to the outlined handlers. I propose doing this by extending the syntax of the landing pad instruction to allow the address of an outlined handler to be attached to catch and cleanup clauses. The current syntax for landingpad is: <resultval> = landingpad <resultty> personality <type> <pers_fn> <clause>+ <resultval> = landingpad <resultty> personality <type> <pers_fn> cleanup <clause>* <clause> := catch <type> <value> <clause> := filter <array constant type> <array cons...
2007 Apr 20
0
[LLVMdev] llvm-gcc Bug, Looking for Advice on Fix
...at this happens all over llvm-convert.c. Tys and numTys default to zero, which is why it builds. The problem is, getDeclaration calls getType(id, Tys, numTys) where this code is executed: case Intrinsic::memcpy_i32: // llvm.memcpy.i32 case Intrinsic::memmove_i32: // llvm.memmove.i32 ResultTy = Type::getPrimitiveType(Type::VoidTyID); ArgTys.push_back(Tys[1]); ArgTys.push_back(Tys[2]); ArgTys.push_back(IntegerType::get(32)); ArgTys.push_back(IntegerType::get(32)); Oops, Tys is 0! Similar code exists for llvm.memcpy.i64, so it's not the case that the select expre...
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...> if (ID.ConstantVal->getType() != Ty) >> if (Constant *Elt = TryConvertingSingleElementStructToUnion(...)) >> return Elt; >> >> >> >> +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) >> @@ -584,6 +584,13 @@ >> ResultTy = StructType::get(Context, EltTys, Record[0]); >> break; >> } >> + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] >> + std::vector<const Type*> EltTys; >> + for (unsigned i = 0, e = Record.size(); i != e; ++i) >> + EltTys...
2007 Nov 25
0
[LLVMdev] C embedded extensions and LLVM
On Nov 24, 2007, at 7:47 PM, Christopher Lamb wrote: > > On Nov 21, 2007, at 6:22 PM, Chris Lattner wrote: > >> On Wed, 21 Nov 2007, Christopher Lamb wrote: >>>> Unlike alignment and volatility, I think that the address space >>>> qualifier >>>> should be represented explicitly in the type system. The >>>> reason for this
2009 Apr 15
0
[LLVMdev] Tablegen question
...bject: Re: [LLVMdev] Tablegen question On Apr 15, 2009, at 11:15 AM, Villmow, Micah wrote: > I still think there is a bug somewhere, but not sure where yet. > This is what is generated in intrinsic.gen: > case Intrinsic::opencl_math_fdistance: // > llvm.opencl.math.fdistance > ResultTy = Type::FloatTy; > ArgTys.push_back(Tys[0]); > ArgTys.push_back(Tys[0]); > break; OK. That looks right to me. > This is the intrinsic definition: > def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty], > [llvm_anyfloat_ty, LLVMM...