Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- ADCE.h - Aggressive dead code 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 provides the interface for the Aggressive Dead Code Elimination
0010 // pass. This pass optimistically assumes that all instructions are dead until
0011 // proven otherwise, allowing it to eliminate dead computations that other DCE
0012 // passes do not catch, particularly involving loop computations.
0013 //
0014 //===----------------------------------------------------------------------===//
0015 
0016 #ifndef LLVM_TRANSFORMS_SCALAR_ADCE_H
0017 #define LLVM_TRANSFORMS_SCALAR_ADCE_H
0018 
0019 #include "llvm/IR/PassManager.h"
0020 
0021 namespace llvm {
0022 
0023 class Function;
0024 
0025 /// A DCE pass that assumes instructions are dead until proven otherwise.
0026 ///
0027 /// This pass eliminates dead code by optimistically assuming that all
0028 /// instructions are dead until proven otherwise. This allows it to eliminate
0029 /// dead computations that other DCE passes do not catch, particularly involving
0030 /// loop computations.
0031 struct ADCEPass : PassInfoMixin<ADCEPass> {
0032   PreservedAnalyses run(Function &F, FunctionAnalysisManager &);
0033 };
0034 
0035 } // end namespace llvm
0036 
0037 #endif // LLVM_TRANSFORMS_SCALAR_ADCE_H