File indexing completed on 2026-05-10 08:44:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef LLVM_IR_NOFOLDER_H
0022 #define LLVM_IR_NOFOLDER_H
0023
0024 #include "llvm/ADT/ArrayRef.h"
0025 #include "llvm/IR/Constants.h"
0026 #include "llvm/IR/FMF.h"
0027 #include "llvm/IR/IRBuilderFolder.h"
0028 #include "llvm/IR/InstrTypes.h"
0029 #include "llvm/IR/Instruction.h"
0030 #include "llvm/IR/Instructions.h"
0031
0032 namespace llvm {
0033
0034
0035 class NoFolder final : public IRBuilderFolder {
0036 virtual void anchor();
0037
0038 public:
0039 explicit NoFolder() = default;
0040
0041
0042
0043
0044
0045
0046
0047
0048 Value *FoldBinOp(Instruction::BinaryOps Opc, Value *LHS,
0049 Value *RHS) const override {
0050 return nullptr;
0051 }
0052
0053 Value *FoldExactBinOp(Instruction::BinaryOps Opc, Value *LHS, Value *RHS,
0054 bool IsExact) const override {
0055 return nullptr;
0056 }
0057
0058 Value *FoldNoWrapBinOp(Instruction::BinaryOps Opc, Value *LHS, Value *RHS,
0059 bool HasNUW, bool HasNSW) const override {
0060 return nullptr;
0061 }
0062
0063 Value *FoldBinOpFMF(Instruction::BinaryOps Opc, Value *LHS, Value *RHS,
0064 FastMathFlags FMF) const override {
0065 return nullptr;
0066 }
0067
0068 Value *FoldUnOpFMF(Instruction::UnaryOps Opc, Value *V,
0069 FastMathFlags FMF) const override {
0070 return nullptr;
0071 }
0072
0073 Value *FoldCmp(CmpInst::Predicate P, Value *LHS, Value *RHS) const override {
0074 return nullptr;
0075 }
0076
0077 Value *FoldGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
0078 GEPNoWrapFlags NW) const override {
0079 return nullptr;
0080 }
0081
0082 Value *FoldSelect(Value *C, Value *True, Value *False) const override {
0083 return nullptr;
0084 }
0085
0086 Value *FoldExtractValue(Value *Agg,
0087 ArrayRef<unsigned> IdxList) const override {
0088 return nullptr;
0089 }
0090
0091 Value *FoldInsertValue(Value *Agg, Value *Val,
0092 ArrayRef<unsigned> IdxList) const override {
0093 return nullptr;
0094 }
0095
0096 Value *FoldExtractElement(Value *Vec, Value *Idx) const override {
0097 return nullptr;
0098 }
0099
0100 Value *FoldInsertElement(Value *Vec, Value *NewElt,
0101 Value *Idx) const override {
0102 return nullptr;
0103 }
0104
0105 Value *FoldShuffleVector(Value *V1, Value *V2,
0106 ArrayRef<int> Mask) const override {
0107 return nullptr;
0108 }
0109
0110 Value *FoldCast(Instruction::CastOps Op, Value *V,
0111 Type *DestTy) const override {
0112 return nullptr;
0113 }
0114
0115 Value *FoldBinaryIntrinsic(Intrinsic::ID ID, Value *LHS, Value *RHS, Type *Ty,
0116 Instruction *FMFSource) const override {
0117 return nullptr;
0118 }
0119
0120
0121
0122
0123
0124 Instruction *CreatePointerCast(Constant *C, Type *DestTy) const override {
0125 return CastInst::CreatePointerCast(C, DestTy);
0126 }
0127
0128 Instruction *CreatePointerBitCastOrAddrSpaceCast(
0129 Constant *C, Type *DestTy) const override {
0130 return CastInst::CreatePointerBitCastOrAddrSpaceCast(C, DestTy);
0131 }
0132 };
0133
0134 }
0135
0136 #endif