search for: cfgprinter

Displaying 20 results from an estimated 22 matches for "cfgprinter".

2009 Jul 16
1
[LLVMdev] [patch] Dotty printer for dependency trees
...llvm and liked the CFG dotty printer a lot. >> However there was none 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 functi...
2009 Aug 13
1
[LLVMdev] Graphviz and LLVM-TV
...This file defines specializations of GraphTraits that allows Use-Def and Def-Use relations to be treated as proper graphs for generic algorithms. ------------------------------------------------------------------------- It should be easy to write the DOTPrinter for this data type. You can take the CFGPrinter as reference. Tobi
2009 Jul 14
2
[LLVMdev] [patch] Dotty printer for dependency trees
...nction (with no function 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...
2005 Mar 17
2
[LLVMdev] Loading ProfileInfo
Hi LLVMers, I am fairly new to the LLVM pass framework. My goal is to extend the CFGPrinter analysis pass to label the edges of the graph with their edge-counts from profile data. I can generate the CFGs using 'analyze', but I am having trouble loading the profile data. I added the line AU.addRequired<ProfileInfo>(); to the getAnalysisUsage. It is returning zero for all t...
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 implemen...
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 Mar 15
1
[LLVMdev] CFG as DOT: where do node addresses come from?
...; I've been trying to figure out where these hexadecimal addresses come from. I've been up and down the code but remain at a loss. I can see where GraphWriter.h is actually writing the strings to the DOT file, and I can see that some of the DOT data is coming from DOTGraphTraits in CFGPrinter.h. But the hexadecimal addresses are a mystery. I thought perhaps a BasicBlock method, such as getName, might be producing the addresses, but no. Can anyone shed some light on this for me? Thanks, Trevor
2005 Mar 17
0
[LLVMdev] Loading ProfileInfo
On Wed, 16 Mar 2005, Eric Zimmerman wrote: > Hi LLVMers, > > I am fairly new to the LLVM pass framework. My goal is to extend the > CFGPrinter analysis pass to label the edges of the graph with their > edge-counts from profile data. > > I can generate the CFGs using 'analyze', but I am having trouble > loading the profile data. I added the line > AU.addRequired<ProfileInfo>(); to the getAnalysisUsage. It is...
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<B...
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
...ashion, 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 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*> inheri...
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
...;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 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<F...
2013 Jan 10
0
[LLVMdev] Call graph printer/viewer
...asically, there are 2 alternatives: 1) If you are trying to print/view a graph that is a Function analysis, then exploit DOTGraphTraits{Viewer,Printer} * lib/Analysis/DomPrinter.cpp * lib/Analysis/RegionPrinter.cpp 2) Otherwise, use low-level interface {View,Write}Graph * lib/Analysis/CFGPrinter.cpp - View the graph, defines passes for viewing/printing * lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp * lib/CodeGen/ScheduleDAGPrinter.cpp - View the graph, no associate pass * lib/CodeGen/EdgeBundles.cpp - MachineFunction pass. Provide a member function to view the...
2004 Aug 27
1
[LLVMdev] Help getting condition of branch instructions in pass
Hi, this is a bit of a newbie question: I am trying to discover, given a block with a conditional and its successors, which condition (T/F) each successor applies to. There's almost identical code in CFGPrinter.cpp, but where it gets called in GraphWriter.h, the child_iterator type is a pretty hairy thing, so I still don't quite understand how to get one from a BasicBlock in my own code... Is there a simpler way to do it without getting into all that? -mike
2005 Mar 18
2
[LLVMdev] Loading ProfileInfo
On Wed, Mar 16, 2005 at 09:16:20PM -0600, Chris Lattner wrote: > >I am fairly new to the LLVM pass framework. My goal is to extend the > >CFGPrinter analysis pass to label the edges of the graph with their > >edge-counts from profile data. > > > >I can generate the CFGs using 'analyze', but I am having trouble > >loading the profile data. I added the line > >AU.addRequired<ProfileInfo>(); to the getA...
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
...unction*>. > > ok I'll give it a try. >> inline comments 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 >>&...
2004 Dec 03
0
[LLVMdev] [Fwd: Updated LLVM Visual Studio project files]
...ativePath="..\..\lib\Analysis\AliasSetTracker.cpp"> > > </File> > > <File > > RelativePath="..\..\lib\Analysis\BasicAliasAnalysis.cpp"> > > </File> > > <File > > RelativePath="..\..\lib\Analysis\CFGPrinter.cpp"> > > </File> > > <File > > RelativePath="..\..\lib\Analysis\Expressions.cpp"> > > </File> > > <File > > RelativePath="..\..\lib\Analysis\InstCount.cpp"> > > </File> > &...
2004 Dec 03
2
[LLVMdev] [Fwd: Updated LLVM Visual Studio project files]
...> <File > RelativePath="..\..\lib\Analysis\AliasSetTracker.cpp"> > </File> > <File > RelativePath="..\..\lib\Analysis\BasicAliasAnalysis.cpp"> > </File> > <File > RelativePath="..\..\lib\Analysis\CFGPrinter.cpp"> > </File> > <File > RelativePath="..\..\lib\Analysis\Expressions.cpp"> > </File> > <File > RelativePath="..\..\lib\Analysis\InstCount.cpp"> > </File> > <File > RelativePath=&q...
2010 Oct 01
2
[LLVMdev] CMake "sudo make install" & headers
...m-2.8/include/llvm/AbstractTypeUser.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/AliasAnalysis.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/AliasSetTracker.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/CFGPrinter.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/CallGraph.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/CaptureTracking.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/CodeMetrics.h -- Installing: /usr/local/llvm-2.8/include/llvm/Analysis/ConstantFolding.h -- Inst...
2010 Oct 01
0
[LLVMdev] CMake "sudo make install" & headers
On Thu, Sep 30, 2010 at 3:08 PM, Samuel Williams <space.ship.traveller at gmail.com> wrote: > Hi, > > I might just be doing something stupid, but when I do > > $ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-2.8 -DCMAKE_BUILD_TYPE=Release .. > $ sudo make install > > I don't get the expected headers in >        /usr/local/llvm-2.8/include/llvm > > It is