forked from OSchip/llvm-project
parent
3092e9c5c2
commit
bd6a213725
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue