Skip to content

Commit d26c3d2

Browse files
committed
Remove MF in usePrecSqrtF32
1 parent ec5b9d1 commit d26c3d2

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ NVPTXDAGToDAGISel::getDivF32Level(const SDNode *N) const {
7070
}
7171

7272
bool NVPTXDAGToDAGISel::usePrecSqrtF32(const SDNode *N) const {
73-
return Subtarget->getTargetLowering()->usePrecSqrtF32(*MF, N);
73+
return Subtarget->getTargetLowering()->usePrecSqrtF32(N);
7474
}
7575

7676
bool NVPTXDAGToDAGISel::useF32FTZ() const {

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)