diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-27 04:20:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-27 04:20:52 +0000 |
commit | 8f2718fbef6177966ff807af0732eb2431bd9a5f (patch) | |
tree | cfd6272a0b43a86e79d2e9cff58c1de40c0f78a0 /include/llvm/Transforms/Utils/Cloning.h | |
parent | ec1bea0d94372985a0a5eb283e644c6d0dd345dc (diff) | |
download | external_llvm-8f2718fbef6177966ff807af0732eb2431bd9a5f.zip external_llvm-8f2718fbef6177966ff807af0732eb2431bd9a5f.tar.gz external_llvm-8f2718fbef6177966ff807af0732eb2431bd9a5f.tar.bz2 |
enhance InlineFunction to be able to optionally return
a the list of static allocas that it inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/Cloning.h')
-rw-r--r-- | include/llvm/Transforms/Utils/Cloning.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h index 148472e..5b15b5b 100644 --- a/include/llvm/Transforms/Utils/Cloning.h +++ b/include/llvm/Transforms/Utils/Cloning.h @@ -38,6 +38,7 @@ class TargetData; class Loop; class LoopInfo; class LLVMContext; +class AllocaInst; template <typename T> class SmallVectorImpl; /// CloneModule - Return an exact copy of the specified module @@ -168,9 +169,15 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, /// If a non-null callgraph pointer is provided, these functions update the /// CallGraph to represent the program after inlining. /// -bool InlineFunction(CallInst *C, CallGraph *CG = 0, const TargetData *TD = 0); -bool InlineFunction(InvokeInst *II, CallGraph *CG = 0, const TargetData *TD =0); -bool InlineFunction(CallSite CS, CallGraph *CG = 0, const TargetData *TD = 0); +/// If StaticAllocas is non-null, InlineFunction populates it with all of the +/// static allocas that it inlines into the caller. +/// +bool InlineFunction(CallInst *C, CallGraph *CG = 0, const TargetData *TD = 0, + SmallVectorImpl<AllocaInst*> *StaticAllocas = 0); +bool InlineFunction(InvokeInst *II, CallGraph *CG = 0, const TargetData *TD = 0, + SmallVectorImpl<AllocaInst*> *StaticAllocas = 0); +bool InlineFunction(CallSite CS, CallGraph *CG = 0, const TargetData *TD = 0, + SmallVectorImpl<AllocaInst*> *StaticAllocas = 0); } // End llvm namespace |