]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/Transforms/Scalar/ADCE.h
Merge llvm, clang, lld and lldb release_40 branch r292009. Also update
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / Transforms / Scalar / ADCE.h
1 //===- ADCE.h - Aggressive dead code elimination --------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file provides the interface for the Aggressive Dead Code Elimination
11 // pass. This pass optimistically assumes that all instructions are dead until
12 // proven otherwise, allowing it to eliminate dead computations that other DCE
13 // passes do not catch, particularly involving loop computations.
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef LLVM_TRANSFORMS_SCALAR_ADCE_H
18 #define LLVM_TRANSFORMS_SCALAR_ADCE_H
19
20 #include "llvm/IR/Function.h"
21 #include "llvm/IR/PassManager.h"
22
23 namespace llvm {
24
25 /// A DCE pass that assumes instructions are dead until proven otherwise.
26 ///
27 /// This pass eliminates dead code by optimistically assuming that all
28 /// instructions are dead until proven otherwise. This allows it to eliminate
29 /// dead computations that other DCE passes do not catch, particularly involving
30 /// loop computations.
31 struct ADCEPass : PassInfoMixin<ADCEPass> {
32   PreservedAnalyses run(Function &F, FunctionAnalysisManager &);
33 };
34 }
35
36 #endif // LLVM_TRANSFORMS_SCALAR_ADCE_H