summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-30 23:22:39 +0000
committerChris Lattner <sabre@nondot.org>2007-01-30 23:22:39 +0000
commit1dfdf8255e803d6376f5fe94a113f892e796ae6c (patch)
tree50588bd83100c2b9c259ce6b665d15cc4680b343 /include
parent3cab071f6f1534ff424d4b947715ae758edca790 (diff)
downloadllvm-1dfdf8255e803d6376f5fe94a113f892e796ae6c.tar.gz
llvm-1dfdf8255e803d6376f5fe94a113f892e796ae6c.tar.bz2
llvm-1dfdf8255e803d6376f5fe94a113f892e796ae6c.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Transforms/Utils/Cloning.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h
index 38fc5ba740..f925c63468 100644
--- a/include/llvm/Transforms/Utils/Cloning.h
+++ b/include/llvm/Transforms/Utils/Cloning.h
@@ -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