[PATCH] D25440: [Target] remove TargetRecip class; move reciprocal estimate isel functionality to TargetLowering

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 13:45:13 PDT 2016


spatel added inline comments.


================
Comment at: include/llvm/Target/TargetLowering.h:260-266
+  int getSqrtEnabled(EVT VT, MachineFunction &MF) const;
+
+  /// Return a ReciprocalEstimate enum value for a division of the given type
+  /// based on the function's attributes. If the operation is not overridden by
+  /// the function's attributes, "Unspecified" is returned and target defaults
+  /// are expected to be used for instruction selection.
+  int getDivEnabled(EVT VT, MachineFunction &MF) const;
----------------
echristo wrote:
> Bit of a bikeshed but these two functions sound like they're seeing if sqrt and div are instructions in the hardware.
I'll take any suggested improvements. :)

Note that I reverted this commit at rL284513 because I screwed something up with the StringRefs while parsing the function attribute. 

A bot said: "AddressSanitizer: initialization-order-fiasco" (!)


Repository:
  rL LLVM

https://reviews.llvm.org/D25440





More information about the llvm-commits mailing list