@@ -163,19 +163,19 @@ void llvm::computeKnownBits(const Value *V, KnownBits &Known,
163
163
const DataLayout &DL, unsigned Depth,
164
164
AssumptionCache *AC, const Instruction *CxtI,
165
165
const DominatorTree *DT, bool UseInstrInfo) {
166
- ::computeKnownBits (V, Known, Depth,
167
- SimplifyQuery (DL, /* TLI */ nullptr , DT, AC ,
168
- safeCxtI (V, CxtI), UseInstrInfo));
166
+ ::computeKnownBits (
167
+ V, Known, Depth ,
168
+ SimplifyQuery (DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
169
169
}
170
170
171
171
void llvm::computeKnownBits (const Value *V, const APInt &DemandedElts,
172
172
KnownBits &Known, const DataLayout &DL,
173
173
unsigned Depth, AssumptionCache *AC,
174
174
const Instruction *CxtI, const DominatorTree *DT,
175
175
bool UseInstrInfo) {
176
- ::computeKnownBits (V, DemandedElts, Known, Depth,
177
- SimplifyQuery (DL, /* TLI */ nullptr , DT, AC ,
178
- safeCxtI (V, CxtI), UseInstrInfo));
176
+ ::computeKnownBits (
177
+ V, DemandedElts, Known, Depth ,
178
+ SimplifyQuery (DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
179
179
}
180
180
181
181
static KnownBits computeKnownBits (const Value *V, const APInt &DemandedElts,
@@ -188,18 +188,17 @@ KnownBits llvm::computeKnownBits(const Value *V, const DataLayout &DL,
188
188
unsigned Depth, AssumptionCache *AC,
189
189
const Instruction *CxtI,
190
190
const DominatorTree *DT, bool UseInstrInfo) {
191
- return ::computeKnownBits (V, Depth,
192
- SimplifyQuery (DL, /* TLI*/ nullptr , DT, AC,
193
- safeCxtI (V, CxtI), UseInstrInfo));
191
+ return ::computeKnownBits (
192
+ V, Depth, SimplifyQuery (DL, DT, AC, safeCxtI (V, CxtI), UseInstrInfo));
194
193
}
195
194
196
195
KnownBits llvm::computeKnownBits (const Value *V, const APInt &DemandedElts,
197
196
const DataLayout &DL, unsigned Depth,
198
197
AssumptionCache *AC, const Instruction *CxtI,
199
198
const DominatorTree *DT, bool UseInstrInfo) {
200
- return ::computeKnownBits (V, DemandedElts, Depth,
201
- SimplifyQuery (DL, /* TLI */ nullptr , DT, AC ,
202
- safeCxtI (V, CxtI), UseInstrInfo));
199
+ return ::computeKnownBits (
200
+ V, DemandedElts, Depth ,
201
+ SimplifyQuery (DL, DT, AC, safeCxtI (V, CxtI), UseInstrInfo));
203
202
}
204
203
205
204
bool llvm::haveNoCommonBitsSet (const Value *LHS, const Value *RHS,
@@ -275,10 +274,9 @@ bool llvm::isKnownToBeAPowerOfTwo(const Value *V, const DataLayout &DL,
275
274
bool OrZero, unsigned Depth,
276
275
AssumptionCache *AC, const Instruction *CxtI,
277
276
const DominatorTree *DT, bool UseInstrInfo) {
278
- return ::isKnownToBeAPowerOfTwo (V, OrZero, Depth,
279
- SimplifyQuery (DL, /* TLI*/ nullptr , DT, AC,
280
- safeCxtI (V, CxtI),
281
- UseInstrInfo));
277
+ return ::isKnownToBeAPowerOfTwo (
278
+ V, OrZero, Depth,
279
+ SimplifyQuery (DL, DT, AC, safeCxtI (V, CxtI), UseInstrInfo));
282
280
}
283
281
284
282
static bool isKnownNonZero (const Value *V, const APInt &DemandedElts,
@@ -290,9 +288,8 @@ static bool isKnownNonZero(const Value *V, unsigned Depth,
290
288
bool llvm::isKnownNonZero (const Value *V, const DataLayout &DL, unsigned Depth,
291
289
AssumptionCache *AC, const Instruction *CxtI,
292
290
const DominatorTree *DT, bool UseInstrInfo) {
293
- return ::isKnownNonZero (V, Depth,
294
- SimplifyQuery (DL, /* TLI*/ nullptr , DT, AC,
295
- safeCxtI (V, CxtI), UseInstrInfo));
291
+ return ::isKnownNonZero (
292
+ V, Depth, SimplifyQuery (DL, DT, AC, safeCxtI (V, CxtI), UseInstrInfo));
296
293
}
297
294
298
295
bool llvm::isKnownNonNegative (const Value *V, const DataLayout &DL,
@@ -329,9 +326,9 @@ bool llvm::isKnownNonEqual(const Value *V1, const Value *V2,
329
326
const DataLayout &DL, AssumptionCache *AC,
330
327
const Instruction *CxtI, const DominatorTree *DT,
331
328
bool UseInstrInfo) {
332
- return ::isKnownNonEqual (V1, V2, 0 ,
333
- SimplifyQuery (DL, /* TLI */ nullptr , DT, AC ,
334
- safeCxtI (V2, V1, CxtI), UseInstrInfo));
329
+ return ::isKnownNonEqual (
330
+ V1, V2, 0 ,
331
+ SimplifyQuery (DL, DT, AC, safeCxtI (V2, V1, CxtI), UseInstrInfo));
335
332
}
336
333
337
334
static bool MaskedValueIsZero (const Value *V, const APInt &Mask, unsigned Depth,
@@ -341,9 +338,9 @@ bool llvm::MaskedValueIsZero(const Value *V, const APInt &Mask,
341
338
const DataLayout &DL, unsigned Depth,
342
339
AssumptionCache *AC, const Instruction *CxtI,
343
340
const DominatorTree *DT, bool UseInstrInfo) {
344
- return ::MaskedValueIsZero (V, Mask, Depth,
345
- SimplifyQuery (DL, /* TLI */ nullptr , DT, AC ,
346
- safeCxtI (V, CxtI), UseInstrInfo));
341
+ return ::MaskedValueIsZero (
342
+ V, Mask, Depth ,
343
+ SimplifyQuery (DL, DT, AC, safeCxtI (V, CxtI), UseInstrInfo));
347
344
}
348
345
349
346
static unsigned ComputeNumSignBits (const Value *V, const APInt &DemandedElts,
@@ -361,9 +358,8 @@ unsigned llvm::ComputeNumSignBits(const Value *V, const DataLayout &DL,
361
358
unsigned Depth, AssumptionCache *AC,
362
359
const Instruction *CxtI,
363
360
const DominatorTree *DT, bool UseInstrInfo) {
364
- return ::ComputeNumSignBits (V, Depth,
365
- SimplifyQuery (DL, /* TLI*/ nullptr , DT, AC,
366
- safeCxtI (V, CxtI), UseInstrInfo));
361
+ return ::ComputeNumSignBits (
362
+ V, Depth, SimplifyQuery (DL, DT, AC, safeCxtI (V, CxtI), UseInstrInfo));
367
363
}
368
364
369
365
unsigned llvm::ComputeMaxSignificantBits (const Value *V, const DataLayout &DL,
@@ -956,10 +952,9 @@ KnownBits llvm::analyzeKnownBitsFromAndXorOr(
956
952
APInt DemandedElts =
957
953
FVTy ? APInt::getAllOnes (FVTy->getNumElements ()) : APInt (1 , 1 );
958
954
959
- return getKnownBitsFromAndXorOr (I, DemandedElts, KnownLHS, KnownRHS, Depth,
960
- SimplifyQuery (DL, /* TLI*/ nullptr , DT, AC,
961
- safeCxtI (I, CxtI),
962
- UseInstrInfo));
955
+ return getKnownBitsFromAndXorOr (
956
+ I, DemandedElts, KnownLHS, KnownRHS, Depth,
957
+ SimplifyQuery (DL, DT, AC, safeCxtI (I, CxtI), UseInstrInfo));
963
958
}
964
959
965
960
ConstantRange llvm::getVScaleRange (const Function *F, unsigned BitWidth) {
@@ -6383,9 +6378,8 @@ static OverflowResult computeOverflowForSignedAdd(const Value *LHS,
6383
6378
(LHSRange.isAllNegative () || RHSRange.isAllNegative ());
6384
6379
if (LHSOrRHSKnownNonNegative || LHSOrRHSKnownNegative) {
6385
6380
KnownBits AddKnown (LHSRange.getBitWidth ());
6386
- computeKnownBitsFromAssume (
6387
- Add, AddKnown, /* Depth=*/ 0 ,
6388
- SimplifyQuery (DL, /* TLI*/ nullptr , DT, AC, CxtI, DT));
6381
+ computeKnownBitsFromAssume (Add, AddKnown, /* Depth=*/ 0 ,
6382
+ SimplifyQuery (DL, DT, AC, CxtI, DT));
6389
6383
if ((AddKnown.isNonNegative () && LHSOrRHSKnownNonNegative) ||
6390
6384
(AddKnown.isNegative () && LHSOrRHSKnownNegative))
6391
6385
return OverflowResult::NeverOverflows;
0 commit comments