1 //===- DeadStoreElimination.h - Fast Dead Store Elimination -----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements a trivial dead store elimination that only considers
10 // basic-block local redundant stores.
12 // FIXME: This should eventually be extended to be a post-dominator tree
13 // traversal. Doing so would be pretty trivial.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H
18 #define LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H
20 #include "llvm/IR/PassManager.h"
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
> {
30 PreservedAnalyses
run(Function
&F
, FunctionAnalysisManager
&FAM
);
33 } // end namespace llvm
35 #endif // LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H