Added prototype for ConstantFoldTerminator

llvm-svn: 105
This commit is contained in:
Chris Lattner 2001-06-29 23:56:00 +00:00
parent 2dd58aefa5
commit 96bb2fb5a2
1 changed files with 11 additions and 0 deletions

View File

@ -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
//