summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/PartialInlining.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-15 20:50:26 +0000
committerOwen Anderson <resistor@mac.com>2009-06-15 20:50:26 +0000
commit636768458f9c74b6062f1d9f159b6a0464b208c4 (patch)
tree4246f00734160d054132a164fa127c25f0b8a7f9 /lib/Transforms/IPO/PartialInlining.cpp
parent453eb261068a6bfac2388bbcf6da81ce246ce5cf (diff)
downloadllvm-636768458f9c74b6062f1d9f159b6a0464b208c4.tar.gz
llvm-636768458f9c74b6062f1d9f159b6a0464b208c4.tar.bz2
llvm-636768458f9c74b6062f1d9f159b6a0464b208c4.tar.xz
Merge PartialInliner changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/PartialInlining.cpp')
-rw-r--r--lib/Transforms/IPO/PartialInlining.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/PartialInlining.cpp b/lib/Transforms/IPO/PartialInlining.cpp
index b3a2554039..0b975ae499 100644
--- a/lib/Transforms/IPO/PartialInlining.cpp
+++ b/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;
}