1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Added prototype for ConstantFoldTerminator

llvm-svn: 105
This commit is contained in:
Chris Lattner 2001-06-29 23:56:00 +00:00
parent 806b7ff4be
commit 44cd71222f

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