Displaying 17 results from an estimated 17 matches for "nodes_end".
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 Instruction(s)...
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 BasicBlock a gra...
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
...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 comments follow...
>
> Török Edwin wrote:
>> On 2009-09-06 17:30, Ioannis Nousia...
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
....
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 and make now...
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
...};
> 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*>.
>
>
ok I'll give it a try.
>> inline comments follow...
2017 May 24
3
GraphTraits dereferencing
...typedef mapped_iterator<DSGraph::node_iterator, DerefFun> nodes_iterator;
static nodes_iterator nodes_begin(DSGraph *G) {
return map_iterator( G->node_begin(), DerefFun(dereference) );
}
static nodes_iterator nodes_end(DSGraph *G) {
return map_iterator( G->node_end(), DerefFun(dereference) );
}
static ChildIteratorType child_begin(NodeType *N) { return N->begin(); }
static ChildIteratorType child_end(NodeType *N) { return N->end(); }
};
I”m just unsure as in 4.0, there’s a need for a NodeRef...
2010 Apr 07
2
[LLVMdev] graph abstraction proposal
...def 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;
...
child_begin(NodeType* node) {return succ_b...
2009 Jul 16
1
[LLVMdev] [patch] Dotty printer for dependency trees
...aphviz 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 {
CFGOnlyViewer() : FunctionPass(&ID) {}
virtual bool runOnFunction(Function &F) {
- F.vi...
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
...ll 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) : f(f) {}
>
> typedef BasicBlock NodeType;
&g...
2010 Apr 09
0
[LLVMdev] graph abstraction proposal
...esIteratorType;
>
> 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 Node...
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
...e <> 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
DefaultDOTGraphTraits {
DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple)
{}
static std::str...
2012 Jun 02
0
[LLVMdev] DFG of machine functions
...raph<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
> DefaultDOTGraphTraits {
>
> DOTGraphTraits (bool isSimple=false) : DefaultDOTGr...
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
>
>