Chris Lattner wrote: On Aug 13, 2009, at 8:56 AM, Ioannis Nousias wrote:> 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, but I can't find which tool supports > them) > > This should help: > http://llvm.org/docs/ProgrammersManual.html#ViewGraph >Hey Chris. Thanks for the prompt response. That's what I was referring to before. If I'm getting this right, I should do a debug build of LLVM and the run it from gdb? So say, I run llvmc from gdb, pass on the code I want to compile and then what? Should I do a break point somewhere first, or wait for the program to finish and then call the methods?(which I don't think it would work). I'm confused. I was hoping for some CLI option or a separate tool that just parses in LLVM assembly and spits out DOT.>> >> Also, LLVM-TV seems outdated. I've tried to compile it with 2.5 LLVM and >> got various errors due to API changes. Tried to correct them, but got >> overwhelmed. Has the project been abandoned? > > Yes, it is really really old and abandoned. >too bad. looked interesting thanks, Ioannis
On Thu, Aug 13, 2009 at 12:17 PM, Ioannis Nousias < ioannis.nousias at googlemail.com> wrote:> >> Also, LLVM-TV seems outdated. I've tried to compile it with 2.5 LLVM and > >> got various errors due to API changes. Tried to correct them, but got > >> overwhelmed. Has the project been abandoned? > > > > Yes, it is really really old and abandoned. > > too bad. looked interestingI've fixed the compilation and linking errors and updated the instructions on how to build it, take a look at README.txt in SVN. Note that it requires poolalloc module and LLVM, but poolalloc hasn't been updated to work with top-of-trunk LLVM, so I included a recent SVN revision which worked for me. Poolalloc build is also broken right now, but it works enough to be used with llvm-tv (you only need libLLVMDataStructure). The current issue is the wxWidgets exception that you'll get when trying to select a module in the list: ./src/gtk/evtloop.cpp(64): assert "!m_impl" failed in ~wxEventLoop(): should have been deleted in Run() I haven't been able to figure out what's going on here. If you are interested enough in llvm-tv to help me figure it out, let me know. Misha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090818/8d0968c9/attachment.html>
On Tue, Aug 18, 2009 at 10:45 AM, Misha Brukman <brukman at gmail.com> wrote:> On Thu, Aug 13, 2009 at 12:17 PM, Ioannis Nousias < > ioannis.nousias at googlemail.com> wrote: > >> >> Also, LLVM-TV seems outdated. I've tried to compile it with 2.5 LLVM >> and >> >> got various errors due to API changes. Tried to correct them, but got >> >> overwhelmed. Has the project been abandoned? >> > >> > Yes, it is really really old and abandoned. >> >> too bad. looked interesting > > > I've fixed the compilation and linking errors and updated the instructions > on how to build it, take a look at README.txt in SVN. > > Note that it requires poolalloc module and LLVM, but poolalloc hasn't been > updated to work with top-of-trunk LLVM, so I included a recent SVN revision > which worked for me. > Poolalloc build is also broken right now, but it works enough to be used > with llvm-tv (you only need libLLVMDataStructure). > > The current issue is the wxWidgets exception that you'll get when trying to > select a module in the list: > > ./src/gtk/evtloop.cpp(64): assert "!m_impl" failed in ~wxEventLoop(): > should have been deleted in Run() > > I haven't been able to figure out what's going on here. If you are > interested enough in llvm-tv to help me figure it out, let me know. >OK, I've fixed that too-- take a look and let me know if you have any issues building/using LLVM-TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090818/2751ac9e/attachment.html>