llvmgraphvizllc

llc -view-*-dags foo.ll not working in ubuntu


I have installed LLVM3.6 on my Ubuntu 14.04 machine. I have also set the path for LLVM_PATH_DOT=/usr/bin/dot and later on LLVM_PATH_DOT=/usr/bin/dotty.

I also tried to check LLVM_ENABLE_DOXYGEN during CMake configuration, and gave the path for DOTTY. It also doesn't work.

Lastly, I created a new entry in CMAKE, called LLVM_PATH_DOTTY, and supplied in the path. It also doesn't work.

When I try to create the DAG output for a .ll file, llc neither gives any error message nor prints a graph.

I pass in the following command:

llc -view-dag-combine-lt-dags foo.ll

How can I solve this problem? Thank you


Solution

  • If you're using LLVM 3.6.x or earlier, you have to also specify the -filter-view-dags=<bb-name> option to specify the name of the basic block which you wish to view.

    This was unintended behaviour (omitting the flag is meant to mean "view all basic blocks", not "view none of the basic blocks"). The bug was fixed in LLVM 3.7. If you want to manually apply the patch which fixes this, see this mailing list post for details: http://lists.llvm.org/pipermail/llvm-dev/2015-July/088631.html