aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Scalar/DCE.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-01 07:00:21 +0000
committerChris Lattner <sabre@nondot.org>2001-11-01 07:00:21 +0000
commitfd0375bf86c838aa20095f2e5d14dca03422d00b (patch)
treec6a5bcc35f79be1f9b13f8be885f1359e2dfbf59 /include/llvm/Transforms/Scalar/DCE.h
parent35d64564c81809ebddedb762e07eb455b9d2a5d1 (diff)
downloadexternal_llvm-fd0375bf86c838aa20095f2e5d14dca03422d00b.zip
external_llvm-fd0375bf86c838aa20095f2e5d14dca03422d00b.tar.gz
external_llvm-fd0375bf86c838aa20095f2e5d14dca03422d00b.tar.bz2
Expose the low level DCE mechanism to external users
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Scalar/DCE.h')
-rw-r--r--include/llvm/Transforms/Scalar/DCE.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar/DCE.h b/include/llvm/Transforms/Scalar/DCE.h
index e7a07ec..09ab61c 100644
--- a/include/llvm/Transforms/Scalar/DCE.h
+++ b/include/llvm/Transforms/Scalar/DCE.h
@@ -9,6 +9,7 @@
#define LLVM_OPT_DCE_H
#include "llvm/Pass.h"
+#include "llvm/BasicBlock.h"
namespace opt {
@@ -17,6 +18,14 @@ struct DeadCodeElimination : public Pass {
//
static bool doDCE(Method *M);
+ // dceInstruction - Inspect the instruction at *BBI and figure out if it's
+ // [trivially] dead. If so, remove the instruction and update the iterator
+ // to point to the instruction that immediately succeeded the original
+ // instruction.
+ //
+ static bool dceInstruction(BasicBlock::InstListType &BBIL,
+ BasicBlock::iterator &BBI);
+
// Remove unused global values - This removes unused global values of no
// possible value. This currently includes unused method prototypes and
// unitialized global variables.