Displaying 6 results from an estimated 6 matches for "idxbegin".
Did you mean:
idx_begin
2007 Dec 17
0
[LLVMdev] Elsa and LLVM and LLVM submissions
...------
> ===//
> + // Instruction creation methods: Memory Instructions
> + //
> =
> =
> =--------------------------------------------------------------------
> ===//
> +
> + template<typename InputIterator>
> + Value *CreateGEP(Value *Ptr, InputIterator IdxBegin,
> + InputIterator IdxEnd, const char
> *Name = "") {
> +#if RICH
> + if (Constant *PC = dyn_cast<Constant>(Ptr)) {
> + // Every index must be constant.
> + InputIterator i;
> + for (i = IdxBegin; i < Id...
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
2008 Jul 16
3
[LLVMdev] GEP::getIndexValid() with other iterators
...ransforming my
vector<unsigned> into a vector<Value*>, but this is hardly an efficient
solution.
Currently, however, there is already a templated version of getIndexedType,
probably so it can iterate over any pointer. In there, the begin pointer is
cast as follows:
(const Value*)&*IdxBegin
Though this works, this has the nasty side effect of accepting a lot of
iterator types that are not really supported. In particular, when I passed in
an iterator over unsigned, the compiler would happily cast the resulting
unsigned* to a const Value*, resulting in all kinds of badness at runtime (...
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
...rwarded
+ // type.
+ if (const Type *Ty = Agg->getForwardedType())
+ Agg = Ty;
+ }
+ return CurIdx == NumIdx ? Agg : 0;
+ }
+
template<typename InputIterator>
static const Type *getIndexedType(const Type *Ptr,
InputIterator IdxBegin,
@@ -422,7 +448,7 @@
if (NumIdx 0)
// This requires that the iterator points to contiguous memory.
- return getIndexedType(Ptr, (Value *const *)&*IdxBegin, NumIdx);
+ return getIndexedType(Ptr, &*IdxBegin, NumIdx);
else
return getIndexedType(Ptr, (Value...
2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
.../ pointer type.
///
- static const Type *getIndexedType(const Type *Ptr,
- Value* const *Idx, unsigned NumIdx);
-
template<typename InputIterator>
static const Type *getIndexedType(const Type *Ptr,
InputIterator IdxBegin,
@@ -508,6 +505,13 @@
typename std::iterator_traits<InputIterator>::
iterator_category());
}
+
+ static const Type *getIndexedType(const Type *Ptr,
+ Value* const *Idx, unsigned NumIdx);
+
+ stati...
2008 Jul 23
2
[LLVMdev] GEP::getIndexValid() with other iterators
On Jul 22, 2008, at 11:54 PM, Matthijs Kooijman wrote:
> Hi Chris,
>
>
>> 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?
> 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