1 //===- SimplifyInstructions.h - Remove redundant instructions ---*- C++ -*-===//
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 is a utility pass used for testing the InstructionSimplify analysis.
11 // The analysis is applied to every instruction, and if it simplifies then the
12 // instruction is replaced by the simplification. If you are looking for a pass
13 // that performs serious instruction folding, use the instcombine pass instead.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYINSTRUCTIONS_H
18 #define LLVM_TRANSFORMS_UTILS_SIMPLIFYINSTRUCTIONS_H
20 #include "llvm/IR/PassManager.h"
24 /// This pass removes redundant instructions.
25 class InstSimplifierPass : public PassInfoMixin<InstSimplifierPass> {
27 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
29 } // end namespace llvm
31 #endif // LLVM_TRANSFORMS_UTILS_SIMPLIFYINSTRUCTIONS_H