1 //===- DeadStoreElimination.h - Fast Dead Store Elimination -----*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file implements a trivial dead store elimination that only considers 10 // basic-block local redundant stores. 11 // 12 // FIXME: This should eventually be extended to be a post-dominator tree 13 // traversal. Doing so would be pretty trivial. 14 // 15 //===----------------------------------------------------------------------===// 16 17 #ifndef LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 18 #define LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 19 20 #include "llvm/IR/PassManager.h" 21 22 namespace llvm { 23 24 class Function; 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, FunctionAnalysisManager &FAM); 31 }; 32 33 } // end namespace llvm 34 35 #endif // LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 36