diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-29 23:56:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-29 23:56:00 +0000 |
commit | 4b52471bed9df4cd5323671cdf3c9cdc6befed97 (patch) | |
tree | 47a2b2eb670b98cc9ffda3b63057d9f6fa5c7197 /include/llvm/Optimizations | |
parent | 7b8ec2d752c07df070479ba235b8b1147d009f0f (diff) | |
download | llvm-4b52471bed9df4cd5323671cdf3c9cdc6befed97.tar.gz llvm-4b52471bed9df4cd5323671cdf3c9cdc6befed97.tar.bz2 llvm-4b52471bed9df4cd5323671cdf3c9cdc6befed97.tar.xz |
Added prototype for ConstantFoldTerminator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Optimizations')
-rw-r--r-- | include/llvm/Optimizations/AllOpts.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Optimizations/AllOpts.h b/include/llvm/Optimizations/AllOpts.h index c68ebc48c5..1035b20964 100644 --- a/include/llvm/Optimizations/AllOpts.h +++ b/include/llvm/Optimizations/AllOpts.h @@ -15,6 +15,7 @@ #include "llvm/Tools/STLExtras.h" class Method; class CallInst; +class TerminatorInst; //===----------------------------------------------------------------------===// // Helper functions @@ -24,6 +25,7 @@ static inline bool ApplyOptToAllMethods(Module *C, bool (*Opt)(Method*)) { return reduce_apply_bool(C->begin(), C->end(), ptr_fun(Opt)); } + //===----------------------------------------------------------------------===// // Dead Code Elimination Pass // @@ -32,6 +34,7 @@ bool DoDeadCodeElimination(Method *M); // DCE a method bool DoRemoveUnusedConstants(SymTabValue *S); // RUC a method or module bool DoDeadCodeElimination(Module *C); // DCE & RUC a whole module + //===----------------------------------------------------------------------===// // Constant Propogation Pass // @@ -42,6 +45,13 @@ static inline bool DoConstantPropogation(Module *C) { return ApplyOptToAllMethods(C, DoConstantPropogation); } +// ConstantFoldTerminator - If a terminator instruction is predicated on a +// constant value, convert it into an unconditional branch to the constant +// destination. +// +bool ConstantFoldTerminator(TerminatorInst *T); + + //===----------------------------------------------------------------------===// // Constant Pool Merging Pass // @@ -72,6 +82,7 @@ template <class Unit> bool DoSCCP(Unit *M) { return DoSparseConditionalConstantProp(M); } + //===----------------------------------------------------------------------===// // Method Inlining Pass // |