search for: reversepostordertraversal

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

2010 Nov 24
0
[LLVMdev] A way to traverse machine basic blocks in order?
The reverse postorder iterator does what you want. It's defined in ADT/PostOrderIterator.h, and is used like this: ReversePostOrderTraversal<Function*> RPOT(&F); for (ReversePostOrderTraversal<Function*>::rpo_iterator RI = RPOT.begin(), RE = RPOT.end(); RI != RE; ++RI) <work here> Creating a ReversePostOrderTraversal is not cheap, because it first has to do a postorder walk of the entire graph. Camer...
2010 Nov 24
2
[LLVMdev] A way to traverse machine basic blocks in order?
I'm looking for a way to traverse machine basic blocks in a specific order. Basically I want all blocks that are predecessors to the current block to be traversed before the current block. I've looked at MachineDominatorTree but this doesn't traverse them in quite the way I want them to. Anyone know of a way to do this? Thanks, Micah -------------- next part -------------- An HTML
2013 Mar 19
0
[LLVMdev] Basic Block code sample
Hi, Example on how to iterate over CFG, take a look at DominanceFrontier.cpp. You can further implement easily a traverse graph algorithm. On Tue, Mar 19, 2013 at 2:35 PM, Ashish Kulkarni < ashish-kulkarni at hotmail.com> wrote: > Hi LLVM Delveloper, > i've been working on LLVM and Clang to get basic block information. > The CFG supports Visitors (CFG.h) but i might
2013 Mar 19
2
[LLVMdev] Basic Block code sample
Hi LLVM Delveloper, i've been working on LLVM and Clang to get basic block information. The CFG supports Visitors (CFG.h) but i might want to ask that is there any code sample available so that i can get the things easily.. Regards, Kulkarni Ashish A. College of engineering, Pune India. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Nov 21
1
[LLVMdev] Fwd: Order of Basic Blocks
...simple example code, where the block follow this path: BB0->BB1 (T), BB8 (F) BB1-> BB2 (T), BB3 (F) BB2-> BB4 BB3-> BB5 BB4-> BB6 BB5-> BB8 (T), BB5 (F) BB6-> BB7 (T), BB4 (F) BB7-> BB8 (T), BB4 (F) BB8 (end) So, this is the basic block flow graph. When I iterate using the ReversePostOrderTraversal iterator, the basic blocks vistied are in this order: BB0, BB1, BB3, BB2, BB7, BB6, BB4, BB5, BB8 Can someone explain why this is and how the BBs are stored so that I can either go top->down or more prefably, depth first search (from the given graph above)? Thanks. On Mon, Nov 21, 2011 at...
2011 Nov 20
3
[LLVMdev] Order of Basic Blocks
LLVMers, Is there any way to guarantee iteration of the basic blocks from top down or path to path? Currently it looks sort of semi-random, sometimes visiting loop heads first and other times loop tails, is there a way I can visit the BBs top down or path to path? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Nov 20
1
[LLVMdev] Order of Basic Blocks
...ottom up and sometimes it starts top down then jumps to the > bottom and goes bottom up. Is there a reason for this randomness? > > On Sun, Nov 20, 2011 at 6:10 PM, Cameron Zwarich <zwarich at apple.com>wrote: > >> Your question is a bit vague, but you probably want >> ReversePostOrderTraversal from include/llvm/ADT/PostOrderIterator.h. >> >> Cameron >> >> On Nov 20, 2011, at 3:00 PM, Ryan Taylor wrote: >> >> > LLVMers, >> > >> > Is there any way to guarantee iteration of the basic blocks from top >> down or path to path? Cu...
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/at...
2013 Apr 09
0
[LLVMdev] Any passes that work on extended basic blocks?
As far as I know, there is none. Pretty much every analysis or transform on EBBs can be extended to work on the dominator tree, which is what LLVM prefers. Cameron On Apr 8, 2013, at 9:53 PM, Bill He <wh3 at rice.edu> wrote: > Hi all, > > I am trying to find a sample pass that works on extended basic blocks. Any suggestion or help is very much appreciated. > > Thanks in
2013 Apr 09
2
[LLVMdev] Any passes that work on extended basic blocks?
Hi all, I am trying to find a sample pass that works on extended basic blocks. Any suggestion or help is very much appreciated. Thanks in advance. Best, Weibo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130408/5492103d/attachment.html>
2011 Nov 21
0
[LLVMdev] Order of Basic Blocks
...t starts top down then jumps to the >> bottom and goes bottom up. Is there a reason for this randomness? >> >> On Sun, Nov 20, 2011 at 6:10 PM, Cameron Zwarich <zwarich at apple.com>wrote: >> >>> Your question is a bit vague, but you probably want >>> ReversePostOrderTraversal from include/llvm/ADT/PostOrderIterator.h. >>> >>> Cameron >>> >>> On Nov 20, 2011, at 3:00 PM, Ryan Taylor wrote: >>> >>> > LLVMers, >>> > >>> > Is there any way to guarantee iteration of the basic blocks from top &...
2017 Oct 27
3
Dominator tree side effect or intentional
Hello, I was wondering whether or not some behaviour that I am seeing is expected behaviour and that it has been designed like this, or not. A dominator relation is given by "if A dominates B", then all paths to B go through A. For example, take the CFG below (which is a directed graph (couldn’t make the arrow heads but ok.): A / \ B C \ / D | E We can construct
2011 Jun 06
0
[LLVMdev] Understanding SelectionDAG construction
Hi Ankur, > The flags "-view-sched-dags".. described in the doc doesn't seem to work. ( > "llc -help" doesn't list it ). as far as I remember, displaying DAGs during compilation is only enabled in "debug builds" [1] of LLVM. You probably have to re-configure and re-compile LLVM to enable this feature. Best regards, Christoph [1]
2011 Jun 06
4
[LLVMdev] Understanding SelectionDAG construction
I am trying to understand the SelectionDAG construction from LLVM IR. I have gone through the doc "The LLVM Target-Independent Code Generator" on LLVM site. This gives a great initial overview. However I am unable to catch the actual control flow for the llvm->selectionDag conversion. The flags "-view-sched-dags".. described in the doc doesn't seem to work. ( "llc
2015 May 05
1
[LLVMdev] Naryreassociate vs reassociate
On Tue, May 5, 2015 at 10:20 AM, Jingyue Wu <jingyue at google.com> wrote: > Hi Daniel, > > I presume you mean, instead of assigning function arguments distinct ranks > (http://llvm.org/docs/doxygen/html/Reassociate_8cpp_source.html#l00282), we > should group function arguments in favor of existing pairings. Existing = pairings reassociate already chose before *not* existing
2017 Aug 22
5
[RFC] mir-canon: A new tool for canonicalizing MIR for cleaner diffing.
Patch for review. On Mon, Aug 21, 2017 at 11:45 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> wrote: > Ping. > > Still working on preparing code for review. Will have a patch for review > ready in the coming days. > > PL > > On Tue, Aug 15, 2017 at 12:06 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> > wrote: > >> Hi, >> >> >>