Displaying 12 results from an estimated 12 matches for "nodes_iterator".
2017 May 24
3
GraphTraits dereferencing
...nstantiation of 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 neces...
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
...DFG Graph.
I think you could do something 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...
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
...> 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");
&...
2009 Jul 16
1
[LLVMdev] [patch] Dotty printer for dependency trees
...e for the dominance 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 @@ name...
2009 Jul 14
2
[LLVMdev] [patch] Dotty printer for dependency trees
...ction bodies)
-view-postdom : View postdominance tree of function
-view-postdom-only : View postdominance tree of function
(with no function bodies)
The patch contains these changes:
1. Move DOTGraphTraits<const Function*> to CFGPrinter.h to reuse it
later.
2. Add nodes_iterator to GraphTraits<DomTreeNode *>,
GraphTraits<DominatorTree*>, GraphTraits<PostDominatorTree*> to enable
the GraphWriter on these data structures.
3. The file DomPrinter.cpp containing the actual passes, printers & Co.
It is simple as almost everything already existed.
4. A lit...
2012 May 31
2
[LLVMdev] DFG of machine functions
...ts*
template <typename T>
class MCDFGraph {
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<Mac...
2013 Jun 05
0
[LLVMdev] CallGraph, GraphTraits and DominatorTree
...quot;;
DTB->print(errs());
return false;
}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<CallGraph>();
}
Error list:
/Developer/llvm/include/llvm/Analysis/Dominators.h:666:35: error: no viable
conversion from 'typename TraitsTy::nodes_iterator' (aka
'mapped_iterator<CallGraph::iterator, DerefFun>') to 'NodeType *' (aka
'llvm::CallGraphNode *')
if (TraitsTy::child_begin(I) == TraitsTy::child_end(I))
^
/Developer/llvm/lib/Transforms/ThreadBufferOptimizer/ThreadB...
2012 Jun 02
0
[LLVMdev] DFG of machine functions
...ph {
> 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...
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:
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
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
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
...name PassT::PostDominatortreeType PostDomTreeT;
> + typedef typename PassT::DomTreeNodeType DomTreeNodeT;
> + typedef typename PassT::LoopinfoType LoopInfoT;
> +
> + typedef GraphTraits<FuncT *> FuncGTraits;
> + //typedef FuncGTraits::nodes_iterator BlockIterator;
> + typedef typename FuncT::iterator BlockIterator;
> +
> + typedef typename FuncGTraits::NodeType BlockT;
> + typedef GraphTraits<BlockT *> BlockGTraits;
> + typedef GraphTraits<Inverse<BlockT *> >...