search for: reverse_iterator

Displaying 19 results from an estimated 19 matches for "reverse_iterator".

2015 Apr 01
2
[LLVMdev] Why the fault?
for (BasicBlock::reverse_iterator I = BB.rbegin(), E = BB.rend(); I != E; ) { Instruction& inst = *I; ++I; <-- iterator should be advanced to the previous instruction // Happens to be an Instruction::SExt. // Works fine if I iterate forwards if (isInstructionTriviallyDead(&inst, TLI)) inst.er...
2013 Jul 26
0
[LLVMdev] Botan and Android
..., std::char_traits<char>, std::allocator<char> >, _Compare = std::less<double>, _Alloc = std::allocator<std::pair<double const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::map<_Key, _Tp, _Compare, _Alloc>::reverse_iterator = std::reverse_iterator<std::priv::_Rb_tree_iterator<std::pair<double const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::priv::_MapTraitsT<std::pair<double const, std::basic_string<char, std::char_traits<char>, std::all...
2014 Mar 03
3
[LLVMdev] C++11 reverse iterators (was C++11 is here)
...with a foreach construct? Perhaps I forgot to mention that was what I'm trying to work out here. > > In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style? Sorry, I was too terse... ;) If MF is a reverse_iterator, it'd just work, no? But to get the reverse iterator, I think reverse() would be the best general pattern, since you can adapt it to each container needs. cheers, --renato
2014 Mar 03
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...s what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We > could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you can adapt it to each container needs. > > I'm not aware of the prior art or standards are here, but I think that a > global reverse() adapter is...
2005 Mar 10
2
[LLVMdev] Errors building llvm with Visual Studio in Debug mode
..._Ax> &' from 'unsigned int' c:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1278) : see declaration of 'std::operator`<'' c:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(196) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt1> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'unsigned int' c:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(1303) : see declaration o...
2005 Mar 10
0
[LLVMdev] Errors building llvm with Visual Studio in Debug mode
...rom 'unsigned int' > c:\Program Files\Microsoft Visual Studio >8\VC\include\vector(1278) : see declaration of 'std::operator`<'' >c:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(196) : >error C2784: 'bool std::operator <(const >std::reverse_iterator<_RanIt1> &,const std::reverse_iterator<_RanIt2> >&)' : could not deduce template argument for 'const >std::reverse_iterator<_RanIt> &' from 'unsigned int' > c:\Program Files\Microsoft Visual Studio >8\VC\include\xutility(1303) : s...
2010 Nov 13
1
[LLVMdev] problem with llvm reverse iterator
Hi, I am writing an llvm pass wherein I require to iterate MachineBasicBlocks in reverse. The ilist reverse_iterator is not functioning as expected. Nor is the ilist iterator working in reverse (although -- operator is overloaded to do so). for (MachineFunction::iterator MBBI = mf_->end(), E = mf_->begin();MBBI != E; --MBBI) { MachineBasicBlock *MBB = MBBI; DEBUG(dbgs()<<*MBB<&...
2014 Mar 04
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...s what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We > could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you can adapt it to each container needs. > > I'm not aware of the prior art or standards are here, but I think that a > global reverse() adapter is...
2008 May 11
2
[LLVMdev] Python bindings available.
...a BB: > Builder.new(At_end bb) > Builder.new(bb.begin) > > // Before or after a given instruction: > Builder.new(Before instr) > Builder.new(instr.succ) so I'll see how this can be done a bit, ah, Pythonically. > Finally, just as the C++ STL has reverse_iterator, it did prove > necessary to have a separate (At_begin parent | After element) type in > order to walk the IR backwards. Well, it's possible to do: for inst in reversed(block.instructions): # do stuff with inst which will iterate backwards over the instructions of a block. Thanks...
2017 Jan 16
4
[RFC 0/2] Propose a new pointer trait.
Hi, I'm part of an engineering team doing research on persistent memory support and we have stumbled upon an interesting problem. The issue is, we would like to be able to use the standard library containers in a persistent memory context (think NVDIMM-N). What I mean is that you allocate a container from said memory, use it like you normally would. After the application terminates, expectedly
2014 Mar 03
2
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...at was what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you can adapt it to each container needs. > > I'm not aware of the prior art or standards are here, but I think that a global reverse() adapter is the...
2008 May 10
0
[LLVMdev] Python bindings available.
...arent element (it's either parent or element.parent), so there's no need to pass it in separately as in builder.position(block, instr). Also, this could return a precise position: > The current block is returned via the r/o property insert_block. Finally, just as the C++ STL has reverse_iterator, it did prove necessary to have a separate (At_begin parent | After element) type in order to walk the IR backwards. Cheers, Gordon
2008 May 10
4
[LLVMdev] Python bindings available.
Hi all, I'd like to announce the availability of Python bindings for LLVM. It is built over llvm-c, and currently exposes enough APIs to build an in-memory IR (and dump it!). It needs LLVM 2.3 latest and Python 2.5 (2.4 should be sufficient, but I haven't tested). Tested only on Linux/i386. Would love to hear your comments. [Needless to say, it's all work in progress, but mostly it
2014 Mar 03
2
[LLVMdev] C++11 reverse iterators (was C++11 is here)
On 3 March 2014 12:13, Pete Cooper <peter_cooper at apple.com> wrote: > It would also be good to agree on a way to handle reverse iterators, especially on those which already use begin() and end() for going forwards. For example rbegin() and rend()? --renato
2008 May 11
0
[LLVMdev] Python bindings available.
...in let th = handle_to_type ty in refine_type ty (pointer_type ty); let ty = type_of_handle th in insist (define_type_name "RecursiveTy" ty m); insist (ty == element_type ty) Which constructs %RecursiveType = type %RecursiveType*. >> Finally, just as the C++ STL has reverse_iterator, it did prove >> necessary to have a separate (At_begin parent | After element) type >> in order to walk the IR backwards. > > Well, it's possible to do: > > for inst in reversed(block.instructions): > # do stuff with inst > > which will iterate backwards o...
2014 Mar 05
2
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...at was what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you can adapt it to each container needs. > > I'm not aware of the prior art or standards are here, but I think that a global reverse() adapter is the...
2008 Jan 27
0
[LLVMdev] BreakCriticalMachineEdge.h
Fernando, The code there should be more or less functional, though it's not currently used by anything. Eventually it should probably be moved to a method on MachineBasicBlock. The API breakage you're seeing is because some methods moved around. Feel free to fix it. :-) --Owen On Jan 26, 2008, at 6:31 PM, Fernando Magno Quintao Pereira wrote: > > Hi LLVMers, > >
2008 Jan 27
2
[LLVMdev] BreakCriticalMachineEdge.h
Hi LLVMers, what is the status of breaking critical edges in machine functions? I just compiled the top of the LLVM tree, and I found llvm/CodeGen/BreakCriticalMachineEdge.h. But this file seems not to be up-to-date with the other classes in the top of the tree. For instance, it calls isTerminatorInstr on llvm::TargetInstrInfo, but this method is no longer there. If I want to break
2013 Apr 12
3
[LLVMdev] The line number range of a function in source code level
Hi all, I need to know the line number range of a function. The start of the function line number can be found by the definition point, which is stored at the subprogram metadata: DISubprogram::getLineNumber(). However, there is no API (or the metadata in the first place) to know the end of the function. I have to visit all the instructions of the function and maintain the *max*line number of