LLVM  8.0.1
ADCE.h
Go to the documentation of this file.
1 //===- ADCE.h - Aggressive dead code elimination ----------------*- C++ -*-===//
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/PassManager.h"
21 
22 namespace llvm {
23 
24 class Function;
25 
26 /// A DCE pass that assumes instructions are dead until proven otherwise.
27 ///
28 /// This pass eliminates dead code by optimistically assuming that all
29 /// instructions are dead until proven otherwise. This allows it to eliminate
30 /// dead computations that other DCE passes do not catch, particularly involving
31 /// loop computations.
32 struct ADCEPass : PassInfoMixin<ADCEPass> {
34 };
35 
36 } // end namespace llvm
37 
38 #endif // LLVM_TRANSFORMS_SCALAR_ADCE_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
F(f)
A DCE pass that assumes instructions are dead until proven otherwise.
Definition: ADCE.h:32
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:366
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:154
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)
Definition: ADCE.cpp:674
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.