search for: inputiterator

Displaying 16 results from an estimated 16 matches for "inputiterator".

Did you mean: _inputiterator
2007 Jul 04
1
[LLVMdev] API design (and Boost and tr1)
...ail { template<bool value> struct disable_if {}; template<> struct disable_if<false> { typedef int type; }; } /// CallInst - This class represents a function call, abstracting a target [...] /// Construct a CallInst given a range of arguments. InputIterator /// must be a random-access iterator pointing to contiguous storage /// (e.g. a std::vector<>::iterator). Checks are made for /// random-accessness but not for contiguous storage as that would /// incur runtime overhead. /// @brief Construct a CallInst from a range of arguments t...
2007 Jul 04
0
[LLVMdev] API design (and Boost and tr1)
...be an issue. > > It turns out this wasn't quite a simple as we'd thought. The problem is > the CallInst constructors that take two Value * arguments. They look > just like the teamplte versions that take iterators. Wow, this sounds very complex :) > template<typename InputIterator> > CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, > const std::string &Name = "", Instruction *InsertBefore = 0, Is it acceptable to just make the template argument be the container? That way you could pass: std::vector.. V; ... new CallIns...
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi, This is probably more of a standard C++ question instead of an actual LLVM question, but here it goes anyway. I'm trying to invoke the following constructor: CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const Twine &NameStr, BasicBlock *InsertAtEnd); My code is: using namespace llvm; void replaceByClone(Function *f, CallInst *I){ Function *clone = CloneFunction(f); BasicBlock::iterator ii(I); ReplaceInstWithInst(I->getParent()->getInstList(),ii,CallInst...
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. > +...
2007 Jul 03
4
[LLVMdev] API design
On Monday 02 July 2007 16:26, Chris Lattner wrote: > On Sun, 1 Jul 2007, Nick Lewycky wrote: > > I've been running LLVM with _GLIBCXX_DEBUG (extra checks) turned on to > > see what would happen, and it's been a complete disaster. Well, that's a bit harsh, isn't it? It's finding bugs, just like it's supposed to. :) I believe I've started to run into
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
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
Please keep replies on the list. Now you've missed "InputIterator must be a random-access iterator pointing to contiguous storage (e.g. a std::vector<>::iterator). Checks are made for random-accessness but not for contiguous storage as that would incur runtime overhead." from CallInst's constructor (although that comment should be on Create()). Fun...
2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
...nstructions.h (working copy) @@ -407,9 +407,6 @@ /// Null is returned if the indices are invalid for the specified /// 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...
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
2010 Apr 26
2
[LLVMdev] Creating a GEP instruction.
Hi, I'm trying to create a GEP (inbounds) instruction . I was looking at the createinboundsGEP method . I didnt get the inputiterator part. My question how do i create a GEP instruction and what do i pass for the input iterator arguments. Thanks, Rohith. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100425/6674f43e/attachment.html>
2007 Jul 04
2
[LLVMdev] API design (and Boost and tr1)
On Wednesday 04 July 2007 14:57, Chris Lattner wrote: > > template<typename InputIterator> > > CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, > > const std::string &Name = "", Instruction *InsertBefore = 0, > > Is it acceptable to just make the template argument be the container? > That way you could pass: > > s...
2010 Apr 26
0
[LLVMdev] Creating a GEP instruction.
On Sun, Apr 25, 2010 at 5:15 PM, Rohith Goparaju <rgoparaj at umail.iu.edu> wrote: >  Hi, > >    I'm trying to create a GEP (inbounds) instruction . I was looking at the > createinboundsGEP method . I didnt get the inputiterator part. My question > how do i create a GEP instruction and what do i pass for the input iterator > arguments. Generic answer to "how do I create an X instruction": use llc -march=cpp on an IR file containing the instruction, and read the result. For this particular question, the si...
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
...ned to another type (and hence, may have dropped all + // references to what it was using before). So, use the new forwarded + // 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, N...
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
...t; +// true, then the current iterator is invalidated and it moves back, before > +// moving forward to the next iterator, otherwise it moves forward without > +// issue. This is based on the for_each STL function, but allows a reference to > +// the second argument > +template<class InputIterator, class Function, typename Arg> > +Function binaryForEach(InputIterator First, InputIterator Last, Function F, > + Arg &Second) > +{ > + for ( ; First!=Last; ++First ) { > + F(*First, Second); > + } > + return F; > +} > + > +template&l...
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 this by transforming my
2010 Apr 26
1
[LLVMdev] Creating a GEP instruction.
...man at gmail.com>wrote: > On Sun, Apr 25, 2010 at 5:15 PM, Rohith Goparaju <rgoparaj at umail.iu.edu> > wrote: > > Hi, > > > > I'm trying to create a GEP (inbounds) instruction . I was looking at > the > > createinboundsGEP method . I didnt get the inputiterator part. My > question > > how do i create a GEP instruction and what do i pass for the input > iterator > > arguments. > > Generic answer to "how do I create an X instruction": use llc > -march=cpp on an IR file containing the instruction, and read the > result...