Expose the low level DCE mechanism to external users
authorChris Lattner <sabre@nondot.org>
Thu, 1 Nov 2001 07:00:21 +0000 (07:00 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 1 Nov 2001 07:00:21 +0000 (07:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1082 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Scalar/DCE.h

index e7a07ec89681f0b579b918a27b0ff9bbdff27f50..09ab61c322841fdfea58dea7b0f91596f6de0412 100644 (file)
@@ -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.