[yaml2obj/obj2yaml] - Add support for .stack_sizes sections.
[llvm-complete.git] / include / llvm / Transforms / Scalar / DeadStoreElimination.h
blobb66b0de90c790bef33834d941387829b9ab0c39c
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.
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"
22 namespace llvm {
24 class Function;
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);
33 } // end namespace llvm
35 #endif // LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H