@@ -68,29 +68,29 @@ class RecurrenceDescriptor {
68
68
RecurrenceDescriptor () = default ;
69
69
70
70
RecurrenceDescriptor (Value *Start, Instruction *Exit, RecurKind K,
71
- FastMathFlags FMF, Instruction *UAI , Type *RT,
71
+ FastMathFlags FMF, Instruction *ExactFP , Type *RT,
72
72
bool Signed, SmallPtrSetImpl<Instruction *> &CI)
73
73
: StartValue(Start), LoopExitInstr(Exit), Kind(K), FMF(FMF),
74
- UnsafeAlgebraInst (UAI ), RecurrenceType(RT), IsSigned(Signed) {
74
+ ExactFPMathInst (ExactFP ), RecurrenceType(RT), IsSigned(Signed) {
75
75
CastInsts.insert (CI.begin (), CI.end ());
76
76
}
77
77
78
78
// / This POD struct holds information about a potential recurrence operation.
79
79
class InstDesc {
80
80
public:
81
- InstDesc (bool IsRecur, Instruction *I, Instruction *UAI = nullptr )
81
+ InstDesc (bool IsRecur, Instruction *I, Instruction *ExactFP = nullptr )
82
82
: IsRecurrence(IsRecur), PatternLastInst(I),
83
- RecKind (RecurKind::None), UnsafeAlgebraInst(UAI ) {}
83
+ RecKind (RecurKind::None), ExactFPMathInst(ExactFP ) {}
84
84
85
- InstDesc (Instruction *I, RecurKind K, Instruction *UAI = nullptr )
85
+ InstDesc (Instruction *I, RecurKind K, Instruction *ExactFP = nullptr )
86
86
: IsRecurrence(true ), PatternLastInst(I), RecKind(K),
87
- UnsafeAlgebraInst(UAI ) {}
87
+ ExactFPMathInst(ExactFP ) {}
88
88
89
89
bool isRecurrence () const { return IsRecurrence; }
90
90
91
- bool hasUnsafeAlgebra () const { return UnsafeAlgebraInst != nullptr ; }
91
+ bool needsExactFPMath () const { return ExactFPMathInst != nullptr ; }
92
92
93
- Instruction *getUnsafeAlgebraInst () const { return UnsafeAlgebraInst ; }
93
+ Instruction *getExactFPMathInst () const { return ExactFPMathInst ; }
94
94
95
95
RecurKind getRecKind () const { return RecKind; }
96
96
@@ -104,8 +104,8 @@ class RecurrenceDescriptor {
104
104
Instruction *PatternLastInst;
105
105
// If this is a min/max pattern.
106
106
RecurKind RecKind;
107
- // Recurrence has unsafe algebra .
108
- Instruction *UnsafeAlgebraInst ;
107
+ // Recurrence does not allow floating-point reassociation .
108
+ Instruction *ExactFPMathInst ;
109
109
};
110
110
111
111
// / Returns a struct describing if the instruction 'I' can be a recurrence
@@ -184,12 +184,12 @@ class RecurrenceDescriptor {
184
184
185
185
Instruction *getLoopExitInstr () const { return LoopExitInstr; }
186
186
187
- // / Returns true if the recurrence has unsafe algebra which requires a relaxed
188
- // / floating-point model .
189
- bool hasUnsafeAlgebra () const { return UnsafeAlgebraInst != nullptr ; }
187
+ // / Returns true if the recurrence has floating-point math that requires
188
+ // / precise (ordered) operations .
189
+ bool hasExactFPMath () const { return ExactFPMathInst != nullptr ; }
190
190
191
- // / Returns first unsafe algebra instruction in the PHI node's use-chain.
192
- Instruction *getUnsafeAlgebraInst () const { return UnsafeAlgebraInst ; }
191
+ // / Returns 1st non-reassociative FP instruction in the PHI node's use-chain.
192
+ Instruction *getExactFPMathInst () const { return ExactFPMathInst ; }
193
193
194
194
// / Returns true if the recurrence kind is an integer kind.
195
195
static bool isIntegerRecurrenceKind (RecurKind Kind);
@@ -243,8 +243,8 @@ class RecurrenceDescriptor {
243
243
// The fast-math flags on the recurrent instructions. We propagate these
244
244
// fast-math flags into the vectorized FP instructions we generate.
245
245
FastMathFlags FMF;
246
- // First occurrence of unasfe algebra in the PHI's use-chain.
247
- Instruction *UnsafeAlgebraInst = nullptr ;
246
+ // First instance of non-reassociative floating-point in the PHI's use-chain.
247
+ Instruction *ExactFPMathInst = nullptr ;
248
248
// The type of the recurrence.
249
249
Type *RecurrenceType = nullptr ;
250
250
// True if all source operands of the recurrence are SExtInsts.
0 commit comments