The patch adds functionality to MergeFunctions to merge not just identical but also similar functions. Details were presented at the US LLVM conference, see: http://llvm.org/devmtg/2013-11/#talk3 & http://llvm.org/devmtg/2013-11/slides/Koch-FunctionMerging.pdf
This is a new revision of the patch previously posted by Pranav Bhandarkar on 01/16.
Changes:
- Fix passing of choice argument
- Respect minimum similarity threshold
- Allow merging of functions containing InvokeInsts
- Improve hashing function to include size of first BB
- Better debug output