search for: po_iterator

Displaying 17 results from an estimated 17 matches for "po_iterator".

Did you mean: op_iterator
2009 Jul 10
2
[LLVMdev] Some df_iterator and po_iterator issues
Chris, attached you will find a patch implementing the approach I've posted yesterday. I don't want the topic fall by the wayside*. *Note that this patch here contains the df_iterator changes only, some (IMHO non-critical but needed) po_iterator changes are still in the pipeline and posted by me in another thread. I hope, the current approach fits all needs. Chris Lattner schrieb: > This does sound like a useful use-case, but I am uncomfortable with > making DepthFirstIterator any heavier > BTW: in order to make DepthFirs...
2009 Jul 07
0
[LLVMdev] Some df_iterator and po_iterator issues
On Jun 15, 2009, at 4:33 AM, Olaf Krzikalla wrote: > While trying to eleminate as much std::tr1::function as possible I > stumbled over a design flaw in llvm::df_iterator. Ok. > However if fn replaces childrens of a just processed statement > (which happens a lot), the iteration may crash. Looking at > df_iterator reveals the reason: the first child of a particular >
2009 Jun 15
3
[LLVMdev] Some df_iterator and po_iterator issues
...d occured as part of another problem: a child Stmt of a Stmt in a clang AST can be 0 (e.g. in for(;;)). I could work around it by providing po_ext_iterator an external set of visited nodes and just inserted 0 beforehand. However I'm quite sure it would be a better idea to catch the 0 case in po_iterator and df_iterator at all. Otherwise using these classes become tedious very quickly. Best Olaf Krzikalla -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: dfi.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090615/36dd77a4...
2009 Apr 14
1
[LLVMdev] Depth First Sort of Machine Basic Blocks just before emitting code
Too obvious! Thanks Dan On Apr 13, 2009, at 7:58 PM, John Mosby wrote: > po_iterator (ADT/PostOrderIterator.h) ? > > On Mon, Apr 13, 2009 at 5:40 PM, Daniel M Gessel <gessel at apple.com> > wrote: > That looks like it does a preorder depth first traversal (I think). > I'm looking for postorder. Is there a trivial transform between the > two? (I don'...
2013 Mar 24
0
[LLVMdev] PostOrderIterator
Hello, I was playing with PostOrderIterator.h and I found a strange behavior. The core class, po_iterator, is a template. One of its template parameters is the type of the set used to store visited nodes. An instance of that type is used by its superclass, po_iterator_storage. Default value of the set type is llvm::SmallPtrSet. This is correct, since po_iterator_storage::insertEdge expects that the se...
2013 Mar 29
1
[LLVMdev] function pass to visit BB bottom-up order
Hello llvmdevs, In a function pass, I need to visit all the basic blocks in bottom-up order (the exact opposite of ReversePostOrderTraversal). I noticed some APIs like po_iterator but wasn't able to figure out an example usage for this on web. Any pointers/suggestions are highly appreciated. Thanks, Ananth -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130328/db425366/attachment....
2009 Apr 13
0
[LLVMdev] Depth First Sort of Machine Basic Blocks just before emitting code
po_iterator (ADT/PostOrderIterator.h) ? On Mon, Apr 13, 2009 at 5:40 PM, Daniel M Gessel <gessel at apple.com> wrote: > That looks like it does a preorder depth first traversal (I think). > I'm looking for postorder. Is there a trivial transform between the > two? (I don't know one.) &...
2009 Jun 29
2
[LLVMdev] [cfe-dev] Patch for llvm::DepthFirstIterator.h and llvm::PostOrderIterator.h
Hi, I've done all the minor changes you recommended and have attached a new patch including both files again (even if po_iterator didn't change). However: Dan Gohman schrieb: > The plural of "child" is "children"; please rename this function > accordingly. Is "childs" just sloppy, is it american english or is it just a misconception of foreigners like me? I think I've already se...
2009 Apr 13
2
[LLVMdev] Depth First Sort of Machine Basic Blocks just before emitting code
That looks like it does a preorder depth first traversal (I think). I'm looking for postorder. Is there a trivial transform between the two? (I don't know one.) Am I wrong about the preorder/postorder? If not, anything lurking for postorder traversal? Thanks, Dan On Apr 13, 2009, at 2:35 PM, Chris Lattner wrote: > > On Apr 13, 2009, at 11:20 AM, Daniel M Gessel wrote:
2009 Mar 12
4
[LLVMdev] Shrink Wrapping - RFC and initial implementation
...have decided not to shrink wrap, just return now. + if (! ShrinkWrapping) + return true; Why not just return inside if (allCSRUsesInEntryBlock)? 10. +bool PEI::calculateUsedAnticAvail(MachineFunction &Fn) { ... + // Calculate AnticIn, AnticOut using post-order traversal of MCFG. + for (po_iterator<MachineBasicBlock*> + MBBI = po_begin(Fn.getBlockNumbered(0)), + MBBE = po_end(Fn.getBlockNumbered(0)); MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = *MBBI; ... + // Calculate Avail{In,Out} via top-down walk of Machine dominator tree. + for (df_iterator<MachineD...
2009 Mar 05
0
[LLVMdev] Shrink Wrapping - RFC and initial implementation
Here is an updated patch for shrink wrapping with: - spills/restores done with stack slot stores/loads - stack adjustment removed - refactoring (but still in need of more) - spill/restore insertion code unified with spill/restore placement code Documentation available here<http://wiki.github.com/jdmdj/llvm-work/shrink-wrapping-work> illustrates shrink wrapping with loops and discusses a
2009 Mar 03
2
[LLVMdev] Shrink Wrapping - RFC and initial implementation
On Mon, Mar 2, 2009 at 10:35 AM, Evan Cheng <echeng at apple.com> wrote: > > On Mar 1, 2009, at 2:57 PM, John Mosby wrote: > > Obviously, all of this applies only when spills are done with push/pop, > which is the case on x86. I used this issue to start looking at generalizing > how spills and restores are handled, before looking too closely at other > targets, and
2009 Mar 13
0
[LLVMdev] Shrink Wrapping - RFC and initial implementation
...Why not just return inside if (allCSRUsesInEntryBlock)? > ARGHHH, I thought I simplified that before cutting the patch. > 10. > +bool PEI::calculateUsedAnticAvail(MachineFunction &Fn) { > ... > + // Calculate AnticIn, AnticOut using post-order traversal of MCFG. > + for (po_iterator<MachineBasicBlock*> > > > + MBBI = po_begin(Fn.getBlockNumbered(0)), > > > + MBBE = po_end(Fn.getBlockNumbered(0)); MBBI != MBBE; ++MBBI) { > > > + MachineBasicBlock* MBB = *MBBI; > ... > + // Calculate Avail{In,Out} via top-down walk of Ma...
2009 Mar 18
1
[LLVMdev] Shrink Wrapping - RFC and initial implementation
...SRUsesInEntryBlock)? > > ARGHHH, I thought I simplified that before cutting the patch. > >> >> 10. >> +bool PEI::calculateUsedAnticAvail(MachineFunction &Fn) { >> ... >> +  // Calculate AnticIn, AnticOut using post-order traversal of MCFG. >> +  for (po_iterator<MachineBasicBlock*> >> >> >> +         MBBI = po_begin(Fn.getBlockNumbered(0)), >> >> >> +         MBBE = po_end(Fn.getBlockNumbered(0)); MBBI != MBBE; ++MBBI) { >> >> >> +    MachineBasicBlock* MBB = *MBBI; >> ... >> +  // Cal...
2009 Jun 27
0
[LLVMdev] Patch for llvm::DepthFirstIterator.h and llvm::PostOrderIterator.h
Hi Olaf, This patch looks good to me. I just have a few minor comments: > + inline df_iterator() { CurrentTopNode = 0; /* End is when stack is empty */ } Should the comment here be updated to say that the End is reached when the stack is empty and when CurrentTopNode is null? > + inline void toNext() > + { LLVM style puts the open brace on the same line as the function name.
2009 Jun 26
3
[LLVMdev] Patch for llvm::DepthFirstIterator.h and llvm::PostOrderIterator.h
Hi @clang and @llvm, attached you'll find a patch dealing with some iterator issues I already mentioned in both lists. Since there was no reaction I cross-post again - now IMHO production-ready code. The patch is considered to get checked-in out of the box. It should not affect the behavior of existing and working code. I really need it for clang AST processing. Changes: 1. Both
2014 Mar 07
3
[LLVMdev] [RFC] Relax the rules on const auto&? (was Re: r203179 - [C++11] Replacing iterators redecls_begin() and redecls_end() ...)
+llvmdev On Mar 7, 2014, at 5:15 AM, Tobias Grosser <tobias at grosser.es> wrote: > On 03/07/2014 01:40 PM, Aaron Ballman wrote: >> On Thu, Mar 6, 2014 at 7:12 PM, Aaron Ballman <aaron at aaronballman.com> wrote: >>> On Thu, Mar 6, 2014 at 7:10 PM, Tobias Grosser <tobias at grosser.es> wrote: >>>> I wonder if you could use 'auto const