Split AllOpts.h into lots of little .h files.
[oota-llvm.git] / include / llvm / Transforms / Scalar / DCE.h
1 //===-- DCE.h - Functions that perform Dead Code Elimination -----*- C++ -*--=//
2 //
3 // This family of functions is useful for performing dead code elimination of 
4 // various sorts.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_OPT_DCE_H
9 #define LLVM_OPT_DCE_H
10
11 #include "llvm/Method.h"
12 class Module;
13 class SymTabValue;
14 class BasicBlock;
15
16 namespace opt {
17
18 bool DoDeadCodeElimination(Method *M);         // DCE a method
19 bool DoRemoveUnusedConstants(SymTabValue *S);  // RUC a method or module
20 bool DoDeadCodeElimination(Module *C);         // DCE & RUC a whole module
21
22 // SimplifyCFG - This function is used to do simplification of a CFG.  For
23 // example, it adjusts branches to branches to eliminate the extra hop, it
24 // eliminates unreachable basic blocks, and does other "peephole" optimization
25 // of the CFG.  It returns true if a modification was made, and returns an 
26 // iterator that designates the first element remaining after the block that
27 // was deleted.
28 //
29 // WARNING:  The entry node of a method may not be simplified.
30 //
31 bool SimplifyCFG(Method::iterator &BBIt);
32
33 }  // End namespace opt
34
35 #endif