similar to: [LLVMdev] Iterating on the DSGraph... (fwd)

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Iterating on the DSGraph... (fwd)"

2002 Nov 10
3
[LLVMdev] DSGraph questions
1. What is the difference between DSNodeHandle and DSNode? What do the functions getLink() and getSize() do? 2. In the previous email, you mentioned that we can use DSNode::getPointerSize() to get the number of links, But I checked the doxygen documentation, there is no such member for DSNode. 3. Previously I use the following code: for( df_iterator<DSNode*> I = df_begin(pnode),
2002 Nov 11
1
[LLVMdev] DSGraph questions
Dear Prof. Adve, I recently checked out the llvm using cvs update command under the llvm directory. But when I went to see the DSNode.h, there is no getPointerSize function. I checked the doxygen tree, it's there. So that means I didn't update my cvs tree correctly. Could you let me know how to update my CVS tree? Or there is a problem at somewhere else? Thanks, xiaodong On Sun, 10 Nov
2002 Nov 18
0
[LLVMdev] Fixed DSGraph iteration, depth first search, etc...
The following now works for me: const DSNode *N1 = ...; df_iterator<const DSNode*> X1 = df_begin(N1), XE1 = df_end(N1); DSNode *N2 = ...; df_iterator<DSNode*> X2 = df_begin(N2), XE2 = df_end(N2); You need the following #includes: #include "Support/DepthFirstIterator.h" #include "llvm/Analysis/DSGraphTraits.h" You need this patch:
2002 Nov 10
0
[LLVMdev] DSGraph questions
I'll try to answer these because Chris is really busy this week. > From: Xiaodong Li <xli3 at santoor.cs.uiuc.edu> > Subject: [LLVMdev] DSGraph questions > Sender: llvmdev-admin at cs.uiuc.edu > Date: Sun, 10 Nov 2002 11:25:53 -0600 (CST) > > 1. What is the difference between DSNodeHandle and DSNode? What do the > functions getLink() and getSize() do?
2002 Nov 08
2
[LLVMdev] Re: LLVMdev digest, Vol 1 #44 - 2 msgs
llvm, What is the best way to implement a traversal of the DS graph, starting at a scalar and processing all nodes to which the scalar allows access? Currently the links vector is not public and there is no apparent way to bound the getLink call (ie a getNumLinks call).... Dave
2002 Nov 08
0
[LLVMdev] Iterating on the DSGraph...
> What is the best way to implement a traversal of the DS graph, starting at > a scalar and processing all nodes to which the scalar allows access? > Currently the links vector is not public and there is no apparent way to > bound the getLink call (ie a getNumLinks call).... Warning, untested code follows, but you should get the idea: #include
2009 Jun 15
3
[LLVMdev] Some df_iterator and po_iterator issues
Hi @llvm, below is a copy of a message I sent to clang a hour before. I guess it's more appropriate here. --snip-- While trying to eleminate as much std::tr1::function as possible I stumbled over a design flaw in llvm::df_iterator. Consider the following code: void for_all_stmts(Stmt* S, const std::tr1::function<void(Stmt*)>& fn) { if (S) { fn(S); for
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 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
2002 Nov 16
5
[LLVMdev] question
Thanks Bill. One more question, when I use the DSNode iterator to traverse a node's children. The return value of I.getNode() can only be 'const DSNode *', I cannot use 'DSNode *' type. So as a result, I always get error message like this: MemLeakage.cpp:159: invalid conversion from `const DSNode*' to `DSNode*' MemLeakage.cpp:159: initializing argument 1 of `void
2017 May 24
3
GraphTraits dereferencing
Hello, I’m trying to port a project up to 4.0 and I’m seeing the following error: In file included from /Users/jaredcarlson/Projects/llvm-4.0.0.src/include/llvm/ADT/StringRef.h:13: /Users/jaredcarlson/Projects/llvm-4.0.0.src/include/llvm/ADT/STLExtras.h:139:13: error: no type named 'type' in 'std::__1::result_of<std::__1::pointer_to_unary_function<llvm::DSNode *, llvm::DSNode
2002 Nov 16
2
[LLVMdev] question
When I tried to compile the program, I got this error: ../../../include/llvm/Analysis/DSGraph.h: In member function `virtual bool <unnamed>::GlobalMemLeakage::run(Module&)': ../../../include/llvm/Analysis/DSGraph.h:38: `void DSGraph::operator=(const DSGraph&)' is private MemLeakage.cpp:87: within this context gmake: *** [Debug/MemLeakage.o] Error 1 I don't
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:
2009 Aug 07
2
[LLVMdev] [PATCH] Add functionality to scc_iterator
Chris Lattner wrote: > It's more of an algorithm than a datastructure. Where else in the > codebase would it be useful to use? If only in one place, it is > probably reasonable to put it near the code that uses it. > > -Chris > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
2008 Jan 23
1
[LLVMdev] Walking all the predecessors for a basic block
Hi, Well, yes i did try your suggestion but i keep on running into a compilation problem. The error is: llvm[0]: Compiling Hello.cpp for Release build (PIC) /home/saraswat/llvm/llvm-2.1/include/llvm/ADT/GraphTraits.h: In instantiation of `llvm::GraphTraits<llvm::ilist_iterator<llvm::BasicBlock> >': Hello.cpp:59: instantiated from here
2008 Jan 22
0
[LLVMdev] Walking all the predecessors for a basic block
Hi Pabhat, Have you checked out DepthFirstIterator? (include/llvm/ADT/ DepthFirstIterator.h). It provides an iterator abstraction to perform a forward/reverse DFS traversal of a graph. Many of the LLVM datatypes that represent graphs have a template specialization of the GraphTraits<> class which allows separate algorithms to treat them as graphs, walk them, etc. (Both BasicBlock
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 Sep 06
2
[LLVMdev] Graphviz and LLVM-TV
On 2009-09-06 17:30, Ioannis Nousias wrote: > I've tried to write a DFGPrinter based on the CFGPrinter, as you > suggested, but encountered problems. > > The GraphWriter expects > GraphTraits<GraphType>::nodes_begin()/nodes_end(). The way this is > implemented in CFG.h, a function is a graph of basic blocks. A > GraphTraits<Function*> inherits from
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
Edwin, thank you for your effort, but I'm not sure I understand. Are you describing a graph traversal problem? Is the data model stored in a predecessor/successor fashion, which requires you to 'walk' the graph in order to visit all nodes? (and what happens when you have disjointed DFGs?). inline comments follow... Török Edwin wrote: > On 2009-09-06 17:30, Ioannis Nousias
2002 Nov 16
0
[LLVMdev] question
Also sprach Xiaodong Li: } Thanks Bill. One more question, when I use the DSNode iterator to } traverse a node's children. The return value of I.getNode() can only } be 'const DSNode *', I cannot use 'DSNode *' type. So as a result, I } always get error message like this: } } MemLeakage.cpp:159: invalid conversion from `const DSNode*' to `DSNode*' } MemLeakage.cpp:159: