delena added a comment. LGTM. But I suggest : 1. Run llc and ensure that you don't have any issue or unresolved "call" after llc. 2. Divide this patch into many parts and submit one-by-one. http://reviews.llvm.org/D11526