Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- InstSimplifyPass.h ---------------------------------------*- 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 /// \file
0009 ///
0010 /// Defines passes for running instruction simplification across chunks of IR.
0011 ///
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_TRANSFORMS_SCALAR_INSTSIMPLIFYPASS_H
0015 #define LLVM_TRANSFORMS_SCALAR_INSTSIMPLIFYPASS_H
0016 
0017 #include "llvm/IR/PassManager.h"
0018 
0019 namespace llvm {
0020 
0021 /// Run instruction simplification across each instruction in the function.
0022 ///
0023 /// Instruction simplification has useful constraints in some contexts:
0024 /// - It will never introduce *new* instructions.
0025 /// - There is no need to iterate to a fixed point.
0026 ///
0027 /// Many passes use instruction simplification as a library facility, but it may
0028 /// also be useful (in tests and other contexts) to have access to this very
0029 /// restricted transform at a pass granularity. However, for a much more
0030 /// powerful and comprehensive peephole optimization engine, see the
0031 /// `instcombine` pass instead.
0032 class InstSimplifyPass : public PassInfoMixin<InstSimplifyPass> {
0033 public:
0034   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
0035 };
0036 
0037 } // end namespace llvm
0038 
0039 #endif // LLVM_TRANSFORMS_SCALAR_INSTSIMPLIFYPASS_H