1 //===- DeadStoreElimination.h - Fast Dead Store Elimination -------------===//
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_DSE_H
19 #define LLVM_TRANSFORMS_SCALAR_DSE_H
20 
21 #include "llvm/IR/Function.h"
22 #include "llvm/IR/PassManager.h"
23 
24 namespace llvm {
25 
26 /// This class implements a trivial dead store elimination. We consider
27 /// only the redundant stores that are local to a single Basic Block.
28 class DSEPass : public PassInfoMixin<DSEPass> {
29 public:
30   PreservedAnalyses run(Function &F, AnalysisManager<Function> &FAM);
31 };
32 }
33 
34 #endif // LLVM_TRANSFORMS_SCALAR_DSE_H
35