1327952Sdim//===- DeadStoreElimination.h - Fast Dead Store Elimination -----*- C++ -*-===// 2303231Sdim// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6303231Sdim// 7303231Sdim//===----------------------------------------------------------------------===// 8303231Sdim// 9303231Sdim// This file implements a trivial dead store elimination that only considers 10303231Sdim// basic-block local redundant stores. 11303231Sdim// 12303231Sdim// FIXME: This should eventually be extended to be a post-dominator tree 13303231Sdim// traversal. Doing so would be pretty trivial. 14303231Sdim// 15303231Sdim//===----------------------------------------------------------------------===// 16303231Sdim 17327952Sdim#ifndef LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 18327952Sdim#define LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 19303231Sdim 20303231Sdim#include "llvm/IR/PassManager.h" 21303231Sdim 22303231Sdimnamespace llvm { 23303231Sdim 24327952Sdimclass Function; 25327952Sdim 26303231Sdim/// This class implements a trivial dead store elimination. We consider 27303231Sdim/// only the redundant stores that are local to a single Basic Block. 28303231Sdimclass DSEPass : public PassInfoMixin<DSEPass> { 29303231Sdimpublic: 30314564Sdim PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM); 31303231Sdim}; 32303231Sdim 33327952Sdim} // end namespace llvm 34327952Sdim 35327952Sdim#endif // LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H 36