davidxl added a comment. The refactoring should be straight forward -- introduce a new function Inliner::getInlineThreshold that takes two arguments: 1) callsite; and 2) callee function decl. Can you please help with this? Repository: rL LLVM http://reviews.llvm.org/D14309