Skip to content

Commit 751f7b6

Browse files
committed
Remove MF in usePrecSqrtF32
1 parent ec5b9d1 commit 751f7b6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ NVPTXTargetLowering::getDivF32Level(const MachineFunction &MF,
132132
return NVPTX::DivPrecisionLevel::IEEE754;
133133
}
134134

135-
bool NVPTXTargetLowering::usePrecSqrtF32(const MachineFunction &MF,
136-
const SDNode *N) const {
135+
bool NVPTXTargetLowering::usePrecSqrtF32(const SDNode *N) const {
137136
// If nvptx-prec-sqrtf32 is used on the command-line, always honor it
138137
if (UsePrecSqrtF32.getNumOccurrences() > 0)
139138
return UsePrecSqrtF32;
@@ -1118,8 +1117,7 @@ SDValue NVPTXTargetLowering::getSqrtEstimate(SDValue Operand, SelectionDAG &DAG,
11181117
bool &UseOneConst,
11191118
bool Reciprocal) const {
11201119
if (!(Enabled == ReciprocalEstimate::Enabled ||
1121-
(Enabled == ReciprocalEstimate::Unspecified &&
1122-
!usePrecSqrtF32(DAG.getMachineFunction()))))
1120+
(Enabled == ReciprocalEstimate::Unspecified && !usePrecSqrtF32())))
11231121
return SDValue();
11241122

11251123
if (ExtraSteps == ReciprocalEstimate::Unspecified)

llvm/lib/Target/NVPTX/NVPTXISelLowering.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ class NVPTXTargetLowering : public TargetLowering {
201201

202202
// Get whether we should use a precise or approximate 32-bit floating point
203203
// sqrt instruction.
204-
bool usePrecSqrtF32(const MachineFunction &MF,
205-
const SDNode *N = nullptr) const;
204+
bool usePrecSqrtF32(const SDNode *N = nullptr) const;
206205

207206
// Get whether we should use instructions that flush floating-point denormals
208207
// to sign-preserving zero.

0 commit comments

Comments
 (0)