mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Merge PartialInliner changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
453eb26106
commit
636768458f
@ -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…
x
Reference in New Issue
Block a user