1 //===- DeadStoreElimination.h - Fast Dead Store Elimination -----*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file implements a trivial dead store elimination that only considers 11 // basic-block local redundant stores. 12 // 13 // FIXME: This should eventually be extended to be a post-dominator tree 14 // traversal. Doing so would be pretty trivial. 15 // 16 //===----------------------------------------------------------------------===// 17 18 #ifndef LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 19 #define LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 20 21 #include "llvm/IR/PassManager.h" 22 23 namespace llvm { 24 25 class Function; 26 27 /// This class implements a trivial dead store elimination. We consider 28 /// only the redundant stores that are local to a single Basic Block. 29 class DSEPass : public PassInfoMixin<DSEPass> { 30 public: 31 PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM); 32 }; 33 34 } // end namespace llvm 35 36 #endif // LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 37