llvm-tools: Useful tools built on llvm-analysis

[ bsd3, development, library, program ] [ Propose Tags ] [ Report a vulnerability ]

This package includes some tools to visualize the LLVM IR. Current visualizations include static call graphs, CFGs, CDGs, dominator trees, and some simple escape graphs. Output formats include most graphviz-supported formats, along with an HTML-based format.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.0.0, 0.2.0.1
Dependencies attoparsec, attoparsec-conduit, base (>=4 && <5), blaze-html (>=0.5), blaze-markup, bytestring, conduit, containers, directory, filemanip (>=0.3.5.2), filepath, graphviz, llvm-analysis (>=0.2.0), llvm-data-interop (>=0.2.0), llvm-tools (>=0.2.0.0), optparse-applicative (>=0.7.0 && <0.8), parallel-io, process-conduit, unordered-containers, xml [details]
License BSD-3-Clause
Author Tristan Ravitch
Maintainer travitch@cs.wisc.edu
Category Development
Uploaded by TristanRavitch at 2013-11-12T04:24:29Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables TypeUnificationCheck, ViewIRGraph, FindValue, DumpLLVMModule
Downloads 1985 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 3 reports]

Readme for llvm-tools-0.2.0.1

[back to package description]

This package includes some tools to visualize the LLVM IR. Current visualizations include static call graphs, CFGs, CDGs, dominator trees, and some simple escape graphs. Output formats include most graphviz-supported formats, along with an HTML-based format.

Usage

Options for the visualizer:

-o --output=[FILE or DIR]  The destination of a file output
-t --type=[GRAPHTYPE]      The graph requested.  One of Cfg, Cdg, Cg,
                           Domtree, Postdomtree
-f --format=GVOUT          The type of output to produce: Gtk, Xlib, Html, XDot,
                           Eps, Jpeg, Pdf, Png, Ps, Ps2, Svg.  Default: Gtk
-? --help                  Display help message

For all graph types except the call graph, the output specifies a directory. The directory will contain one output file for each function in the input IR module. For the static call graph, the output is a single file. If the format is 'Html', the output is always a directory.

The Html format is special. It produces an SVG embedded in an HTML page. The SVG can be navigated (via panning and zooming) using an openstreetmap-style interface (it uses the OpenLayers library).

Input files can be LLVM bitcode files, LLVM assembly files, or C/C++ source files.

Dependencies

This package depends on a few other Haskell libraries that are not yet on Hackage:

  • hbgl
  • haggle
  • ifscs
  • llvm-base-types
  • llvm-data-interop
  • llvm-analysis

Additionally, it requires that you have the LLVM shared libraries (versions 3.0-3.2) and tools installed on your system (llvm-config must be in your PATH).

Installation

Installation would look something like:

REPOSITORIES="hbgl-experimental
haggle
ifscs
itanium-abi
llvm-base-types
llvm-data-interop
llvm-analysis
llvm-tools"

# Download the repositories
for REPO in $REPOSITORIES
do
  git clone git://github.com/travitch/$REPO.git
done

# Add ./ prefixes to each repository (for cabal)
TOINSTALL=`echo ./$REPOSITORIES  | sed 's: : ./:g'`

# Build the tools along with dependencies
cabal install $TOINSTALL