1 //===- ADCE.h - Aggressive dead code elimination --------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_TRANSFORMS_SCALAR_ADCE_H
18 #define LLVM_TRANSFORMS_SCALAR_ADCE_H
20 #include "llvm/IR/Function.h"
21 #include "llvm/IR/PassManager.h"
25 /// A DCE pass that assumes instructions are dead until proven otherwise.
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.
33 static StringRef name() { return "ADCEPass"; }
34 PreservedAnalyses run(Function &F);
38 #endif // LLVM_TRANSFORMS_SCALAR_ADCE_H