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 | 636768458f9c74b6062f1d9f159b6a0464b208c4 (patch) | |
tree | 4246f00734160d054132a164fa127c25f0b8a7f9 /lib | |
parent | 453eb261068a6bfac2388bbcf6da81ce246ce5cf (diff) | |
download | external_llvm-636768458f9c74b6062f1d9f159b6a0464b208c4.zip external_llvm-636768458f9c74b6062f1d9f159b6a0464b208c4.tar.gz external_llvm-636768458f9c74b6062f1d9f159b6a0464b208c4.tar.bz2 |
Merge PartialInliner changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/PartialInlining.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/PartialInlining.cpp b/lib/Transforms/IPO/PartialInlining.cpp index b3a2554..0b975ae 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; } |