The "opt" tool already links in most of the analysis passes which makes the analysis tool somewhat redundant and chewing up significant disk space. We should combine the features of "analyze" into "opt", possibly by adding to opt a new option, "--analyze" which would invoke the printing behaviors of the exisiting analyze tool. Making this change will reduce LLVM's footprint significantly since analyze is one of the largest tools in LLVM.
Mine.
This change has been made. To get the old analyze functionality pass the -analyze option to opt. Note that the integeration here is dead simple. The "main" of analyze was just copied to opt and invoked if the -analyze option was given. There may be opportunities for further integration such as removing the distinction between transform passes and analysis passes. To use the analysis functionality, if you previously did this: analyze $FNAME -domset -disable-verify you would now do this: opt -analyze $FNAME -domset -disable-verify Pretty simple. The main patches involved (excluding all the updates to the Regression tests): http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036847.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036850.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036851.html
Exercises for the future: (1) Allow opt to invoke both the analysis and optimization behaviors at the same time. Currently this isn't possible. (2) Remove the distinction between Analysis and Transform passes.
FYI, The disk savings (DEBUG build): Tool Before After analyze 39,739,826 0 opt 69,575,694 72,737,404 Net Savings: 36,578,116