#include "llvm/Tools/STLExtras.h"
class Method;
class CallInst;
+class TerminatorInst;
//===----------------------------------------------------------------------===//
// Helper functions
return reduce_apply_bool(C->begin(), C->end(), ptr_fun(Opt));
}
+
//===----------------------------------------------------------------------===//
// Dead Code Elimination Pass
//
bool DoRemoveUnusedConstants(SymTabValue *S); // RUC a method or module
bool DoDeadCodeElimination(Module *C); // DCE & RUC a whole module
+
//===----------------------------------------------------------------------===//
// Constant Propogation Pass
//
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
//
return DoSparseConditionalConstantProp(M);
}
+
//===----------------------------------------------------------------------===//
// Method Inlining Pass
//