//===- InstSimplifyFolder.h - InstSimplify folding helper --------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the InstSimplifyFolder class, a helper for IRBuilder. // It provides IRBuilder with a set of methods for folding operations to // existing values using InstructionSimplify. At the moment, only a subset of // the implementation uses InstructionSimplify. The rest of the implementation // only folds constants. // // The folder also applies target-specific constant folding. // //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_INSTSIMPLIFYFOLDER_H #define LLVM_ANALYSIS_INSTSIMPLIFYFOLDER_H #include "llvm/ADT/ArrayRef.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/TargetFolder.h" #include "llvm/IR/IRBuilderFolder.h" #include "llvm/IR/Instruction.h" namespace llvm { class Constant; /// InstSimplifyFolder - Use InstructionSimplify to fold operations to existing /// values. Also applies target-specific constant folding when not using /// InstructionSimplify. class InstSimplifyFolder final : public IRBuilderFolder { … }; } // end namespace llvm #endif // LLVM_ANALYSIS_INSTSIMPLIFYFOLDER_H