Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:41

0001 //===- DeadStoreElimination.h - Fast Dead Store Elimination -----*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file implements a trivial dead store elimination that only considers
0010 // basic-block local redundant stores.
0011 //
0012 // FIXME: This should eventually be extended to be a post-dominator tree
0013 // traversal.  Doing so would be pretty trivial.
0014 //
0015 //===----------------------------------------------------------------------===//
0016 
0017 #ifndef LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H
0018 #define LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H
0019 
0020 #include "llvm/IR/PassManager.h"
0021 
0022 namespace llvm {
0023 
0024 class Function;
0025 
0026 /// This class implements a trivial dead store elimination. We consider
0027 /// only the redundant stores that are local to a single Basic Block.
0028 class DSEPass : public PassInfoMixin<DSEPass> {
0029 public:
0030   PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
0031 };
0032 
0033 } // end namespace llvm
0034 
0035 #endif // LLVM_TRANSFORMS_SCALAR_DEADSTOREELIMINATION_H