@@ -144,162 +144,162 @@ struct SimplifyQuery {
144
144
// Please use the SimplifyQuery versions in new code.
145
145
146
146
// / Given operand for an FNeg, fold the result or return null.
147
- Value *SimplifyFNegInst (Value *Op, FastMathFlags FMF, const SimplifyQuery &Q);
147
+ Value *simplifyFNegInst (Value *Op, FastMathFlags FMF, const SimplifyQuery &Q);
148
148
149
149
// / Given operands for an Add, fold the result or return null.
150
- Value *SimplifyAddInst (Value *LHS, Value *RHS, bool isNSW, bool isNUW,
150
+ Value *simplifyAddInst (Value *LHS, Value *RHS, bool isNSW, bool isNUW,
151
151
const SimplifyQuery &Q);
152
152
153
153
// / Given operands for a Sub, fold the result or return null.
154
- Value *SimplifySubInst (Value *LHS, Value *RHS, bool isNSW, bool isNUW,
154
+ Value *simplifySubInst (Value *LHS, Value *RHS, bool isNSW, bool isNUW,
155
155
const SimplifyQuery &Q);
156
156
157
157
// / Given operands for an FAdd, fold the result or return null.
158
158
Value *
159
- SimplifyFAddInst (Value *LHS, Value *RHS, FastMathFlags FMF,
159
+ simplifyFAddInst (Value *LHS, Value *RHS, FastMathFlags FMF,
160
160
const SimplifyQuery &Q,
161
161
fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
162
162
RoundingMode Rounding = RoundingMode::NearestTiesToEven);
163
163
164
164
// / Given operands for an FSub, fold the result or return null.
165
165
Value *
166
- SimplifyFSubInst (Value *LHS, Value *RHS, FastMathFlags FMF,
166
+ simplifyFSubInst (Value *LHS, Value *RHS, FastMathFlags FMF,
167
167
const SimplifyQuery &Q,
168
168
fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
169
169
RoundingMode Rounding = RoundingMode::NearestTiesToEven);
170
170
171
171
// / Given operands for an FMul, fold the result or return null.
172
172
Value *
173
- SimplifyFMulInst (Value *LHS, Value *RHS, FastMathFlags FMF,
173
+ simplifyFMulInst (Value *LHS, Value *RHS, FastMathFlags FMF,
174
174
const SimplifyQuery &Q,
175
175
fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
176
176
RoundingMode Rounding = RoundingMode::NearestTiesToEven);
177
177
178
178
// / Given operands for the multiplication of a FMA, fold the result or return
179
- // / null. In contrast to SimplifyFMulInst , this function will not perform
179
+ // / null. In contrast to simplifyFMulInst , this function will not perform
180
180
// / simplifications whose unrounded results differ when rounded to the argument
181
181
// / type.
182
- Value *SimplifyFMAFMul (Value *LHS, Value *RHS, FastMathFlags FMF,
182
+ Value *simplifyFMAFMul (Value *LHS, Value *RHS, FastMathFlags FMF,
183
183
const SimplifyQuery &Q,
184
184
fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
185
185
RoundingMode Rounding = RoundingMode::NearestTiesToEven);
186
186
187
187
// / Given operands for a Mul, fold the result or return null.
188
- Value *SimplifyMulInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
188
+ Value *simplifyMulInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
189
189
190
190
// / Given operands for an SDiv, fold the result or return null.
191
- Value *SimplifySDivInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
191
+ Value *simplifySDivInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
192
192
193
193
// / Given operands for a UDiv, fold the result or return null.
194
- Value *SimplifyUDivInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
194
+ Value *simplifyUDivInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
195
195
196
196
// / Given operands for an FDiv, fold the result or return null.
197
197
Value *
198
- SimplifyFDivInst (Value *LHS, Value *RHS, FastMathFlags FMF,
198
+ simplifyFDivInst (Value *LHS, Value *RHS, FastMathFlags FMF,
199
199
const SimplifyQuery &Q,
200
200
fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
201
201
RoundingMode Rounding = RoundingMode::NearestTiesToEven);
202
202
203
203
// / Given operands for an SRem, fold the result or return null.
204
- Value *SimplifySRemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
204
+ Value *simplifySRemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
205
205
206
206
// / Given operands for a URem, fold the result or return null.
207
- Value *SimplifyURemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
207
+ Value *simplifyURemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
208
208
209
209
// / Given operands for an FRem, fold the result or return null.
210
210
Value *
211
- SimplifyFRemInst (Value *LHS, Value *RHS, FastMathFlags FMF,
211
+ simplifyFRemInst (Value *LHS, Value *RHS, FastMathFlags FMF,
212
212
const SimplifyQuery &Q,
213
213
fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
214
214
RoundingMode Rounding = RoundingMode::NearestTiesToEven);
215
215
216
216
// / Given operands for a Shl, fold the result or return null.
217
- Value *SimplifyShlInst (Value *Op0, Value *Op1, bool isNSW, bool isNUW,
217
+ Value *simplifyShlInst (Value *Op0, Value *Op1, bool isNSW, bool isNUW,
218
218
const SimplifyQuery &Q);
219
219
220
220
// / Given operands for a LShr, fold the result or return null.
221
- Value *SimplifyLShrInst (Value *Op0, Value *Op1, bool isExact,
221
+ Value *simplifyLShrInst (Value *Op0, Value *Op1, bool isExact,
222
222
const SimplifyQuery &Q);
223
223
224
224
// / Given operands for a AShr, fold the result or return nulll.
225
- Value *SimplifyAShrInst (Value *Op0, Value *Op1, bool isExact,
225
+ Value *simplifyAShrInst (Value *Op0, Value *Op1, bool isExact,
226
226
const SimplifyQuery &Q);
227
227
228
228
// / Given operands for an And, fold the result or return null.
229
- Value *SimplifyAndInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
229
+ Value *simplifyAndInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
230
230
231
231
// / Given operands for an Or, fold the result or return null.
232
- Value *SimplifyOrInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
232
+ Value *simplifyOrInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
233
233
234
234
// / Given operands for an Xor, fold the result or return null.
235
- Value *SimplifyXorInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
235
+ Value *simplifyXorInst (Value *LHS, Value *RHS, const SimplifyQuery &Q);
236
236
237
237
// / Given operands for an ICmpInst, fold the result or return null.
238
- Value *SimplifyICmpInst (unsigned Predicate, Value *LHS, Value *RHS,
238
+ Value *simplifyICmpInst (unsigned Predicate, Value *LHS, Value *RHS,
239
239
const SimplifyQuery &Q);
240
240
241
241
// / Given operands for an FCmpInst, fold the result or return null.
242
- Value *SimplifyFCmpInst (unsigned Predicate, Value *LHS, Value *RHS,
242
+ Value *simplifyFCmpInst (unsigned Predicate, Value *LHS, Value *RHS,
243
243
FastMathFlags FMF, const SimplifyQuery &Q);
244
244
245
245
// / Given operands for a SelectInst, fold the result or return null.
246
- Value *SimplifySelectInst (Value *Cond, Value *TrueVal, Value *FalseVal,
246
+ Value *simplifySelectInst (Value *Cond, Value *TrueVal, Value *FalseVal,
247
247
const SimplifyQuery &Q);
248
248
249
249
// / Given operands for a GetElementPtrInst, fold the result or return null.
250
- Value *SimplifyGEPInst (Type *SrcTy, Value *Ptr, ArrayRef<Value *> Indices,
250
+ Value *simplifyGEPInst (Type *SrcTy, Value *Ptr, ArrayRef<Value *> Indices,
251
251
bool InBounds, const SimplifyQuery &Q);
252
252
253
253
// / Given operands for an InsertValueInst, fold the result or return null.
254
- Value *SimplifyInsertValueInst (Value *Agg, Value *Val, ArrayRef<unsigned > Idxs,
254
+ Value *simplifyInsertValueInst (Value *Agg, Value *Val, ArrayRef<unsigned > Idxs,
255
255
const SimplifyQuery &Q);
256
256
257
257
// / Given operands for an InsertElement, fold the result or return null.
258
- Value *SimplifyInsertElementInst (Value *Vec, Value *Elt, Value *Idx,
258
+ Value *simplifyInsertElementInst (Value *Vec, Value *Elt, Value *Idx,
259
259
const SimplifyQuery &Q);
260
260
261
261
// / Given operands for an ExtractValueInst, fold the result or return null.
262
- Value *SimplifyExtractValueInst (Value *Agg, ArrayRef<unsigned > Idxs,
262
+ Value *simplifyExtractValueInst (Value *Agg, ArrayRef<unsigned > Idxs,
263
263
const SimplifyQuery &Q);
264
264
265
265
// / Given operands for an ExtractElementInst, fold the result or return null.
266
- Value *SimplifyExtractElementInst (Value *Vec, Value *Idx,
266
+ Value *simplifyExtractElementInst (Value *Vec, Value *Idx,
267
267
const SimplifyQuery &Q);
268
268
269
269
// / Given operands for a CastInst, fold the result or return null.
270
- Value *SimplifyCastInst (unsigned CastOpc, Value *Op, Type *Ty,
270
+ Value *simplifyCastInst (unsigned CastOpc, Value *Op, Type *Ty,
271
271
const SimplifyQuery &Q);
272
272
273
273
// / Given operands for a ShuffleVectorInst, fold the result or return null.
274
274
// / See class ShuffleVectorInst for a description of the mask representation.
275
- Value *SimplifyShuffleVectorInst (Value *Op0, Value *Op1, ArrayRef<int > Mask,
275
+ Value *simplifyShuffleVectorInst (Value *Op0, Value *Op1, ArrayRef<int > Mask,
276
276
Type *RetTy, const SimplifyQuery &Q);
277
277
278
278
// === Helper functions for higher up the class hierarchy.
279
279
280
280
// / Given operands for a CmpInst, fold the result or return null.
281
- Value *SimplifyCmpInst (unsigned Predicate, Value *LHS, Value *RHS,
281
+ Value *simplifyCmpInst (unsigned Predicate, Value *LHS, Value *RHS,
282
282
const SimplifyQuery &Q);
283
283
284
284
// / Given operand for a UnaryOperator, fold the result or return null.
285
- Value *SimplifyUnOp (unsigned Opcode, Value *Op, const SimplifyQuery &Q);
285
+ Value *simplifyUnOp (unsigned Opcode, Value *Op, const SimplifyQuery &Q);
286
286
287
287
// / Given operand for a UnaryOperator, fold the result or return null.
288
288
// / Try to use FastMathFlags when folding the result.
289
- Value *SimplifyUnOp (unsigned Opcode, Value *Op, FastMathFlags FMF,
289
+ Value *simplifyUnOp (unsigned Opcode, Value *Op, FastMathFlags FMF,
290
290
const SimplifyQuery &Q);
291
291
292
292
// / Given operands for a BinaryOperator, fold the result or return null.
293
- Value *SimplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS,
293
+ Value *simplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS,
294
294
const SimplifyQuery &Q);
295
295
296
296
// / Given operands for a BinaryOperator, fold the result or return null.
297
297
// / Try to use FastMathFlags when folding the result.
298
- Value *SimplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS, FastMathFlags FMF,
298
+ Value *simplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS, FastMathFlags FMF,
299
299
const SimplifyQuery &Q);
300
300
301
301
// / Given a callsite, fold the result or return null.
302
- Value *SimplifyCall (CallBase *Call, const SimplifyQuery &Q);
302
+ Value *simplifyCall (CallBase *Call, const SimplifyQuery &Q);
303
303
304
304
// / Given a constrained FP intrinsic call, tries to compute its simplified
305
305
// / version. Returns a simplified result or null.
@@ -308,21 +308,21 @@ Value *SimplifyCall(CallBase *Call, const SimplifyQuery &Q);
308
308
// / simplification succeeds that the intrinsic is side effect free. As a result,
309
309
// / successful simplification can be used to delete the intrinsic not just
310
310
// / replace its result.
311
- Value *SimplifyConstrainedFPCall (CallBase *Call, const SimplifyQuery &Q);
311
+ Value *simplifyConstrainedFPCall (CallBase *Call, const SimplifyQuery &Q);
312
312
313
313
// / Given an operand for a Freeze, see if we can fold the result.
314
314
// / If not, this returns null.
315
- Value *SimplifyFreezeInst (Value *Op, const SimplifyQuery &Q);
315
+ Value *simplifyFreezeInst (Value *Op, const SimplifyQuery &Q);
316
316
317
317
// / See if we can compute a simplified version of this instruction. If not,
318
318
// / return null.
319
- Value *SimplifyInstruction (Instruction *I, const SimplifyQuery &Q,
319
+ Value *simplifyInstruction (Instruction *I, const SimplifyQuery &Q,
320
320
OptimizationRemarkEmitter *ORE = nullptr );
321
321
322
- // / Like \p SimplifyInstruction but the operands of \p I are replaced with
322
+ // / Like \p simplifyInstruction but the operands of \p I are replaced with
323
323
// / \p NewOps. Returns a simplified value, or null if none was found.
324
324
Value *
325
- SimplifyInstructionWithOperands (Instruction *I, ArrayRef<Value *> NewOps,
325
+ simplifyInstructionWithOperands (Instruction *I, ArrayRef<Value *> NewOps,
326
326
const SimplifyQuery &Q,
327
327
OptimizationRemarkEmitter *ORE = nullptr );
328
328
0 commit comments