diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-30 04:34:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-30 04:34:07 +0000 |
commit | 50d0b7ec3f58d13ea5613dde60a15b07532de56e (patch) | |
tree | c5dea80de4b30c86b776e25f11da2e07e433c6dc /include/llvm/Transforms/Scalar/DCE.h | |
parent | 2b05880476693393ebebba777c70ca3cbb043fc3 (diff) | |
download | external_llvm-50d0b7ec3f58d13ea5613dde60a15b07532de56e.zip external_llvm-50d0b7ec3f58d13ea5613dde60a15b07532de56e.tar.gz external_llvm-50d0b7ec3f58d13ea5613dde60a15b07532de56e.tar.bz2 |
Split AllOpts.h into lots of little .h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Scalar/DCE.h')
-rw-r--r-- | include/llvm/Transforms/Scalar/DCE.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar/DCE.h b/include/llvm/Transforms/Scalar/DCE.h new file mode 100644 index 0000000..362e146 --- /dev/null +++ b/include/llvm/Transforms/Scalar/DCE.h @@ -0,0 +1,35 @@ +//===-- DCE.h - Functions that perform Dead Code Elimination -----*- C++ -*--=// +// +// This family of functions is useful for performing dead code elimination of +// various sorts. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_OPT_DCE_H +#define LLVM_OPT_DCE_H + +#include "llvm/Method.h" +class Module; +class SymTabValue; +class BasicBlock; + +namespace opt { + +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 + +// SimplifyCFG - This function is used to do simplification of a CFG. For +// example, it adjusts branches to branches to eliminate the extra hop, it +// eliminates unreachable basic blocks, and does other "peephole" optimization +// of the CFG. It returns true if a modification was made, and returns an +// iterator that designates the first element remaining after the block that +// was deleted. +// +// WARNING: The entry node of a method may not be simplified. +// +bool SimplifyCFG(Method::iterator &BBIt); + +} // End namespace opt + +#endif |