aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-26 18:50:11 +0000
committerChris Lattner <sabre@nondot.org>2001-11-26 18:50:11 +0000
commita3c2dee477d009d0eb2916b2fdf78686f6877924 (patch)
tree678b602693d0e7a1c2328bd82492ef2d3866babe /include/llvm/Transforms
parent3ee997ba4243efabe6a810aa4a02e2755256725d (diff)
downloadexternal_llvm-a3c2dee477d009d0eb2916b2fdf78686f6877924.zip
external_llvm-a3c2dee477d009d0eb2916b2fdf78686f6877924.tar.gz
external_llvm-a3c2dee477d009d0eb2916b2fdf78686f6877924.tar.bz2
Expose constant prop of an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Scalar/ConstantProp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar/ConstantProp.h b/include/llvm/Transforms/Scalar/ConstantProp.h
index f094ec5..e77a9c0 100644
--- a/include/llvm/Transforms/Scalar/ConstantProp.h
+++ b/include/llvm/Transforms/Scalar/ConstantProp.h
@@ -17,6 +17,11 @@ struct ConstantPropogation : public Pass {
// folding
static bool doConstantPropogation(Method *M);
+ // doConstantPropogation - Constant prop a specific instruction. Returns true
+ // and potentially moves the iterator if constant propogation was performed.
+ //
+ static bool doConstantPropogation(BasicBlock *BB, BasicBlock::iterator &I);
+
inline bool doPerMethodWork(Method *M) {
return doConstantPropogation(M);
}