The inliner/cloner can now optionally take TargetData info, which can be

used by constant folding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-01-30 23:22:39 +00:00
parent 3cab071f6f
commit 1dfdf8255e
3 changed files with 20 additions and 15 deletions

View File

@ -33,6 +33,7 @@ class ReturnInst;
class CallSite;
class Trace;
class CallGraph;
class TargetData;
/// CloneModule - Return an exact copy of the specified module
///
@ -141,7 +142,8 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
std::map<const Value*, Value*> &ValueMap,
std::vector<ReturnInst*> &Returns,
const char *NameSuffix = "",
ClonedCodeInfo *CodeInfo = 0);
ClonedCodeInfo *CodeInfo = 0,
const TargetData *TD = 0);
/// CloneTraceInto - Clone T into NewFunc. Original<->clone mapping is
@ -170,9 +172,9 @@ std::vector<BasicBlock *> CloneTrace(const std::vector<BasicBlock*> &origTrace);
/// 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);
bool InlineFunction(InvokeInst *II, CallGraph *CG = 0);
bool InlineFunction(CallSite CS, CallGraph *CG = 0);
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);
} // End llvm namespace