Displaying 20 results from an estimated 21 matches for "getindexedtype".
2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
...o pass in? vector or
> smallvector? If so, a pointer to the first element + extents is fine.
I was passing a std::vector in. And you are quite right, first element + size
works like a charm.
Since I am using a vector of uint64_t's instead of Value*, I did need to add
an extra version of getIndexedType(), taking a uint64_t* instead of Value**.
> My basic objection is that I don't like tons of code in header files.
> It obfuscates the header and slows down compile times (of llvm itself)
Ah, that is even a better reason :-)
I did use a template function to prevent duplicating code,...
2008 Jul 23
2
[LLVMdev] GEP::getIndexValid() with other iterators
...f uint64_t's or something like that?
> because I want to be able to pass in iterators. I could define a
> version that
> takes std<uint64_t>::iterators, but next thing we know, we also need
> them for
> lists, SmallVectors, etc. That's why one of the original
> getIndexedType
> methods is a template, and that's why I think it makes sense to make
> another
> one a template.
What flavor of iterators do you want to pass in? vector or
smallvector? If so, a pointer to the first element + extents is fine.
> Any particular objections to this? Is the cod...
2008 Jul 16
3
[LLVMdev] GEP::getIndexValid() with other iterators
Hi all,
currently, GetElementPtrInst has a method getIndexedType, which has a
templated variant. You pass in a begin and an end iterator, and it will find
the indexed type for those. However, both iterators must iterate over Value*.
For some argpromotion code, I would like to pass in iterators that iterate
over unsigneds instead of Value*. I currently solve thi...
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
...he main topic of this post.
Gr.
Matthijs
Index: lib/VMCore/Instructions.cpp
===================================================================
--- lib/VMCore/Instructions.cpp (revision 53672)
+++ lib/VMCore/Instructions.cpp (working copy)
@@ -1068,41 +1068,6 @@
init(Ptr, Idx, Name);
}
-// getIndexedType - Returns the type of the element that would be loaded with
-// a load instruction with the specified parameters.
-//
-// A null type is returned if the indices are invalid for the specified
-// pointer type.
-//
-const Type* GetElementPtrInst::getIndexedType(const Type *Ptr,
-...
2011 Jul 28
0
[LLVMdev] Build failure for latest source
...nst::init(llvm::Value*,
llvm::Value* const*, unsigned int, llvm::Twine const&)'
C:/Utilities/MSYS/build/llvm/Debug+Asserts/lib/libLLVMAnalysis.a(ScalarEvolutionExpander.o):C:/Programming/VersionControl/llvm/include/llvm/Instructions.h:330:
undefined reference to
`llvm::GetElementPtrInst::getIndexedType(llvm::Type*, llvm::Value*
const*, unsigned int)'
C:/Utilities/MSYS/build/llvm/Debug+Asserts/lib/libLLVMAnalysis.a(ScalarEvolutionExpander.o):C:/Programming/VersionControl/llvm/include/llvm/Instructions.h:332:
undefined reference to
`llvm::GetElementPtrInst::getIndexedType(llvm::Type*, llvm::...
2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
...> version that takes an array of uint64_t's or something like that?
because I want to be able to pass in iterators. I could define a version that
takes std<uint64_t>::iterators, but next thing we know, we also need them for
lists, SmallVectors, etc. That's why one of the original getIndexedType
methods is a template, and that's why I think it makes sense to make another
one a template.
Any particular objections to this? Is the code size increase a problem?
AFAICS, in cases where you need this method, it will be a tradeoff between
speed (having to iterate all your indices and create a...
2008 Jul 23
2
[LLVMdev] GEP::getIndexValid() with other iterators
On Jul 16, 2008, at 9:58 AM, Matthijs Kooijman wrote:
> Hi all,
>
> once more with the patch inline for easy review. I did not include the
> argpromotion pass here, since it's not the main topic of this post.
Hi Matthijs,
I'd prefer to not turn this into a template. Why not just define a
version that takes an array of uint64_t's or something like that?
-Chris
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...;getType()))
+ if (!isa<StructType>(Val->getType()) && !isa<ArrayType>(Val-
>getType()) &&
+ !isa<UnionType>(Val->getType()))
return Error(ID.Loc, "extractvalue operand must be array or
struct");
if (!ExtractValueInst::getIndexedType(Val->getType(),
Indices.begin(),
Indices.end()))
@@ -2156,7 +2195,8 @@
ParseIndexList(Indices) ||
ParseToken(lltok::rparen, "expected ')' in insertvalue
constantexpr"))
return true;
- if (!isa<Str...
2012 Jan 22
2
[LLVMdev] CreateGlobalStringPtr giving linker errors
...architecture x86_64:
"llvm::ConstantExpr::getGetElementPtr(llvm::Constant*,
llvm::ArrayRef<llvm::Value*>, bool)", referenced from:
llvm::ConstantExpr::getInBoundsGetElementPtr(llvm::Constant*,
llvm::ArrayRef<llvm::Value*>)in ccFB7xjg.o
"llvm::GetElementPtrInst::getIndexedType(llvm::Type*,
llvm::ArrayRef<llvm::Value*>)", referenced from:
llvm::GetElementPtrInst::GetElementPtrInst(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, unsigned int, llvm::Twine const&,
llvm::Instruction*)in ccFB7xjg.o
"llvm::PointerType::get(llvm::Type*, unsigned int...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...; + if (!isa<StructType>(Val->getType()) &&
> !isa<ArrayType>(Val->getType()) &&
> + !isa<UnionType>(Val->getType()))
> return Error(ID.Loc, "extractvalue operand must be array or struct");
> if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(),
> Indices.end()))
> @@ -2156,7 +2195,8 @@
> ParseIndexList(Indices) ||
> ParseToken(lltok::rparen, "expected ')' in insertvalue
> constantexpr"))
> return true;
&g...
2012 Jan 22
0
[LLVMdev] CreateGlobalStringPtr giving linker errors
...; "llvm::ConstantExpr::getGetElementPtr(llvm::Constant*,
> llvm::ArrayRef<llvm::Value*>, bool)", referenced from:
> llvm::ConstantExpr::getInBoundsGetElementPtr(llvm::Constant*,
> llvm::ArrayRef<llvm::Value*>)in ccFB7xjg.o
> "llvm::GetElementPtrInst::getIndexedType(llvm::Type*,
> llvm::ArrayRef<llvm::Value*>)", referenced from:
> llvm::GetElementPtrInst::GetElementPtrInst(llvm::Value*,
> llvm::ArrayRef<llvm::Value*>, unsigned int, llvm::Twine const&,
> llvm::Instruction*)in ccFB7xjg.o
> "llvm::PointerType::get(...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...; + if (!isa<StructType>(Val->getType()) &&
> !isa<ArrayType>(Val->getType()) &&
> + !isa<UnionType>(Val->getType()))
> return Error(ID.Loc, "extractvalue operand must be array or struct");
> if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(),
> Indices.end()))
> @@ -2156,7 +2195,8 @@
> ParseIndexList(Indices) ||
> ParseToken(lltok::rparen, "expected ')' in insertvalue
> constantexpr"))
> return true;
&g...
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:
2007 Dec 17
0
[LLVMdev] Elsa and LLVM and LLVM submissions
I used &Idx[0]. In future, please avoid tabs in your patch.
I applied your patch.
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071217/056403.html
-
Devang
On Dec 17, 2007, at 2:57 AM, Richard Pennington wrote:
> Devang Patel wrote:
>> On Dec 15, 2007, at 12:15 PM, Richard Pennington wrote:
>>> I got the current version of LLVM via svn yesterday and
2007 Dec 17
2
[LLVMdev] Elsa and LLVM and LLVM submissions
Devang Patel wrote:
> On Dec 15, 2007, at 12:15 PM, Richard Pennington wrote:
>
>> I got the current version of LLVM via svn yesterday and modified my
>> code to
>> use the LLVMFoldingBuilder. Very nice!
>>
>> My question is this: I noticed that the folding builder doesn't fold
>> some
>> operations, e.g. casts. Is there some reason why? If
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...Type>(Val->getType()) &&
>> !isa<ArrayType>(Val->getType()) &&
>> + !isa<UnionType>(Val->getType()))
>> return Error(ID.Loc, "extractvalue operand must be array or
>> struct");
>> if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(),
>> Indices.end()))
>> @@ -2156,7 +2195,8 @@
>> ParseIndexList(Indices) ||
>> ParseToken(lltok::rparen, "expected ')' in insertvalue
>> constantexpr"))
>&g...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...call to:
Value *x_idx = builder.CreateConstGEP2_32(cB, 0, 0);
However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
815 Type *PtrTy = PointerType::get(checkGEPType(
816 getIndexedType(Ptr->getType(), IdxList)),
817 Ptr->getType()->getPointerAddressSpace());
Resulting in the debugger producing:
(gdb) p PtrTy
$19 = (llvm::Type *) 0x7fffffff63d0
(gdb) p PtrTy->dump()
<unrecognized-type> $20 = void
Is there...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
..._idx = builder.CreateConstGEP2_32(cB, 0, 0);
>
> However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
>
> 815 Type *PtrTy = PointerType::get(checkGEPType(
> 816 getIndexedType(Ptr->getType(), IdxList)),
> 817 Ptr->getType()->getPointerAddressSpace());
>
> Resulting in the debugger producing:
>
> (gdb) p PtrTy
> $19 = (llvm::Type *) 0x7fffffff63d0
> (gdb) p PtrTy->dump()
> <unrec...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...tGEP2_32(cB, 0, 0);
> >
> > However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
> >
> > 815 Type *PtrTy = PointerType::get(checkGEPType(
> > 816 getIndexedType(Ptr->getType(), IdxList)),
> > 817 Ptr->getType()->getPointerAddressSpace());
> >
> > Resulting in the debugger producing:
> >
> > (gdb) p PtrTy
> > $19 = (llvm::Type *) 0x7fffffff63d0
> > (gdb) p...