search for: nodes_begin

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

2017 May 24
3
GraphTraits dereferencing
...template class 'llvm::mapped_iterator<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::DSNode, true, false, void>, false, false>, std::__1::pointer_to_unary_function<llvm::DSNode *, llvm::DSNode &> >' requested here static nodes_iterator nodes_begin(DSGraph *G) { So, it looks to me like in DSGraph, the iterator needs to be dereferenced correctly. Right now the source reads: template <> struct GraphTraits<DSGraph*> { typedef DSNode NodeType; typedef DSNode::iterator ChildIteratorType; // not sure this is necessary anymore...
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
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 GraphTraits<BasicBlock*>, and implements those nodes_begin()/nodes_end() wrapper functions. Should I modify CFG.h and make now BasicBlock a graph of In...
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 GraphTraits<BasicBlock*>, and > implements those nodes_begin()/nodes_end() wrapper functions. Should I > modify CFG.h and make now Basi...
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
...ing like this: template <typename T> class DFG { private: T p; public: DFG(T t) : p(t) {} T operator*() { return p; } }; template <> struct GraphTraits<DFG<Function*> > : public GraphTraits<Value*> { typedef inst_iterator nodes_iterator; static nodes_iterator nodes_begin(DFG<Function *> F) { return inst_begin(*F); } static nodes_iterator nodes_end(DFG<Function *> F) { return inst_end(*F); } }; ... ViewGraph(DFG<Function*>(F), "test"); Then you could implement a DOTGraphTraits for DFG<Function*>. > > inline...
2009 Aug 13
1
[LLVMdev] Graphviz and LLVM-TV
Hi Ioannis, On Thu, 2009-08-13 at 19:31 +0100, Ioannis Nousias wrote: > Thanks Tobi for the tip. > > however I also need the Data-Flow-Graph of each basic block/functions. > As I said, I need a view of how the instructions 'link' to each other > (via registers or memory aliasing or whatnot) I believe that there is not yet a DOT printer for this kind of information.
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
...ments follow... Török Edwin wrote: > 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 GraphTraits<BasicBlock*>, and >> implements those nodes_begin()/nodes_end() wrapper functions. Should I >> modify CFG.h a...
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
...FG { > private: > T p; > public: > DFG(T t) : p(t) {} > T operator*() { return p; } > }; > template <> struct GraphTraits<DFG<Function*> > : public > GraphTraits<Value*> { > typedef inst_iterator nodes_iterator; > static nodes_iterator nodes_begin(DFG<Function *> F) { > return inst_begin(*F); > } > static nodes_iterator nodes_end(DFG<Function *> F) { > return inst_end(*F); > } > }; > > ... > ViewGraph(DFG<Function*>(F), "test"); > > Then you could implement a DOTGra...
2010 Apr 07
2
[LLVMdev] graph abstraction proposal
...similar to GraphTraits): typedef XXX NodeType; typedef XXX ChildIteratorType; typedef XXX NodesIteratorType; getRoots(); // return all roots getRoot(); // return the root if it is only one, othewise NULL child_begin(NodeType* node); // iterators for children of a node child_end(NodeType* node); nodes_begin(); // iterators for the nodes of a node nodes_end(); A concrete graph needs a constructor that stores a reference to the data that is to look like a graph. e.g. struct BasicBlockGraph { Function& f; BasicBlockGraph(Function& f) : f(f) {} typedef BasicBlock NodeType;...
2009 Jul 16
1
[LLVMdev] [patch] Dotty printer for dependency trees
...ance trees. >> >> I implemented dotty printing for dominance trees Great! I'm a huge fan of graphviz integration in the compiler. > And here is the patch. What's up with copying from CFGPrinter.cpp into CFGPrinter.h? You shouldn't need that. + static nodes_iterator nodes_begin (DomTreeNode * N) { + return df_begin<DomTreeNode *> (N); + } + + static nodes_iterator nodes_end (DomTreeNode *N) { + return df_end<DomTreeNode *> (N); + } No spaces between the function name and the parenthesis. This occurs a few times. @@ -112,7 +59,7 @@ namespace {...
2009 Aug 13
7
[LLVMdev] Graphviz and LLVM-TV
Hi I'm trying to get a graphviz output (DOT) of a code I'm compiling. I want to see the DFG/CFG of the LLVM assembly, how the operations are chained together. The documentation mentions something about calling certain methods from within gdb, but isn't there some option when invoking the compiler (I've seen some -print-cfg and -dot-cfg options mentioned in some source files,
2009 Jul 14
0
[LLVMdev] [patch] Dotty printer for dependency trees
On Wed, 2009-07-15 at 00:20 +0200, Tobias Grosser wrote: > Hi, > > I started to work with llvm and liked the CFG dotty printer a lot. > However there was none for the dominance trees. > > I implemented dotty printing for dominance trees And here is the patch. Tobi -------------- next part -------------- A non-text attachment was scrubbed... Name:
2010 Apr 08
0
[LLVMdev] graph abstraction proposal
...XXX NodesIteratorType; > > getRoots(); // return all roots > getRoot(); // return the root if it is only one, othewise NULL > or just add these methods to GraphTraits? > > child_begin(NodeType* node); // iterators for children of a node > child_end(NodeType* node); > > nodes_begin(); // iterators for the nodes of a node > nodes_end(); > > > A concrete graph needs a constructor that stores a reference to the data > that is to look like a graph. > e.g. > struct BasicBlockGraph > { > Function& f; > > BasicBlockGraph(Function& f)...
2010 Apr 09
0
[LLVMdev] graph abstraction proposal
...> typedef XXX ChildIteratorType; > typedef XXX NodesIteratorType; > > getRoots(); // return all roots > getRoot(); // return the root if it is only one, othewise NULL > > child_begin(NodeType* node); // iterators for children of a node > child_end(NodeType* node); > > nodes_begin(); // iterators for the nodes of a node > nodes_end(); > > > A concrete graph needs a constructor that stores a reference to the data > that is to look like a graph. > e.g. > struct BasicBlockGraph > { > Function& f; > > BasicBlockGraph(Function&amp...
2009 Jul 14
2
[LLVMdev] [patch] Dotty printer for dependency trees
Hi, I started to work with llvm and liked the CFG dotty printer a lot. However there was none for the dominance trees. I implemented dotty printing for dominance trees and introduced these new flags: -dot-dom : Print dominance tree of function to 'dot' file -dot-dom-only : Print dominance tree of function to 'dot' file (with no function
2012 May 31
2
[LLVMdev] DFG of machine functions
...CDFGraph { private: T p; public: MCDFGraph(T t) : p(t) {} T operator*() { return p; } }; template <> struct GraphTraits<MCDFGraph<MachineFunction*> > : public GraphTraits<Value*> { typedef mc_inst_iterator nodes_iterator; static nodes_iterator nodes_begin(MCDFGraph<MachineFunction *> F) { return mc_inst_begin(*F); } static nodes_iterator nodes_end(MCDFGraph<MachineFunction *> F) { return mc_inst_end(*F); } }; template<> struct DOTGraphTraits<MCDFGraph<MachineFunction*> > : public DefaultD...
2012 Jun 02
0
[LLVMdev] DFG of machine functions
...t; MCDFGraph(T t) : p(t) {} > T operator*() { return p; } > }; > > template <> struct GraphTraits<MCDFGraph<MachineFunction*> > : public > GraphTraits<Value*> { > typedef mc_inst_iterator nodes_iterator; > > static nodes_iterator nodes_begin(MCDFGraph<MachineFunction *> F) { > return mc_inst_begin(*F); > } > > static nodes_iterator nodes_end(MCDFGraph<MachineFunction *> F) { > return mc_inst_end(*F); > } > }; > > template<> > struct DOTGraphTraits<MCDFGrap...
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message ----- > From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org> > To: "Vaivaswatha Nagaraj" <vn at compilertree.com> > Cc: "LLVM Dev" <llvm-dev at lists.llvm.org> > Sent: Thursday, December 3, 2015 4:41:46 AM > Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA > >