Go to the documentation of this file.
14 #ifndef LLVM_IR_IRBUILDERFOLDER_H
15 #define LLVM_IR_IRBUILDERFOLDER_H
43 bool HasNSW)
const = 0;
55 bool IsInBounds =
false)
const = 0;
68 Value *Idx)
const = 0;
78 Type *DestTy)
const = 0;
81 Type *DestTy)
const = 0;
102 #endif // LLVM_IR_IRBUILDERFOLDER_H
This is an optimization pass for GlobalISel generic memory operations.
virtual Value * CreateFCmp(CmpInst::Predicate P, Constant *LHS, Constant *RHS) const =0
virtual Value * FoldNoWrapBinOp(Instruction::BinaryOps Opc, Value *LHS, Value *RHS, bool HasNUW, bool HasNSW) const =0
virtual Value * CreateBitCast(Constant *C, Type *DestTy) const =0
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
IRBuilderFolder - Interface for constant folding in IRBuilder.
virtual Value * FoldBinOp(Instruction::BinaryOps Opc, Value *LHS, Value *RHS) const =0
The instances of the Type class are immutable: once they are created, they are never changed.
virtual Value * FoldInsertElement(Value *Vec, Value *NewElt, Value *Idx) const =0
virtual Value * FoldUnOpFMF(Instruction::UnaryOps Opc, Value *V, FastMathFlags FMF) const =0
Convenience struct for specifying and reasoning about fast-math flags.
virtual Value * CreateIntCast(Constant *C, Type *DestTy, bool isSigned) const =0
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
virtual Value * CreatePointerBitCastOrAddrSpaceCast(Constant *C, Type *DestTy) const =0
virtual Value * FoldSelect(Value *C, Value *True, Value *False) const =0
(vector float) vec_cmpeq(*A, *B) C
virtual Value * CreateCast(Instruction::CastOps Op, Constant *C, Type *DestTy) const =0
virtual Value * CreateZExtOrBitCast(Constant *C, Type *DestTy) const =0
virtual Value * CreateFPCast(Constant *C, Type *DestTy) const =0
This is an important base class in LLVM.
virtual Value * CreateTruncOrBitCast(Constant *C, Type *DestTy) const =0
virtual Value * FoldExtractValue(Value *Agg, ArrayRef< unsigned > IdxList) const =0
virtual Value * CreateIntToPtr(Constant *C, Type *DestTy) const =0
virtual Value * FoldShuffleVector(Value *V1, Value *V2, ArrayRef< int > Mask) const =0
virtual Value * FoldICmp(CmpInst::Predicate P, Value *LHS, Value *RHS) const =0
virtual Value * CreatePtrToInt(Constant *C, Type *DestTy) const =0
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
virtual Value * CreatePointerCast(Constant *C, Type *DestTy) const =0
virtual Value * CreateSExtOrBitCast(Constant *C, Type *DestTy) const =0
virtual Value * FoldBinOpFMF(Instruction::BinaryOps Opc, Value *LHS, Value *RHS, FastMathFlags FMF) const =0
virtual ~IRBuilderFolder()
virtual Value * FoldInsertValue(Value *Agg, Value *Val, ArrayRef< unsigned > IdxList) const =0
static bool isSigned(unsigned int Opcode)
virtual Value * FoldGEP(Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, bool IsInBounds=false) const =0
virtual Value * FoldExactBinOp(Instruction::BinaryOps Opc, Value *LHS, Value *RHS, bool IsExact) const =0
LLVM Value Representation.
virtual Value * FoldExtractElement(Value *Vec, Value *Idx) const =0