@@ -298,12 +298,14 @@ struct RecurrenceInfo {
298
298
}
299
299
300
300
bool matchSimpleRecurrence (const PHINode *P);
301
- BinaryOperator *digRecurrence (
302
- Instruction *V, const PHINode *P,
303
- Instruction::BinaryOps BOWithConstOpToMatch = Instruction::BinaryOpsEnd);
304
301
bool matchConditionalRecurrence (
305
302
const PHINode *P,
306
303
Instruction::BinaryOps BOWithConstOpToMatch = Instruction::BinaryOpsEnd);
304
+
305
+ private:
306
+ BinaryOperator *digRecurrence (
307
+ Instruction *V,
308
+ Instruction::BinaryOps BOWithConstOpToMatch = Instruction::BinaryOpsEnd);
307
309
};
308
310
309
311
// / Wraps llvm::matchSimpleRecurrence. Match a simple first order recurrence
@@ -329,7 +331,7 @@ bool RecurrenceInfo::matchSimpleRecurrence(const PHINode *P) {
329
331
// / Digs for a recurrence starting with \p V hitting the PHI node in a use-def
330
332
// / chain. Used by matchConditionalRecurrence.
331
333
BinaryOperator *
332
- RecurrenceInfo::digRecurrence (Instruction *V, const PHINode *P,
334
+ RecurrenceInfo::digRecurrence (Instruction *V,
333
335
Instruction::BinaryOps BOWithConstOpToMatch) {
334
336
SmallVector<Instruction *> Worklist;
335
337
Worklist.push_back (V);
@@ -395,8 +397,8 @@ bool RecurrenceInfo::matchConditionalRecurrence(
395
397
396
398
// For a conditional recurrence, both the true and false values of the
397
399
// select must ultimately end up in the same recurrent BinOp.
398
- BinaryOperator *FoundBO = digRecurrence (TV, P, BOWithConstOpToMatch);
399
- BinaryOperator *AltBO = digRecurrence (FV, P, BOWithConstOpToMatch);
400
+ BinaryOperator *FoundBO = digRecurrence (TV, BOWithConstOpToMatch);
401
+ BinaryOperator *AltBO = digRecurrence (FV, BOWithConstOpToMatch);
400
402
if (!FoundBO || FoundBO != AltBO)
401
403
return false ;
402
404
0 commit comments