Lines Matching full:constant

33 class Constant;  variable
43 /// If this constant is a constant offset from a global, return the global and
44 /// the constant. Because of constantexprs, this function is recursive.
45 /// If the global is part of a dso_local_equivalent constant, return it through
47 bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV, APInt &Offset,
51 /// ConstantFoldInstruction - Try to constant fold the specified instruction.
52 /// If successful, the constant result is returned, if not, null is returned.
53 /// Note that this fails if not all of the operands are constant. Otherwise,
55 /// and stores, which have no constant expression form.
56 Constant *ConstantFoldInstruction(Instruction *I, const DataLayout &DL,
59 /// ConstantFoldConstant - Fold the constant using the specified DataLayout.
60 /// This function always returns a non-null constant: Either the folding result,
61 /// or the original constant if further folding is not possible.
62 Constant *ConstantFoldConstant(const Constant *C, const DataLayout &DL,
65 /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the
66 /// specified operands. If successful, the constant result is returned, if not,
68 /// fold instructions like loads and stores, which have no constant expression
71 /// In some cases, constant folding may return one value chosen from a set of
74 /// all uses of the original operation are replaced by the constant-folded
77 Constant *ConstantFoldInstOperands(Instruction *I, ArrayRef<Constant *> Ops,
82 /// Attempt to constant fold a compare instruction (icmp/fcmp) with the
83 /// specified operands. Returns null or a constant expression of the specified
86 Constant *ConstantFoldCompareInstOperands(
87 unsigned Predicate, Constant *LHS, Constant *RHS, const DataLayout &DL,
90 /// Attempt to constant fold a unary operation with the specified operand.
92 Constant *ConstantFoldUnaryOpOperand(unsigned Opcode, Constant *Op,
95 /// Attempt to constant fold a binary operation with the specified operands.
96 /// Returns null or a constant expression of the specified operands on failure.
97 Constant *ConstantFoldBinaryOpOperands(unsigned Opcode, Constant *LHS,
98 Constant *RHS, const DataLayout &DL);
100 /// Attempt to constant fold a floating point binary operation with the
102 /// Returns null or a constant expression of the specified operands on failure.
103 Constant *ConstantFoldFPInstOperands(unsigned Opcode, Constant *LHS,
104 Constant *RHS, const DataLayout &DL,
108 /// Attempt to flush float point constant according to denormal mode set in the
110 /// correct sign, otherwise return the original constant. Inputs and outputs to
116 Constant *FlushFPConstant(Constant *Operand, const Instruction *I,
119 /// Attempt to constant fold a select instruction with the specified
120 /// operands. The constant result is returned if successful; if not, null is
122 Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1,
123 Constant *V2);
125 /// Attempt to constant fold a cast with the specified operand. If it
126 /// fails, it returns a constant expression of the specified operand.
127 Constant *ConstantFoldCastOperand(unsigned Opcode, Constant *C, Type *DestTy,
130 /// Constant fold a zext, sext or trunc, depending on IsSigned and whether the
132 Constant *ConstantFoldIntegerCast(Constant *C, Type *DestTy, bool IsSigned,
135 /// ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue
136 /// instruction with the specified operands and indices. The constant result is
138 Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val,
141 /// Attempt to constant fold an extractvalue instruction with the
142 /// specified operands and indices. The constant result is returned if
144 Constant *ConstantFoldExtractValueInstruction(Constant *Agg,
147 /// Attempt to constant fold an insertelement instruction with the
148 /// specified operands and indices. The constant result is returned if
150 Constant *ConstantFoldInsertElementInstruction(Constant *Val,
151 Constant *Elt,
152 Constant *Idx);
154 /// Attempt to constant fold an extractelement instruction with the
155 /// specified operands and indices. The constant result is returned if
157 Constant *ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx);
159 /// Attempt to constant fold a shufflevector instruction with the
161 /// of the mask representation. The constant result is returned if successful;
163 Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2,
168 Constant *ConstantFoldLoadFromConst(Constant *C, Type *Ty, const APInt &Offset,
173 Constant *ConstantFoldLoadFromConst(Constant *C, Type *Ty,
177 /// is constant and determinable. If this is not determinable, return null.
178 Constant *ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty, APInt Offset,
181 /// Return the value that a load from C would produce if it is constant and
183 Constant *ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty,
190 Constant *ConstantFoldLoadFromUniformValue(Constant *C, Type *Ty,
197 /// ConstantFoldCall - Attempt to constant fold a call to the specified function
199 Constant *ConstantFoldCall(const CallBase *Call, Function *F,
200 ArrayRef<Constant *> Operands,
204 Constant *ConstantFoldBinaryIntrinsic(Intrinsic::ID ID, Constant *LHS,
205 Constant *RHS, Type *Ty,
208 /// ConstantFoldLoadThroughBitcast - try to cast constant to destination type
211 Constant *ConstantFoldLoadThroughBitcast(Constant *C, Type *DestTy,
218 Constant *ReadByteArrayFromGlobal(const GlobalVariable *GV, uint64_t Offset);