Invocation

Invoking Diablo is as simple as:

diablo [options] <executable>

where the executable should be somewhere in the object path.

Diablo has a lot of options (you can see the complete list by typing diablo --help). Here, we will limit ourselves to the most important options:

  • -O: set the object path, a colon-separated list of directories where the object files of the program reside. You can also set this via the environment variable OBJPATH.
  • -L: set the library path, a colon-separated list of directories where the libraries linked to the program reside. You can also set this via the environment variable LIBPATH.
  • -o <outputfile>: name of the compacted executable. default: b.out
  • -Z: turn optimizations off. Diablo will just build a control flow graph, remove all unconnected blocks and write out the program. This is primarily useful if the executable generated by Diablo doesn't work. It allows you to check whether there's an optimization that goes wrong or whether the control flow graph built by Diablo is wrong. This helps us in finding the bug if you report it to us :-).
  • -D: Dump the control flow graphs of the program. This option will create two directories dots/ and dots-final/, which will respectively contain all function graphs before and after optimizations. These graphs are represented in the dot language, and can be visualized using the excellent Graphviz package. (See our links page for a pointer to this project's home page).
  • -pre: Enable partial redundancy elimination. This only works for the ARM port. You'll have to pass instruction and basic block profiles to Diablo to make this work.
  • -licm: Enable loop-invariant code motion. This only works for the ARM port. You'll have to pass instruction and basic block profiles to Diablo to make this work.
  • -pi <filename>: pass the name of the instruction profile file to Diablo.
  • -pb <filename>: pass the name of the block profile file to Diablo. If you do this, the graphs dumped with the -D switch will be colorized to indicate the heat of each block.
  • --help: Show a list of all possible options, with some explanation.