diff options
author | Owen Anderson <resistor@mac.com> | 2009-06-15 20:50:26 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-06-15 20:50:26 +0000 |
commit | bd6a213725f121d0e1c1e001efa425b29189ba23 (patch) | |
tree | 34ff39c6856a44f9e9ed6833a8f87b8197ede87e /llvm/lib/Transforms/IPO/PartialInlining.cpp | |
parent | 3092e9c5c2f9c5a831268a2cfa17b5ff35af6bf2 (diff) | |
download | llvm-bd6a213725f121d0e1c1e001efa425b29189ba23.zip llvm-bd6a213725f121d0e1c1e001efa425b29189ba23.tar.gz llvm-bd6a213725f121d0e1c1e001efa425b29189ba23.tar.bz2 |
Merge PartialInliner changes.
llvm-svn: 73412
Diffstat (limited to 'llvm/lib/Transforms/IPO/PartialInlining.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/PartialInlining.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp index b3a25540..0b975ae 100644 --- a/llvm/lib/Transforms/IPO/PartialInlining.cpp +++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp @@ -20,10 +20,13 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/FunctionUtils.h" +#include "llvm/ADT/Statistic.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/CFG.h" using namespace llvm; +STATISTIC(NumPartialInlined, "Number of functions partially inlined"); + namespace { struct VISIBILITY_HIDDEN PartialInliner : public ModulePass { virtual void getAnalysisUsage(AnalysisUsage &AU) const { } @@ -132,6 +135,8 @@ Function* PartialInliner::unswitchFunction(Function* F) { duplicateFunction->replaceAllUsesWith(F); duplicateFunction->eraseFromParent(); + ++NumPartialInlined; + return extractedFunction; } |